Skip to content

Commit

Permalink
Use Swatinem/rust-cache@v2 for caching
Browse files Browse the repository at this point in the history
`sccache` does not speedup CI at all, so switching to another
action which is known to be able to actually speedup CI.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
  • Loading branch information
NobodyXu committed Aug 12, 2023
1 parent e9135a6 commit 551ad9b
Showing 1 changed file with 3 additions and 35 deletions.
38 changes: 3 additions & 35 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,7 @@ jobs:

- name: Create Cargo.lock for caching
run: cargo update
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-index-os-check-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-os-check-${{ matrix.target }}
cargo-index-os-check-
cargo-index-
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: Swatinem/rust-cache@v2

- run: |
cargo hack check --feature-powerset --target ${{ matrix.target }} ${{ matrix.args }}
Expand All @@ -81,17 +69,7 @@ jobs:
- name: Create Cargo.lock for caching
run: cargo update
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-index-check-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-check-
cargo-index-
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: Swatinem/rust-cache@v2

- run: ./check.sh

Expand All @@ -108,17 +86,7 @@ jobs:

- name: Create Cargo.lock for caching
run: cargo update
- uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: cargo-index-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-index-build-
cargo-index-
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: Swatinem/rust-cache@v2

- name: Compile tests
run: cargo test --all-features --workspace --no-run
Expand Down

0 comments on commit 551ad9b

Please sign in to comment.