@@ -74,18 +74,10 @@ jobs:
74
74
toolchain : stable
75
75
override : true
76
76
77
- - uses : actions/cache@v3
78
- name : Cache Cargo.lock
77
+ - name : Rust Cache
78
+ uses : Swatinem/rust-cache@v2
79
79
with :
80
- path : |
81
- ~/.cargo/bin/
82
- ~/.cargo/registry/
83
- ~/.cargo/git/
84
- target/
85
- key : cargo-${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}-${{ matrix.project }}-${{ hashFiles('Cargo.lock') }}
86
- restore-keys : |
87
- cargo-${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}-${{ matrix.project }}-
88
- cargo-${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}-
80
+ key : ${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}
89
81
90
82
- name : Install cargo tools
91
83
if : ${{ steps.cargo-cache.outputs.cache-hit == false }}
@@ -139,7 +131,7 @@ jobs:
139
131
override : true
140
132
141
133
- name : Rust Cache
142
- uses : Swatinem/rust-cache@v2.0.1
134
+ uses : Swatinem/rust-cache@v2
143
135
with :
144
136
key : ${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}
145
137
@@ -187,26 +179,15 @@ jobs:
187
179
toolchain : stable
188
180
override : true
189
181
190
- # Get the matrix build cache for mithril-core
191
- # Note: cargo tools will be included so there's no need to install them
192
- - uses : actions/cache@v3
193
- name : Cache Cargo.lock
182
+ - name : Rust Cache
183
+ uses : Swatinem/rust-cache@v2
194
184
with :
195
- path : |
196
- ~/.cargo/bin/
197
- ~/.cargo/registry/
198
- ~/.cargo/git/
199
- target/
200
- key : cargo-${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}-mithril-core-${{ hashFiles('Cargo.lock') }}
201
- restore-keys : |
202
- cargo-${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}-mithril-core
203
- cargo-${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}-
185
+ key : ${{ runner.os }}-cache-v${{ secrets.CACHE_VERSION }}
204
186
205
187
- name : Install cargo tools
206
188
if : ${{ steps.cargo-cache.outputs.cache-hit == false }}
207
189
run : |
208
190
cargo install cargo2junit 2>/dev/null || true # Suppress the "binary `xyz` already exists in destination" error
209
- cargo install cargo-sort 2>/dev/null || true
210
191
211
192
- name : Cargo build
212
193
uses : actions-rs/cargo@v1
0 commit comments