Skip to content

Commit 869bdcd

Browse files
authored
CI: Use Swatinem/rust-cache for caching (#18)
1 parent 7041d8a commit 869bdcd

File tree

2 files changed

+1
-62
lines changed

2 files changed

+1
-62
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -31,44 +31,6 @@ jobs:
3131
profile: minimal
3232
override: true
3333

34-
- name: Cache cargo registry cache
35-
uses: actions/cache@v1
36-
with:
37-
path: ~/.cargo/registry/cache
38-
key: ${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
39-
restore-key: |
40-
${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}-
41-
${{ runner.os }}-cargo-registry-cache-
42-
43-
- name: Cache cargo registry index
44-
uses: actions/cache@v1
45-
with:
46-
path: ~/.cargo/registry/index
47-
key: ${{ runner.os }}-cargo-registry-index-${{ github.ref }}-${{ github.sha }}
48-
restore-key: |
49-
${{ runner.os }}-cargo-registry-index-${{ github.ref }}-
50-
${{ runner.os }}-cargo-registry-index-refs/heads/master-
51-
52-
# Uncomment the following if a git dependency is added to `Cargo.toml`
53-
#- name: Cache cargo git db
54-
# uses: actions/cache@v1
55-
# with:
56-
# path: ~/.cargo/git/db
57-
# key: ${{ runner.os }}-cargo-git-db-${{ github.ref }}-${{ hashFiles('**/Cargo.toml') }}
58-
# restore-key: |
59-
# ${{ runner.os }}-cargo-git-db-${{ github.ref }}-
60-
# ${{ runner.os }}-cargo-git-db-refs/heads/master-${{ hashFiles('**/Cargo.toml') }}
61-
# ${{ runner.os }}-cargo-git-db-refs/heads/master-
62-
63-
- name: Cache cargo build
64-
uses: actions/cache@v1
65-
with:
66-
path: target
67-
key: ${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ github.ref }}-${{ hashFiles('**/Cargo.toml') }}
68-
restore-key: |
69-
${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-${{ github.ref }}-
70-
${{ runner.os }}-cargo-build-target-${{ matrix.rust }}-refs/heads/master-
71-
7234
- name: Install ${{ matrix.rust }} Rust
7335
run: |
7436
if [[ ! -d "$HOME/.cargo" || ! -d "$HOME/.rustup" ]]; then
@@ -85,8 +47,7 @@ jobs:
8547
rustup component add rustfmt
8648
rustup component add clippy
8749
88-
- name: Cargo clean on new rustc version
89-
run: script/ci/cargo-clean-on-new-rustc-version.sh
50+
- uses: Swatinem/[email protected]
9051

9152
- name: Lint
9253
if: matrix.rust == 'stable'

script/ci/cargo-clean-on-new-rustc-version.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)