Skip to content

Commit d828777

Browse files
committed
GitHub CI: Update Swatinem/rust-cache config
1 parent 98bf467 commit d828777

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.github/workflows/benchmark.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737

3838
# restore cargo cache from previous runs
3939
- name: Rust Cache
40-
uses: Swatinem/rust-cache@v2.0.0
40+
uses: Swatinem/rust-cache@v2
41+
with:
42+
# The cache should not be shared between different workflows and jobs.
43+
shared-key: ${{ github.workflow }}-${{ github.job }}
4144

4245
## Benchmarks
4346
- name: install valgrind for benchmarks

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ jobs:
3939
- name: Rust Cache
4040
uses: Swatinem/rust-cache@v2
4141
with:
42-
# Distinguished by the action name to avoid sharing!
43-
shared-key: "rust"
42+
# The cache should not be shared between different workflows and jobs.
43+
shared-key: ${{ github.workflow }}-${{ github.job }}
4444

4545
# check it builds
4646
- name: Build

.github/workflows/msrv.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
- name: Cache Rust toolchain and build artifacts
3737
uses: Swatinem/rust-cache@v2
3838
with:
39-
# Distinguished by the action name to avoid sharing!
40-
shared-key: "msrv"
39+
# The cache should not be shared between different workflows and jobs.
40+
shared-key: ${{ github.workflow }}-${{ github.job }}
4141

4242
- name: Check workspace
4343
run: cargo check --locked --workspace --verbose --all-targets --all-features

.github/workflows/pre-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
- name: Cache Rust toolchain and build artifacts
4545
uses: Swatinem/rust-cache@v2
4646
with:
47-
# Distinguished by the action name to avoid sharing across different actions!
48-
shared-key: "pre-commit"
47+
# The cache should not be shared between different workflows and jobs.
48+
shared-key: ${{ github.workflow }}-${{ github.job }}
4949

5050
- name: Detect code style issues (push)
5151
uses: pre-commit/action@v3.0.0

0 commit comments

Comments
 (0)