Skip to content

Commit e4eeb9a

Browse files
bors[bot]asomers
andauthored
Merge #1794
1794: Reenable cargo-hack in CI r=rtzoeller a=asomers But instead of building it from source, download pre-built binaries. Co-authored-by: Alan Somers <asomers@gmail.com>
2 parents 5252f7e + 42ca951 commit e4eeb9a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.cirrus.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ env:
1111
# The MSRV
1212
TOOLCHAIN: 1.46.0
1313
ZFLAGS:
14-
# Temporarily disable cargo-hack until we raise the MSRV to 1.51.0 or later.
15-
# See https://github.com/nix-rust/nix/pull/1792
16-
NOHACK: 1
1714

1815
# Tests that don't require executing the build binaries
1916
build: &BUILD
@@ -24,7 +21,8 @@ build: &BUILD
2421
- $TOOL +$TOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets
2522
- $TOOL +$TOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET
2623
- $TOOL +$TOOLCHAIN clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings
27-
- if [ -z "$NOHACK" ]; then $TOOL +$TOOLCHAIN install --version 0.5.14 cargo-hack; fi
24+
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
25+
- if [ -z "$NOHACK" ]; then curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin; fi
2826
- if [ -z "$NOHACK" ]; then $TOOL +$TOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi
2927

3028
# Tests that do require executing the binaries
@@ -92,6 +90,7 @@ task:
9290
env:
9391
RUST_TEST_THREADS: 1 # QEMU works best with 1 thread
9492
HOME: /tmp/home
93+
HOST: x86_64-unknown-linux-gnu
9594
PATH: $HOME/.cargo/bin:$PATH
9695
RUSTFLAGS: --cfg qemu -D warnings
9796
TOOL: cross
@@ -187,6 +186,7 @@ task:
187186
image: rust:1.46
188187
env:
189188
BUILD: check
189+
HOST: x86_64-unknown-linux-gnu
190190
matrix:
191191
# Cross claims to support Android, but when it tries to run Nix's tests it
192192
# reports undefined symbol references.
@@ -276,6 +276,7 @@ task:
276276
BUILD: check
277277
name: Redox x86_64
278278
env:
279+
HOST: x86_64-unknown-linux-gnu
279280
TARGET: x86_64-unknown-redox
280281
# Redox's MSRV policy is unclear. Until they define it, use nightly.
281282
TOOLCHAIN: nightly
@@ -292,6 +293,7 @@ task:
292293
image: rustlang/rust:nightly
293294
env:
294295
BUILD: check
296+
HOST: x86_64-unknown-linux-gnu
295297
TOOLCHAIN: nightly
296298
ZFLAGS: -Zbuild-std
297299
matrix:
@@ -318,6 +320,7 @@ task:
318320
task:
319321
name: Minver
320322
env:
323+
HOST: x86_64-unknown-linux-gnu
321324
TOOLCHAIN: nightly
322325
container:
323326
image: rustlang/rust:nightly

0 commit comments

Comments
 (0)