9
9
runs-on : ubuntu-22.04
10
10
11
11
steps :
12
- - uses : briansmith/actions-rs-toolchain@v1
13
- with :
14
- toolchain : stable
15
- profile : minimal
16
- components : rustfmt
17
- - uses : briansmith/actions-checkout@v2
12
+ - run : rustup --version
13
+
14
+ - uses : briansmith/actions-checkout@v4
18
15
with :
19
16
persist-credentials : false
17
+
20
18
- run : cargo fmt --all -- --check
21
19
22
20
clippy :
23
21
runs-on : ubuntu-22.04
24
22
25
23
steps :
26
- - uses : briansmith/actions-rs-toolchain@v1
27
- with :
28
- toolchain : stable
29
- profile : minimal
30
- components : clippy
24
+ - run : rustup --version
31
25
32
- - uses : briansmith/actions-checkout@v2
26
+ - uses : briansmith/actions-checkout@v4
33
27
with :
34
28
persist-credentials : false
35
29
@@ -39,22 +33,20 @@ jobs:
39
33
runs-on : ubuntu-22.04
40
34
41
35
steps :
42
- - uses : briansmith/actions-rs-toolchain@v1
43
- with :
44
- toolchain : stable
45
- profile : minimal
36
+ - run : rustup --version
46
37
47
- - uses : briansmith/actions-cache@v2
38
+ - uses : briansmith/actions-cache@v3
48
39
with :
49
40
path : |
50
41
~/.cargo/bin/cargo-audit
51
42
~/.cargo/.crates.toml
52
43
~/.cargo/.crates2.json
53
- key : ${{ runner.os }}-v2-cargo-audit-0.13.1
44
+ key : ${{ runner.os }}-v2-cargo-audit-0.17.4
54
45
55
- - run : cargo install cargo-audit --vers "0.13.1"
46
+ # With `--locked` `cargo install` complains about using yanked crates.
47
+ - run : cargo install cargo-audit --vers "0.17.4"
56
48
57
- - uses : briansmith/actions-checkout@v2
49
+ - uses : briansmith/actions-checkout@v4
58
50
with :
59
51
persist-credentials : false
60
52
@@ -66,22 +58,19 @@ jobs:
66
58
runs-on : ubuntu-22.04
67
59
68
60
steps :
69
- - uses : briansmith/actions-rs-toolchain@v1
70
- with :
71
- toolchain : stable
72
- profile : minimal
61
+ - run : rustup --version
73
62
74
- - uses : briansmith/actions-cache@v2
63
+ - uses : briansmith/actions-cache@v3
75
64
with :
76
65
path : |
77
66
~/.cargo/bin/cargo-deny
78
67
~/.cargo/.crates.toml
79
68
~/.cargo/.crates2.json
80
- key : ${{ runner.os }}-v2-cargo-deny-locked-0.8.5
69
+ key : ${{ runner.os }}-v2-cargo-deny-locked-0.9.1
81
70
82
- - run : cargo install cargo-deny --locked --vers "0.8.5 "
71
+ - run : cargo install cargo-deny --locked --vers "0.9.1 "
83
72
84
- - uses : briansmith/actions-checkout@v2
73
+ - uses : briansmith/actions-checkout@v4
85
74
with :
86
75
persist-credentials : false
87
76
@@ -98,17 +87,10 @@ jobs:
98
87
- beta
99
88
- nightly
100
89
101
- include :
102
- - target : x86_64-unknown-linux-gnu
103
-
104
90
steps :
105
- - uses : briansmith/actions-rs-toolchain@v1
106
- with :
107
- override : true
108
- target : ${{ matrix.target }}
109
- toolchain : ${{ matrix.rust_channel }}
91
+ - run : rustup --version
110
92
111
- - uses : briansmith/actions-checkout@v2
93
+ - uses : briansmith/actions-checkout@v4
112
94
with :
113
95
persist-credentials : false
114
96
@@ -119,12 +101,7 @@ jobs:
119
101
runs-on : ubuntu-22.04
120
102
121
103
steps :
122
- - uses : briansmith/actions-rs-toolchain@v1
123
- with :
124
- toolchain : stable
125
- profile : minimal
126
-
127
- - uses : briansmith/actions-checkout@v2
104
+ - uses : briansmith/actions-checkout@v4
128
105
with :
129
106
persist-credentials : false
130
107
@@ -165,11 +142,6 @@ jobs:
165
142
166
143
- beta
167
144
168
- exclude :
169
- # 1.46.0 doesn't support `-Clink-self-contained`.
170
- - target : x86_64-unknown-linux-musl
171
- rust_channel : 1.46.0
172
-
173
145
include :
174
146
- target : aarch64-pc-windows-msvc
175
147
host_os : windows-latest
@@ -192,19 +164,16 @@ jobs:
192
164
- if : ${{ contains(matrix.host_os, 'ubuntu') }}
193
165
run : sudo apt-get update -y
194
166
195
- - uses : briansmith/actions-checkout@v2
167
+ - uses : briansmith/actions-checkout@v4
196
168
with :
197
169
persist-credentials : false
198
170
171
+ - run : rustup toolchain add --profile=minimal ${{ matrix.rust_channel }}
172
+ - run : rustup target add --toolchain=${{ matrix.rust_channel }} ${{ matrix.target }}
173
+
199
174
- if : ${{ !contains(matrix.host_os, 'windows') }}
200
175
run : mk/install-build-tools.sh --target=${{ matrix.target }} ${{ matrix.features }}
201
176
202
- - uses : briansmith/actions-rs-toolchain@v1
203
- with :
204
- override : true
205
- target : ${{ matrix.target }}
206
- toolchain : ${{ matrix.rust_channel }}
207
-
208
177
- if : ${{ matrix.target == 'aarch64-apple-darwin' }}
209
178
run : echo "DEVELOPER_DIR=/Applications/Xcode_12.2.app/Contents/Developer" >> $GITHUB_ENV
210
179
@@ -215,26 +184,27 @@ jobs:
215
184
216
185
- if : ${{ !contains(matrix.host_os, 'windows') }}
217
186
run : |
218
- mk/cargo.sh test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
187
+ mk/cargo.sh +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
219
188
220
189
- if : ${{ contains(matrix.host_os, 'windows') }}
221
190
run : |
222
- cargo test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
191
+ cargo +${{ matrix.rust_channel }} test -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
223
192
224
193
# rcgen-based tests require Rust 1.67.
225
194
- if : ${{ !contains(matrix.host_os, 'windows') && !contains(matrix.rust_channel, '1.61.0') }}
226
195
run : |
227
- mk/cargo.sh test -p rcgen-tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
196
+ mk/cargo.sh +${{ matrix.rust_channel }} test -p rcgen-tests -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
228
197
229
198
# rcgen-based tests require Rust 1.67, and uses *ring* 0.16 which doesn't build for aarch64-pc-windows-msvc.
230
199
- if : ${{ contains(matrix.host_os, 'windows') && !contains(matrix.rust_channel, '1.61.0') && !contains(matrix.target, 'aarch64-pc-windows-msvc') }}
231
200
run : |
232
- cargo test -vv -p rcgen-tests --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
201
+ cargo +${{ matrix.rust_channel }} test -vv -p rcgen-tests --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
233
202
234
203
coverage :
235
204
runs-on : ${{ matrix.host_os }}
236
205
237
206
strategy :
207
+ fail-fast : false
238
208
matrix :
239
209
features :
240
210
- --all-features
@@ -259,24 +229,21 @@ jobs:
259
229
- if : ${{ contains(matrix.host_os, 'ubuntu') }}
260
230
run : sudo apt-get update -y
261
231
262
- - uses : briansmith/actions-checkout@v2
232
+ - uses : briansmith/actions-checkout@v4
263
233
with :
264
234
persist-credentials : false
265
235
236
+ - run : rustup toolchain add --profile=minimal ${{ matrix.rust_channel }}
237
+ - run : rustup target add --toolchain=${{ matrix.rust_channel }} ${{ matrix.target }}
238
+
266
239
- if : ${{ !contains(matrix.host_os, 'windows') }}
267
240
run : RING_COVERAGE=1 mk/install-build-tools.sh --target=${{ matrix.target }} ${{ matrix.features }}
268
241
269
- - uses : briansmith/actions-rs-toolchain@v1
270
- with :
271
- override : true
272
- target : ${{ matrix.target }}
273
- toolchain : ${{ matrix.rust_channel }}
274
-
275
242
- if : ${{ !contains(matrix.host_os, 'windows') }}
276
243
run : |
277
244
RING_COVERAGE=1 mk/cargo.sh +${{ matrix.rust_channel }} test --workspace -vv --target=${{ matrix.target }} ${{ matrix.cargo_options }} ${{ matrix.features }} ${{ matrix.mode }}
278
245
279
- - uses : briansmith/codecov-codecov-action@v1
246
+ - uses : briansmith/codecov-codecov-action@v3
280
247
with :
281
248
directory : ./target/${{ matrix.target }}/debug/coverage/reports
282
249
fail_ci_if_error : true
0 commit comments