Skip to content

Commit 5fa0ec0

Browse files
committed
Use cmd.exe to ensure that correct Perl executable is used
Signed-off-by: Alexander Rodin <rodin.alexander@gmail.com>
1 parent e5ef4ac commit 5fa0ec0

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

.circleci/config.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,18 @@ jobs:
8686
- run:
8787
name: Install Rust
8888
shell: bash
89-
command: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2019-11-19
89+
command: |
90+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly-2019-11-19
91+
# see https://github.com/rust-lang/cargo/issues/2078
92+
printf '[net]\ngit-fetch-with-cli = true\n' > "$HOME/.cargo/config"
9093
- run:
9194
name: Download Perl
9295
shell: bash
9396
command: |
9497
VERSION=5.30.0.1
9598
# we need to verify checksum because strawberryperl.com doesn't support HTTPS
9699
SHA256SUM=459de13a284a4c83213208c9caa1c372c81136b6e863a3f13d42f631048e0b12
97-
curl http://strawberryperl.com/download/$VERSION/strawberry-perl-$VERSION-64bit.msi > perl-installer.msi &&
100+
curl http://strawberryperl.com/download/$VERSION/strawberry-perl-$VERSION-64bit.msi > perl-installer.msi
98101
echo "$SHA256SUM perl-installer.msi" | sha256sum --check --status
99102
- run:
100103
name: Install Perl
@@ -104,15 +107,19 @@ jobs:
104107
del perl-installer.msi
105108
- run:
106109
name: Build and test
107-
shell: bash
108-
command: |
109-
RUSTFLAGS=-Ctarget-feature=+crt-static
110-
FEATURES="leveldb leveldb/leveldb-sys-3 rdkafka rdkafka/cmake_build"
111-
PATH="$HOME/.cargo/bin:$PATH"
112-
# see https://github.com/rust-lang/cargo/issues/2078
113-
printf '[net]\ngit-fetch-with-cli = true\n' > "$HOME/.cargo/config"
114-
rm rust-toolchain # to use nightly
115-
cargo test --no-default-features --features "$FEATURES"
110+
shell: cmd.exe
111+
command: scripts\test-msvc.bat
112+
# - run:
113+
# name: Build and test
114+
# shell: bash
115+
# command: |
116+
# RUSTFLAGS=-Ctarget-feature=+crt-static
117+
# FEATURES="leveldb leveldb/leveldb-sys-3 rdkafka rdkafka/cmake_build"
118+
# PATH="$HOME/.cargo/bin:$PATH"
119+
# # see https://github.com/rust-lang/cargo/issues/2078
120+
# printf '[net]\ngit-fetch-with-cli = true\n' > "$HOME/.cargo/config"
121+
# rm rust-toolchain # to use nightly
122+
# cargo test --no-default-features --features "$FEATURES"
116123

117124
test-stable:
118125
resource_class: xlarge

scripts/test-msvc.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set RUSTFLAGS=-Ctarget-feature=+crt-static
2+
set PATH=%USERPROFILE%\.cargo\bin;%PATH%
3+
del rust-toolchain
4+
cargo test --no-default-features --features "leveldb leveldb/leveldb-sys-3 rdkafka rdkafka/cmake_build"

0 commit comments

Comments
 (0)