Skip to content

Commit 2ceb713

Browse files
authored
Merge pull request #1115 from Turbo87/cache-action
CI: Use `Swatinem/rust-cache` action to simplify Rust dependency caching
2 parents 82dc202 + 03f1c9d commit 2ceb713

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
@@ -11,33 +11,7 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313

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

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

0 commit comments

Comments
 (0)