-
Notifications
You must be signed in to change notification settings - Fork 61
/
.cirrus.yml
195 lines (187 loc) · 5.49 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
stable_test_task:
name: "Rust Stable"
container:
image: rust:latest
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
setup_script:
- rustup component add rustfmt
primary_test_script:
- rustc --version
- cargo test --all
backtraces_impl_backtrace_crate_test_script:
- cargo test --manifest-path compatibility-tests/backtraces-impl-backtrace-crate/Cargo.toml
context_selectors_have_documentation_test_script:
- cargo test --manifest-path compatibility-tests/context-selectors-have-documentation/Cargo.toml
renamed_import_test_script:
- cargo test --manifest-path compatibility-tests/renamed-import/Cargo.toml
compile_fail_test_script:
- cargo test --manifest-path compatibility-tests/compile-fail/Cargo.toml
lint_script:
- >
for i in $(find . -name 'Cargo.toml'); do
pushd $(dirname $i);
cargo +stable fmt --all -- --check;
popd;
done
all_compatibility_tests_used_script:
- >
for n in compatibility-tests/*; do
n=$(basename $n);
if grep -q $n .cirrus.yml; then
echo "$n found";
else
echo "$n missing";
exit 1;
fi;
done
before_cache_script: rm -rf $CARGO_HOME/registry/index
doc_test_task:
name: "Docs"
env:
# unused-braces is due to https://github.com/rust-lang/rust/issues/70717
RUSTFLAGS: "-D warnings -A unused-braces"
RUSTDOCFLAGS: "${RUSTFLAGS}"
container:
image: rustlang/rust:nightly
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
version_information_script:
- rustc +nightly --version
docs_script:
- cargo +nightly doc
backtraces_impl_backtrace_crate_docs_script:
- cargo +nightly doc --features=backtraces-impl-backtrace-crate
futures_docs_script:
- cargo +nightly doc --features=futures
before_cache_script: rm -rf $CARGO_HOME/registry/index
doc_tests_task:
name: "Documentation Tests"
container:
image: rustlang/rust:nightly
cpu: 1
memory: 4Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
version_information_script:
- rustc +nightly --version
backtraces_impl_backtrace_crate_doctests_script:
- cargo +nightly test --doc --features=backtraces-impl-backtrace-crate
futures_doctests_script:
- cargo +nightly test --doc --features=futures,internal-dev-dependencies
before_cache_script: rm -rf $CARGO_HOME/registry/index
stable_no_std_test_task:
name: "Rust Stable (no_std)"
container:
image: rust:latest
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
setup_script:
- rustup target add thumbv6m-none-eabi
our_error_test_script:
- rustc --version
- cargo build --no-default-features --target thumbv6m-none-eabi
before_cache_script: rm -rf $CARGO_HOME/registry/index
rust_1_81_no_std_test_task:
name: "Rust 1.81 (no_std)"
container:
image: rust:latest
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
setup_script:
- rustup target add thumbv6m-none-eabi
core_error_test_script:
- rustc --version
- cargo build --no-default-features --features=rust_1_81 --target thumbv6m-none-eabi
before_cache_script: rm -rf $CARGO_HOME/registry/index
nightly_test_task:
name: "Rust Nightly"
container:
image: rustlang/rust:nightly
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
setup_script:
- rustup toolchain add stable --profile minimal
primary_test_script:
- rustc +nightly --version
- cargo +nightly test
minimum_version_derive_test_script:
- cp -R snafu-derive snafu-derive-non-workspace
- cd snafu-derive-non-workspace
- echo '[workspace]' >> Cargo.toml
- cargo +nightly -Z minimal-versions update
- cargo +stable build
minimum_version_test_script:
- cargo +nightly -Z minimal-versions update
- cargo +stable test
futures_test_script:
- cd compatibility-tests/futures/
- rustc --version
- cargo test
provider_api_test_script:
- cd compatibility-tests/provider-api/
- rustc --version
- cargo test
report_provider_api_test_script:
- cd compatibility-tests/report-provider-api/
- rustc --version
- cargo test
report_try_trait_test_script:
- cd compatibility-tests/report-try-trait/
- rustc --version
- cargo test
report_provider_api_test_script:
- cd compatibility-tests/backtrace-provider-api/
- rustc --version
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index
# Our Minimal Supported Rust Version (MSRV)
v1_56_test_task:
name: "Rust 1.56"
container:
image: rust:1.56
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
primary_test_script:
- rustup self update
- cd compatibility-tests/v1_56/
- rustc --version
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index
v1_61_test_task:
name: "Rust 1.61"
container:
image: rust:1.61
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
primary_test_script:
- rustup self update
- cd compatibility-tests/v1_61/
- rustc --version
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index