Skip to content

Commit 03f1c9d

Browse files
committed
CI: Use Swatinem/rust-cache action to simplify Rust dependency caching
1 parent 6bd138c commit 03f1c9d

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,7 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414

15-
- name: Detect the installed Rust version
16-
id: rustc
17-
run: echo "::set-output name=version::$(rustc -V)"
18-
19-
- name: Cache Cargo's registry cache
20-
uses: actions/cache@v2
21-
with:
22-
path: ~/.cargo/registry/cache
23-
key: cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
24-
restore-keys: |
25-
cargo-registry-cache-
26-
27-
- name: Cache Cargo's registry index
28-
uses: actions/cache@v2
29-
with:
30-
path: ~/.cargo/registry/index
31-
key: cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
32-
restore-keys: |
33-
cargo-registry-index-
34-
35-
- name: Cache Cargo's target directory
36-
uses: actions/cache@v2
37-
with:
38-
path: target
39-
key: cargo-build-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
40-
restore-keys: |
41-
cargo-build-${{ steps.rustc.outputs.version }}-
15+
- uses: Swatinem/rust-cache@v2.5.0
4216

4317
- run: cargo run
4418
- run: cp CNAME ./site/

0 commit comments

Comments
 (0)