@@ -22,31 +22,23 @@ jobs:
22
22
continue-on-error : ${{ matrix.rust == 'nightly' }}
23
23
24
24
steps :
25
- - uses : actions/checkout@v2
25
+ - uses : actions/checkout@v3
26
26
27
27
- name : Restore cargo cache
28
- uses : actions/ cache@v2
28
+ uses : Swatinem/rust- cache@v2
29
29
env :
30
30
cache-name : ci
31
31
with :
32
- path : |
33
- ~/.cargo/registry
34
- ~/.cargo/git
35
- ~/.cargo/bin
36
- target
37
- key : ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
32
+ shared-key : ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}
38
33
39
34
- name : MacOS Workaround
40
35
if : matrix.os == 'macos-latest'
41
36
run : cargo clean -p serde_derive -p thiserror
42
37
43
38
- name : Install Rust
44
- uses : actions-rs/ toolchain@v1
39
+ uses : dtolnay/rust- toolchain@stable
45
40
with :
46
41
toolchain : ${{ matrix.rust }}
47
- default : true
48
- override : true
49
- profile : minimal
50
42
components : clippy
51
43
52
44
- name : Build Debug
@@ -97,15 +89,25 @@ jobs:
97
89
rust : [nightly, stable, '1.65']
98
90
continue-on-error : ${{ matrix.rust == 'nightly' }}
99
91
steps :
100
- - uses : actions/checkout@master
92
+ - uses : actions/checkout@v3
93
+
94
+ - name : Restore cargo cache
95
+ uses : Swatinem/rust-cache@v2
96
+ env :
97
+ cache-name : ci
98
+ with :
99
+ key : ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }}
100
+
101
101
- name : Install Rust
102
- uses : actions-rs/ toolchain@v1
102
+ uses : dtolnay/rust- toolchain@stable
103
103
with :
104
104
toolchain : ${{ matrix.rust }}
105
- profile : minimal
106
- default : true
107
- override : true
108
- target : x86_64-unknown-linux-musl
105
+ targets : x86_64-unknown-linux-musl
106
+
107
+ # The build would fail without manually installing the target.
108
+ # https://github.com/dtolnay/rust-toolchain/issues/83
109
+ - name : Manually install target
110
+ run : rustup target add x86_64-unknown-linux-musl
109
111
110
112
- name : Setup MUSL
111
113
run : |
@@ -133,14 +135,19 @@ jobs:
133
135
rust : [nightly, stable, '1.65']
134
136
continue-on-error : ${{ matrix.rust == 'nightly' }}
135
137
steps :
136
- - uses : actions/checkout@master
138
+ - uses : actions/checkout@v3
139
+
140
+ - name : Restore cargo cache
141
+ uses : Swatinem/rust-cache@v2
142
+ env :
143
+ cache-name : ci
144
+ with :
145
+ key : ubuntu-latest-${{ env.cache-name }}-${{ matrix.rust }}
146
+
137
147
- name : Install Rust
138
- uses : actions-rs/ toolchain@v1
148
+ uses : dtolnay/rust- toolchain@stable
139
149
with :
140
150
toolchain : ${{ matrix.rust }}
141
- profile : minimal
142
- default : true
143
- override : true
144
151
- name : Setup ARM toolchain
145
152
run : |
146
153
rustup target add aarch64-unknown-linux-gnu
@@ -168,12 +175,19 @@ jobs:
168
175
name : Lints
169
176
runs-on : ubuntu-latest
170
177
steps :
171
- - uses : actions/checkout@master
178
+ - uses : actions/checkout@v3
179
+
180
+ - name : Restore cargo cache
181
+ uses : Swatinem/rust-cache@v2
182
+ env :
183
+ cache-name : ci
184
+ with :
185
+ key : ubuntu-latest-${{ env.cache-name }}-stable
186
+
172
187
- name : Install Rust
173
- uses : actions-rs/ toolchain@v1
188
+ uses : dtolnay/rust- toolchain@stable
174
189
with :
175
190
toolchain : stable
176
- override : true
177
191
components : rustfmt
178
192
179
193
- run : cargo fmt -- --check
@@ -199,12 +213,19 @@ jobs:
199
213
name : udeps
200
214
runs-on : ubuntu-latest
201
215
steps :
202
- - uses : actions/checkout@master
216
+ - uses : actions/checkout@v3
217
+
218
+ - name : Restore cargo cache
219
+ uses : Swatinem/rust-cache@v2
220
+ env :
221
+ cache-name : ci
222
+ with :
223
+ key : ubuntu-latest-${{ env.cache-name }}-nightly
224
+
203
225
- name : Install Rust
204
- uses : actions-rs/ toolchain@v1
226
+ uses : dtolnay/rust- toolchain@stable
205
227
with :
206
228
toolchain : nightly
207
- override : true
208
229
209
230
- name : cargo-udeps
210
231
run : |
@@ -217,16 +238,16 @@ jobs:
217
238
name : Security audit
218
239
runs-on : ubuntu-latest
219
240
steps :
220
- - uses : actions/checkout@v2
221
- - uses : actions-rs /audit-check@v1
241
+ - uses : actions/checkout@v3
242
+ - uses : rustsec /audit-check@v1.4.1
222
243
with :
223
244
token : ${{ secrets.GITHUB_TOKEN }}
224
245
225
246
log-test :
226
247
name : Changelog Test
227
248
runs-on : ubuntu-latest
228
249
steps :
229
- - uses : actions/checkout@master
250
+ - uses : actions/checkout@v3
230
251
- name : Extract release notes
231
252
id : extract_release_notes
232
253
uses : ffurrer2/extract-release-notes@v1
0 commit comments