Skip to content

Commit 0604185

Browse files
committed
Enable more tasks
1 parent d2f2314 commit 0604185

File tree

1 file changed

+99
-99
lines changed

1 file changed

+99
-99
lines changed

.cirrus.yml

Lines changed: 99 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
BUILD: build
88
RUSTFLAGS: -D warnings
99
RUSTDOCFLAGS: -D warnings
10-
PLUSTOOLCHAIN: +$TOOLCHAIN
10+
PLUS: +
1111
TOOL: cargo
1212
# The MSRV
1313
TOOLCHAIN: 1.63.0
@@ -17,21 +17,21 @@ env:
1717
build: &BUILD
1818
build_script:
1919
- . $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
2525
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
2626
- 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
2828

2929
# Tests that do require executing the binaries
3030
test: &TEST
3131
<< : *BUILD
3232
test_script:
3333
- . $HOME/.cargo/env || true
34-
- $TOOL $PLUSTOOLCHAIN test --target $TARGET
34+
- $TOOL $PLUS $TOOLCHAIN test --target $TARGET
3535

3636
# Test FreeBSD in a full VM. Test the i686 target too, in the
3737
# same VM. The binary will be built in 32-bit mode, but will execute on a
@@ -83,20 +83,20 @@ test: &TEST
8383
#<< : *TEST
8484
#before_cache_script: rm -rf $CARGO_HOME/registry/index
8585

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
100100
#- name: Linux armv7 gnueabihf
101101
#env:
102102
#TARGET: armv7-unknown-linux-gnueabihf
@@ -121,44 +121,44 @@ test: &TEST
121121
#- name: Linux powerpc64le
122122
#env:
123123
#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
138138

139-
## Tasks for Linux native builds
140-
#task:
141-
#matrix:
139+
# Tasks for Linux native builds
140+
task:
141+
matrix:
142142
#- name: Linux aarch64
143143
#arm_container:
144144
#image: rust:1.63.0
145145
#env:
146146
#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
152152
#- name: Linux x86_64 musl
153153
#container:
154154
#image: rust:1.63.0
155155
#env:
156156
#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
162162

163163
task:
164164
name: Rust Stable
@@ -167,7 +167,7 @@ task:
167167
env:
168168
TARGET: x86_64-unknown-linux-gnu
169169
TOOLCHAIN:
170-
PLUSTOOLCHAIN:
170+
PLUS:
171171
setup_script:
172172
- rustup component add clippy
173173
- rustup toolchain list
@@ -176,13 +176,13 @@ task:
176176
before_cache_script: rm -rf $CARGO_HOME/registry/index
177177

178178
# 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:
186186
## Cross claims to support Android, but when it tries to run Nix's tests it
187187
## reports undefined symbol references.
188188
#- name: Android aarch64
@@ -240,15 +240,15 @@ task:
240240
#- name: macOS x86_64
241241
#env:
242242
#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
252252

253253
#task:
254254
#container:
@@ -269,31 +269,32 @@ task:
269269
#before_cache_script: rm -rf $CARGO_HOME/registry/index
270270

271271
## 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
297298

298299
# Test that we can build with the lowest version of all dependencies.
299300
# "cargo test" doesn't work because some of our dev-dependencies, like
@@ -302,7 +303,6 @@ task:
302303
name: Minver
303304
env:
304305
HOST: x86_64-unknown-linux-gnu
305-
TOOLCHAIN: nightly
306306
container:
307307
image: rustlang/rust:nightly
308308
setup_script:
@@ -311,10 +311,10 @@ task:
311311
- cargo check
312312
before_cache_script: rm -rf $CARGO_HOME/registry/index
313313

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

Comments
 (0)