Skip to content

Commit bd9f355

Browse files
committed
Never install multiple toolchains in a task
So we'll never need to specify +$TOOLCHAIN
1 parent 0604185 commit bd9f355

File tree

1 file changed

+41
-50
lines changed

1 file changed

+41
-50
lines changed

.cirrus.yml

Lines changed: 41 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,29 @@ env:
77
BUILD: build
88
RUSTFLAGS: -D warnings
99
RUSTDOCFLAGS: -D warnings
10-
PLUS: +
1110
TOOL: cargo
12-
# The MSRV
13-
TOOLCHAIN: 1.63.0
11+
MSRV: 1.63.0
1412
ZFLAGS:
1513

1614
# Tests that don't require executing the build binaries
1715
build: &BUILD
1816
build_script:
1917
- . $HOME/.cargo/env || true
20-
- $TOOL $PLUS $TOOLCHAIN -Vv
21-
- rustc $PLUS $TOOLCHAIN -Vv
22-
- $TOOL $PLUS $TOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets
23-
- $TOOL $PLUS $TOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET
24-
- $TOOL $PLUS $TOOLCHAIN clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings
18+
- $TOOL -Vv
19+
- rustc -Vv
20+
- $TOOL $BUILD $ZFLAGS --target $TARGET --all-targets
21+
- $TOOL doc $ZFLAGS --no-deps --target $TARGET
22+
- $TOOL clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings
2523
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
2624
- 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
27-
- if [ -z "$NOHACK" ]; then $TOOL $PLUS $TOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi
25+
- if [ -z "$NOHACK" ]; then $TOOL hack $ZFLAGS check --target $TARGET --each-feature; fi
2826

2927
# Tests that do require executing the binaries
3028
test: &TEST
3129
<< : *BUILD
3230
test_script:
3331
- . $HOME/.cargo/env || true
34-
- $TOOL $PLUS $TOOLCHAIN test --target $TARGET
32+
- $TOOL test --target $TARGET
3533

3634
# Test FreeBSD in a full VM. Test the i686 target too, in the
3735
# same VM. The binary will be built in 32-bit mode, but will execute on a
@@ -53,10 +51,10 @@ test: &TEST
5351
#setup_script:
5452
#- kldload mqueuefs
5553
#- fetch https://sh.rustup.rs -o rustup.sh
56-
#- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
54+
#- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
5755
#- . $HOME/.cargo/env
5856
#- rustup target add i686-unknown-freebsd
59-
#- rustup component add --toolchain $TOOLCHAIN clippy
57+
#- rustup component add clippy
6058
#<< : *TEST
6159
#i386_test_script:
6260
#- . $HOME/.cargo/env
@@ -68,20 +66,20 @@ test: &TEST
6866
#- if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi
6967
#before_cache_script: rm -rf $CARGO_HOME/registry/index
7068

71-
## Test macOS aarch64 in a full VM
72-
#task:
73-
#name: macOS aarch64
74-
#env:
75-
#TARGET: aarch64-apple-darwin
76-
#macos_instance:
77-
#image: ghcr.io/cirruslabs/macos-ventura-base:latest
78-
#setup_script:
79-
#- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
80-
#- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
81-
#- . $HOME/.cargo/env
82-
#- rustup component add --toolchain $TOOLCHAIN clippy
83-
#<< : *TEST
84-
#before_cache_script: rm -rf $CARGO_HOME/registry/index
69+
# Test macOS aarch64 in a full VM
70+
task:
71+
name: macOS aarch64
72+
env:
73+
TARGET: aarch64-apple-darwin
74+
macos_instance:
75+
image: ghcr.io/cirruslabs/macos-ventura-base:latest
76+
setup_script:
77+
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
78+
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
79+
- . $HOME/.cargo/env
80+
- rustup component add clippy
81+
<< : *TEST
82+
before_cache_script: rm -rf $CARGO_HOME/registry/index
8583

8684
# Use cross for QEMU-based testing
8785
# cross needs to execute Docker, so we must use Cirrus's Docker Builder task.
@@ -130,7 +128,7 @@ task:
130128
setup_script:
131129
- mkdir /tmp/home
132130
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
133-
- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
131+
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
134132
- . $HOME/.cargo/env
135133
- cargo install cross --version 0.2.1 # cross 0.2.2 bumped the MSRV to 1.58.1
136134
<< : *TEST
@@ -166,8 +164,6 @@ task:
166164
image: rust:latest
167165
env:
168166
TARGET: x86_64-unknown-linux-gnu
169-
TOOLCHAIN:
170-
PLUS:
171167
setup_script:
172168
- rustup component add clippy
173169
- rustup toolchain list
@@ -245,28 +241,25 @@ task:
245241
TARGET: x86_64-unknown-netbsd
246242
setup_script:
247243
- rustup target add $TARGET
248-
- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
249-
- rustup component add --toolchain $TOOLCHAIN clippy
244+
- rustup component add clippy
250245
<< : *BUILD
251246
before_cache_script: rm -rf $CARGO_HOME/registry/index
252247

253-
#task:
254-
#container:
255-
#image: rust:1.63.0
256-
#env:
257-
#BUILD: check
258-
#name: Redox x86_64
259-
#env:
260-
#HOST: x86_64-unknown-linux-gnu
261-
#TARGET: x86_64-unknown-redox
262-
## Redox's MSRV policy is unclear. Until they define it, use nightly.
263-
#TOOLCHAIN: nightly
264-
#setup_script:
265-
#- rustup target add $TARGET
266-
#- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
267-
#- rustup component add --toolchain $TOOLCHAIN clippy
268-
#<< : *BUILD
269-
#before_cache_script: rm -rf $CARGO_HOME/registry/index
248+
task:
249+
container:
250+
# Redox's MSRV policy is unclear. Until they define it, use nightly.
251+
image: rustlang/rust:nightly
252+
env:
253+
BUILD: check
254+
name: Redox x86_64
255+
env:
256+
HOST: x86_64-unknown-linux-gnu
257+
TARGET: x86_64-unknown-redox
258+
setup_script:
259+
- rustup target add $TARGET
260+
- rustup component add clippy
261+
<< : *BUILD
262+
before_cache_script: rm -rf $CARGO_HOME/registry/index
270263

271264
## Rust Tier 3 targets can't use Rustup
272265
task:
@@ -275,8 +268,6 @@ task:
275268
env:
276269
BUILD: check
277270
HOST: x86_64-unknown-linux-gnu
278-
PLUS:
279-
TOOLCHAIN:
280271
ZFLAGS: -Zbuild-std
281272
matrix:
282273
- name: DragonFly BSD x86_64

0 commit comments

Comments
 (0)