Skip to content

Commit b91f2b7

Browse files
committed
chore: add RUST_CACHE_KEY on CI to manually purge rust-cache
1 parent 900f6c8 commit b91f2b7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ on:
1515
- "**.txt"
1616
- "docs/**"
1717

18+
env:
19+
# Set the new value when the cache grows too much and we hit the runner's disk space limit
20+
# via https://github.com/rust-lang/docs.rs/pull/2433
21+
RUST_CACHE_KEY: rust-cache-20250522
22+
1823
jobs:
1924
lint:
2025
name: lint
@@ -30,6 +35,7 @@ jobs:
3035
with:
3136
# Use a common cache for the basic compilation/formatter/clippy checks
3237
shared-key: ${{ github.workflow }}-shared
38+
prefix-key: ${{ env.RUST_CACHE_KEY }}
3339
save-if: ${{ github.ref == 'refs/heads/next' }}
3440
- name: Install cargo-make
3541
run: |
@@ -58,6 +64,7 @@ jobs:
5864
with:
5965
# Use a common cache for the basic compilation/formatter/clippy checks
6066
shared-key: ${{ github.workflow }}-shared
67+
prefix-key: ${{ env.RUST_CACHE_KEY }}
6168
# But do not save this cache, just use it
6269
save-if: false
6370
- name: Install cargo-make
@@ -84,6 +91,7 @@ jobs:
8491
# NOTE: We use a different cache for the tests, so they can be run in parallel, but we
8592
# also share the cache for the tests for efficiency
8693
shared-key: ${{ github.workflow }}-shared-tests
94+
prefix-key: ${{ env.RUST_CACHE_KEY }}
8795
save-if: ${{ github.ref == 'refs/heads/next' }}
8896
- name: Install cargo-make
8997
run: |
@@ -126,6 +134,7 @@ jobs:
126134
uses: Swatinem/rust-cache@v2
127135
with:
128136
shared-key: ${{ github.workflow }}-shared-tests
137+
prefix-key: ${{ env.RUST_CACHE_KEY }}
129138
# Do not persist the cache, leave that to the unit tests, we just use the cache here
130139
save-if: false
131140
- name: Install cargo-make
@@ -153,6 +162,7 @@ jobs:
153162
uses: Swatinem/rust-cache@v2
154163
with:
155164
shared-key: ${{ github.workflow }}-shared-tests
165+
prefix-key: ${{ env.RUST_CACHE_KEY }}
156166
# Do not persist the cache, leave that to the unit tests, we just use the cache here
157167
save-if: false
158168
- name: Install cargo-make

0 commit comments

Comments
 (0)