-
Notifications
You must be signed in to change notification settings - Fork 9
/
.cirrus.yml
177 lines (172 loc) · 5.58 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
task:
name: FreeBSD 12 amd64 stable
freebsd_instance:
image: freebsd-12-1-release-amd64
cpu: 1
memory: 1G # Lower is not supported
depends_on: Linux i686 stable
env:
RUST_BACKTRACE: 1
HOME: /tmp # cargo caching needs it
setup_script:
- pkg install -y rust
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
target_cache:
folder: target
fingerprint_script:
- rustc --version
- cat Cargo.lock 2> /dev/null || true
info_script:
- rustc --version
build_script:
- cargo check --tests --examples
- cargo build --all-features --tests --examples
test_script:
- cargo run --all-features --bin characteristics
- cargo test --all-features --no-fail-fast -- --test-threads 1 --nocapture
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: Linux amd64 1.63
container:
image: rust:1.63.0
cpu: 1
memory: 1G # OOMs with 512MB
allow_failures: false
env:
RUST_BACKTRACE: 1
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
target_cache:
folder: target
fingerprint_script: cat Cargo.lock 2> /dev/null || true
check_script:
- cargo check
- cargo check --features mio_08
- cargo check --features tokio
test_script:
- cargo test --all-features --no-fail-fast -- --test-threads=1 --nocapture
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: Linux amd64 nightly minimal-versions
container:
image: rustlang/rust:nightly
cpu: 1
memory: 1G
allow_failures: false
env:
RUST_BACKTRACE: 1
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
# rustc version so likely to have changed that build artefacts are not worth caching
info_script:
- rustc --version
check_script:
- cargo check -Z minimal-versions -Z avoid-dev-deps
- cargo check -Z minimal-versions -Z avoid-dev-deps --features mio_08
- cargo check -Z minimal-versions -Z avoid-dev-deps --features tokio
# neither -Z minimal-versions nor -Z direct-minimal-versions work with tokio 1
# and it's a dev-dependency so can't test anything else either
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: Linux i686 stable
container:
image: rust:latest
cpu: 1
memory: 1G # OOMs with 512MB
allow_failures: false
env:
RUST_BACKTRACE: 1
setup_script:
- apt-get update
- apt-get install -yqq gcc gcc-multilib linux-libc-dev
- rustup target add i686-unknown-linux-gnu
- rustup target add i686-unknown-linux-musl
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
target_cache:
folder: target
fingerprint_script:
- rustc --version
- cat Cargo.lock 2> /dev/null || true
info_script:
- rustc --version
build_script:
- cargo build --target i686-unknown-linux-gnu --all-features
- cargo build --target i686-unknown-linux-musl --all-features
test_script:
- cargo run --target i686-unknown-linux-gnu --all-features --bin characteristics
- cargo test --target i686-unknown-linux-gnu --all-features --no-fail-fast -- --test-threads=1 --nocapture
- cargo test --target i686-unknown-linux-musl --all-features --no-fail-fast -- --test-threads=1 --nocapture
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: Cross-check stable
container:
image: rust:latest
cpu: 1
memory: 1536MB # sometimes OOMs with 1GB
allow_failures: false
setup_script:
- rustup component add clippy
- rustup target add x86_64-unknown-netbsd
- rustup target add x86_64-unknown-illumos
- rustup target add x86_64-unknown-linux-gnux32
- rustup target add aarch64-unknown-linux-gnu
- rustup target add aarch64-linux-android
- rustup target add i686-linux-android
- rustup target add x86_64-pc-windows-msvc
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
target_cache:
folder: target
fingerprint_script:
- rustc --version
- cat Cargo.lock 2> /dev/null || true
info_script:
- rustc --version
check_script:
- cargo clippy
- cargo clippy --all-features
- cargo check --target x86_64-unknown-netbsd --all-features --tests
- cargo check --target x86_64-unknown-illumos --tests
- cargo check --target x86_64-unknown-linux-gnux32 --all-features --tests
- cargo check --target aarch64-unknown-linux-gnu --all-features --tests
- cargo check --target aarch64-linux-android --all-features --tests
- cargo check --target i686-linux-android --all-features --tests
- cargo check --target x86_64-pc-windows-msvc --all-features --lib
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
task:
name: macOS stable
macos_instance:
image: monterey-base
# doesn't accept cpu or memory fields
depends_on: Linux i686 stable
env:
RUST_BACKTRACE: 1
setup_script:
- brew update
- brew install rust
cargo_cache:
folder: $HOME/.cargo/registry
fingerprint_script: cat Cargo.lock 2> /dev/null || true
info_script:
- rustc --version
build_script:
- cargo check --tests --examples
- cargo build --all-features --tests --examples
test_script:
- cargo run --all-features --bin characteristics
# serialize tests to avoid spurious failures in fd-passing tests
- cargo test --all-features --no-fail-fast -- --test-threads 1 --nocapture
before_cache_script:
- rm -rf $HOME/.cargo/registry/index