7
7
BUILD : build
8
8
RUSTFLAGS : -D warnings
9
9
RUSTDOCFLAGS : -D warnings
10
- PLUSTOOLCHAIN : +$TOOLCHAIN
10
+ PLUS : +
11
11
TOOL : cargo
12
12
# The MSRV
13
13
TOOLCHAIN : 1.63.0
17
17
build : &BUILD
18
18
build_script :
19
19
- . $HOME/.cargo/env || true
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
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
25
25
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
26
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
27
- - if [ -z "$NOHACK" ]; then $TOOL $PLUSTOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi
27
+ - if [ -z "$NOHACK" ]; then $TOOL $PLUS $TOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi
28
28
29
29
# Tests that do require executing the binaries
30
30
test : &TEST
31
31
<< : *BUILD
32
32
test_script :
33
33
- . $HOME/.cargo/env || true
34
- - $TOOL $PLUSTOOLCHAIN test --target $TARGET
34
+ - $TOOL $PLUS $TOOLCHAIN test --target $TARGET
35
35
36
36
# Test FreeBSD in a full VM. Test the i686 target too, in the
37
37
# same VM. The binary will be built in 32-bit mode, but will execute on a
@@ -83,20 +83,20 @@ test: &TEST
83
83
# << : *TEST
84
84
# before_cache_script: rm -rf $CARGO_HOME/registry/index
85
85
86
- # # Use cross for QEMU-based testing
87
- # # cross needs to execute Docker, so we must use Cirrus's Docker Builder task.
88
- # task:
89
- # env:
90
- # RUST_TEST_THREADS: 1 # QEMU works best with 1 thread
91
- # HOME: /tmp/home
92
- # HOST: x86_64-unknown-linux-gnu
93
- # PATH: $HOME/.cargo/bin:$PATH
94
- # RUSTFLAGS: --cfg qemu -D warnings
95
- # TOOL: cross
96
- # matrix:
97
- # - name: Linux arm gnueabi
98
- # env:
99
- # TARGET: arm-unknown-linux-gnueabi
86
+ # Use cross for QEMU-based testing
87
+ # cross needs to execute Docker, so we must use Cirrus's Docker Builder task.
88
+ task :
89
+ env :
90
+ RUST_TEST_THREADS : 1 # QEMU works best with 1 thread
91
+ HOME : /tmp/home
92
+ HOST : x86_64-unknown-linux-gnu
93
+ PATH : $HOME/.cargo/bin:$PATH
94
+ RUSTFLAGS : --cfg qemu -D warnings
95
+ TOOL : cross
96
+ matrix :
97
+ - name : Linux arm gnueabi
98
+ env :
99
+ TARGET : arm-unknown-linux-gnueabi
100
100
# - name: Linux armv7 gnueabihf
101
101
# env:
102
102
# TARGET: armv7-unknown-linux-gnueabihf
@@ -121,44 +121,44 @@ test: &TEST
121
121
# - name: Linux powerpc64le
122
122
# env:
123
123
# TARGET: powerpc64le-unknown-linux-gnu
124
- # compute_engine_instance:
125
- # image_project: cirrus-images
126
- # image: family/docker-builder
127
- # platform: linux
128
- # cpu: 1 # Since QEMU will only use 1 thread
129
- # memory: 4G
130
- # setup_script:
131
- # - mkdir /tmp/home
132
- # - curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
133
- # - sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
134
- # - . $HOME/.cargo/env
135
- # - cargo install cross --version 0.2.1 # cross 0.2.2 bumped the MSRV to 1.58.1
136
- # << : *TEST
137
- # before_cache_script: rm -rf $CARGO_HOME/registry/index
124
+ compute_engine_instance :
125
+ image_project : cirrus-images
126
+ image : family/docker-builder
127
+ platform : linux
128
+ cpu : 1 # Since QEMU will only use 1 thread
129
+ memory : 4G
130
+ setup_script :
131
+ - mkdir /tmp/home
132
+ - curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
133
+ - sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
134
+ - . $HOME/.cargo/env
135
+ - cargo install cross --version 0.2.1 # cross 0.2.2 bumped the MSRV to 1.58.1
136
+ << : *TEST
137
+ before_cache_script : rm -rf $CARGO_HOME/registry/index
138
138
139
- # # Tasks for Linux native builds
140
- # task:
141
- # matrix:
139
+ # Tasks for Linux native builds
140
+ task :
141
+ matrix :
142
142
# - name: Linux aarch64
143
143
# arm_container:
144
144
# image: rust:1.63.0
145
145
# env:
146
146
# TARGET: aarch64-unknown-linux-gnu
147
- # - name: Linux x86_64
148
- # container:
149
- # image: rust:1.63.0
150
- # env:
151
- # TARGET: x86_64-unknown-linux-gnu
147
+ - name : Linux x86_64
148
+ container :
149
+ image : rust:1.63.0
150
+ env :
151
+ TARGET : x86_64-unknown-linux-gnu
152
152
# - name: Linux x86_64 musl
153
153
# container:
154
154
# image: rust:1.63.0
155
155
# env:
156
156
# TARGET: x86_64-unknown-linux-musl
157
- # setup_script:
158
- # - rustup target add $TARGET
159
- # - rustup component add clippy
160
- # << : *TEST
161
- # before_cache_script: rm -rf $CARGO_HOME/registry/index
157
+ setup_script :
158
+ - rustup target add $TARGET
159
+ - rustup component add clippy
160
+ << : *TEST
161
+ before_cache_script : rm -rf $CARGO_HOME/registry/index
162
162
163
163
task :
164
164
name : Rust Stable
@@ -167,7 +167,7 @@ task:
167
167
env :
168
168
TARGET : x86_64-unknown-linux-gnu
169
169
TOOLCHAIN :
170
- PLUSTOOLCHAIN :
170
+ PLUS :
171
171
setup_script :
172
172
- rustup component add clippy
173
173
- rustup toolchain list
@@ -176,13 +176,13 @@ task:
176
176
before_cache_script : rm -rf $CARGO_HOME/registry/index
177
177
178
178
# Tasks for cross-compiling, but no testing
179
- # task:
180
- # container:
181
- # image: rust:1.63.0
182
- # env:
183
- # BUILD: check
184
- # HOST: x86_64-unknown-linux-gnu
185
- # matrix:
179
+ task :
180
+ container :
181
+ image : rust:1.63.0
182
+ env :
183
+ BUILD : check
184
+ HOST : x86_64-unknown-linux-gnu
185
+ matrix :
186
186
# # Cross claims to support Android, but when it tries to run Nix's tests it
187
187
# # reports undefined symbol references.
188
188
# - name: Android aarch64
@@ -240,15 +240,15 @@ task:
240
240
# - name: macOS x86_64
241
241
# env:
242
242
# TARGET: x86_64-apple-darwin
243
- # - name: NetBSD x86_64
244
- # env:
245
- # TARGET: x86_64-unknown-netbsd
246
- # setup_script:
247
- # - rustup target add $TARGET
248
- # - rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
249
- # - rustup component add --toolchain $TOOLCHAIN clippy
250
- # << : *BUILD
251
- # before_cache_script: rm -rf $CARGO_HOME/registry/index
243
+ - name : NetBSD x86_64
244
+ env :
245
+ TARGET : x86_64-unknown-netbsd
246
+ setup_script :
247
+ - rustup target add $TARGET
248
+ - rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
249
+ - rustup component add --toolchain $TOOLCHAIN clippy
250
+ << : *BUILD
251
+ before_cache_script : rm -rf $CARGO_HOME/registry/index
252
252
253
253
# task:
254
254
# container:
@@ -269,31 +269,32 @@ task:
269
269
# before_cache_script: rm -rf $CARGO_HOME/registry/index
270
270
271
271
# # Rust Tier 3 targets can't use Rustup
272
- # task:
273
- # container:
274
- # image: rustlang/rust:nightly
275
- # env:
276
- # BUILD: check
277
- # HOST: x86_64-unknown-linux-gnu
278
- # TOOLCHAIN: nightly
279
- # ZFLAGS: -Zbuild-std
280
- # matrix:
281
- # - name: DragonFly BSD x86_64
282
- # env:
283
- # TARGET: x86_64-unknown-dragonfly
284
- # - name: OpenBSD x86_64
285
- # env:
286
- # TARGET: x86_64-unknown-openbsd
287
- # - name: Linux armv7 uclibceabihf
288
- # env:
289
- # TARGET: armv7-unknown-linux-uclibceabihf
290
- # - name: Haiku x86_64
291
- # env:
292
- # TARGET: x86_64-unknown-haiku
293
- # setup_script:
294
- # - rustup component add rust-src
295
- # << : *BUILD
296
- # before_cache_script: rm -rf $CARGO_HOME/registry/index
272
+ task :
273
+ container :
274
+ image : rustlang/rust:nightly
275
+ env :
276
+ BUILD : check
277
+ HOST : x86_64-unknown-linux-gnu
278
+ PLUS :
279
+ TOOLCHAIN :
280
+ ZFLAGS : -Zbuild-std
281
+ matrix :
282
+ - name : DragonFly BSD x86_64
283
+ env :
284
+ TARGET : x86_64-unknown-dragonfly
285
+ - name : OpenBSD x86_64
286
+ env :
287
+ TARGET : x86_64-unknown-openbsd
288
+ - name : Linux armv7 uclibceabihf
289
+ env :
290
+ TARGET : armv7-unknown-linux-uclibceabihf
291
+ - name : Haiku x86_64
292
+ env :
293
+ TARGET : x86_64-unknown-haiku
294
+ setup_script :
295
+ - rustup component add rust-src
296
+ << : *BUILD
297
+ before_cache_script : rm -rf $CARGO_HOME/registry/index
297
298
298
299
# Test that we can build with the lowest version of all dependencies.
299
300
# "cargo test" doesn't work because some of our dev-dependencies, like
@@ -302,7 +303,6 @@ task:
302
303
name : Minver
303
304
env :
304
305
HOST : x86_64-unknown-linux-gnu
305
- TOOLCHAIN : nightly
306
306
container :
307
307
image : rustlang/rust:nightly
308
308
setup_script :
@@ -311,10 +311,10 @@ task:
311
311
- cargo check
312
312
before_cache_script : rm -rf $CARGO_HOME/registry/index
313
313
314
- # # Tasks that checks if the code is formatted right using `cargo fmt` tool
315
- # task:
316
- # name: Rust Formatter
317
- # container:
318
- # image: rust:latest
319
- # setup_script: rustup $PLUSTOOLCHAIN component add rustfmt
320
- # test_script: $TOOL $PLUSTOOLCHAIN fmt --all -- --check **/*.rs
314
+ # Tasks that checks if the code is formatted right using `cargo fmt` tool
315
+ task :
316
+ name : Rust Formatter
317
+ container :
318
+ image : rust:latest
319
+ setup_script : rustup component add rustfmt
320
+ test_script : cargo fmt --all -- --check **/*.rs
0 commit comments