|
7 | 7 | BUILD: build
|
8 | 8 | RUSTFLAGS: -D warnings
|
9 | 9 | RUSTDOCFLAGS: -D warnings
|
| 10 | + PLUSTOOLCHAIN: +$TOOLCHAIN |
10 | 11 | TOOL: cargo
|
11 | 12 | # The MSRV
|
12 | 13 | TOOLCHAIN: 1.63.0
|
|
16 | 17 | build: &BUILD
|
17 | 18 | build_script:
|
18 | 19 | - . $HOME/.cargo/env || true
|
19 |
| - - $TOOL +$TOOLCHAIN -Vv |
20 |
| - - rustc +$TOOLCHAIN -Vv |
21 |
| - - $TOOL +$TOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets |
22 |
| - - $TOOL +$TOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET |
23 |
| - - $TOOL +$TOOLCHAIN clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings |
| 20 | + - $TOOL $PLUSTOOLCHAIN -Vv |
| 21 | + - rustc $PLUSTOOLCHAIN -Vv |
| 22 | + - $TOOL $PLUSTOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets |
| 23 | + - $TOOL $PLUSTOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET |
| 24 | + - $TOOL $PLUSTOOLCHAIN clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings |
24 | 25 | - if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
|
25 | 26 | - 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
|
26 |
| - - if [ -z "$NOHACK" ]; then $TOOL +$TOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi |
| 27 | + - if [ -z "$NOHACK" ]; then $TOOL $PLUSTOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi |
27 | 28 |
|
28 | 29 | # Tests that do require executing the binaries
|
29 | 30 | test: &TEST
|
30 | 31 | << : *BUILD
|
31 | 32 | test_script:
|
32 | 33 | - . $HOME/.cargo/env || true
|
33 |
| - - $TOOL +$TOOLCHAIN test --target $TARGET |
| 34 | + - $TOOL $PLUSTOOLCHAIN test --target $TARGET |
34 | 35 |
|
35 | 36 | # Test FreeBSD in a full VM. Test the i686 target too, in the
|
36 | 37 | # same VM. The binary will be built in 32-bit mode, but will execute on a
|
@@ -165,9 +166,9 @@ task:
|
165 | 166 | image: rust:latest
|
166 | 167 | env:
|
167 | 168 | TARGET: x86_64-unknown-linux-gnu
|
168 |
| - TOOLCHAIN: stable |
| 169 | + TOOLCHAIN: |
| 170 | + PLUSTOOLCHAIN: |
169 | 171 | setup_script:
|
170 |
| - - rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET |
171 | 172 | - rustup component add clippy
|
172 | 173 | - rustup toolchain list
|
173 | 174 | - rustc --version
|
@@ -294,26 +295,26 @@ task:
|
294 | 295 | #<< : *BUILD
|
295 | 296 | #before_cache_script: rm -rf $CARGO_HOME/registry/index
|
296 | 297 |
|
297 |
| -## Test that we can build with the lowest version of all dependencies. |
298 |
| -## "cargo test" doesn't work because some of our dev-dependencies, like |
299 |
| -## rand, can't build with their own minimal dependencies. |
300 |
| -#task: |
301 |
| - #name: Minver |
302 |
| - #env: |
303 |
| - #HOST: x86_64-unknown-linux-gnu |
304 |
| - #TOOLCHAIN: nightly |
305 |
| - #container: |
306 |
| - #image: rustlang/rust:nightly |
307 |
| - #setup_script: |
308 |
| - #- cargo update -Zminimal-versions |
309 |
| - #check_script: |
310 |
| - #- cargo check |
311 |
| - #before_cache_script: rm -rf $CARGO_HOME/registry/index |
| 298 | +# Test that we can build with the lowest version of all dependencies. |
| 299 | +# "cargo test" doesn't work because some of our dev-dependencies, like |
| 300 | +# rand, can't build with their own minimal dependencies. |
| 301 | +task: |
| 302 | + name: Minver |
| 303 | + env: |
| 304 | + HOST: x86_64-unknown-linux-gnu |
| 305 | + TOOLCHAIN: nightly |
| 306 | + container: |
| 307 | + image: rustlang/rust:nightly |
| 308 | + setup_script: |
| 309 | + - cargo update -Zminimal-versions |
| 310 | + check_script: |
| 311 | + - cargo check |
| 312 | + before_cache_script: rm -rf $CARGO_HOME/registry/index |
312 | 313 |
|
313 | 314 | ## Tasks that checks if the code is formatted right using `cargo fmt` tool
|
314 | 315 | #task:
|
315 | 316 | #name: Rust Formatter
|
316 | 317 | #container:
|
317 | 318 | #image: rust:latest
|
318 |
| - #setup_script: rustup +$TOOLCHAIN component add rustfmt |
319 |
| - #test_script: $TOOL +$TOOLCHAIN fmt --all -- --check **/*.rs |
| 319 | + #setup_script: rustup $PLUSTOOLCHAIN component add rustfmt |
| 320 | + #test_script: $TOOL $PLUSTOOLCHAIN fmt --all -- --check **/*.rs |
0 commit comments