Skip to content

Commit cfb2c75

Browse files
committed
better cargo caching on ci
1 parent a9b41ad commit cfb2c75

File tree

3 files changed

+8
-29
lines changed

3 files changed

+8
-29
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,7 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v3
2626
- name: Set up cargo cache
27-
uses: actions/cache@v3
28-
with:
29-
path: |
30-
~/.cargo/bin/
31-
~/.cargo/registry/index/
32-
~/.cargo/registry/cache/
33-
~/.cargo/git/db/
34-
target/
35-
key: release-${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}
36-
restore-keys: release-${{ runner.os }}-check-
27+
uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f
3728
- run: cargo build --profile superoptimized --locked
3829
- uses: actions/upload-artifact@v3
3930
with:

.github/workflows/tests.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,9 @@ jobs:
2020
tests:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- name: Free up disk space
24-
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" /var/lib/apt/lists/*
2523
- uses: actions/checkout@v3
2624
- name: Set up cargo cache
27-
uses: actions/cache@v3
28-
continue-on-error: false
29-
with:
30-
path: |
31-
~/.cargo/bin/
32-
~/.cargo/registry/index/
33-
~/.cargo/registry/cache/
34-
~/.cargo/git/db/
35-
target/
36-
key: tests-${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}
37-
restore-keys: tests-${{ runner.os }}-check-
25+
uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f
3826
- run: cargo fmt --all -- --check
3927
- run: cargo clippy
4028
- run: cargo test

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)