Skip to content

Commit 839fc0e

Browse files
committed
#109 perf: optimize CI caching with shared keys and llvm-tools
1 parent 438d17e commit 839fc0e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/reusable-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
- name: Cache cargo
6868
uses: Swatinem/rust-cache@v2
6969
with:
70+
shared-key: "stable"
7071
save-if: ${{ github.ref == 'refs/heads/main' }}
7172

7273
- name: Run clippy
@@ -114,6 +115,7 @@ jobs:
114115
- name: Cache cargo
115116
uses: Swatinem/rust-cache@v2
116117
with:
118+
shared-key: "stable"
117119
save-if: ${{ github.ref == 'refs/heads/main' }}
118120

119121
- name: Verify lockfile is committed
@@ -181,6 +183,8 @@ jobs:
181183

182184
- name: Cache cargo
183185
uses: Swatinem/rust-cache@v2
186+
with:
187+
shared-key: "stable"
184188

185189
- name: Auto-commit changes
186190
if: always()
@@ -216,9 +220,13 @@ jobs:
216220
uses: dtolnay/rust-toolchain@v1
217221
with:
218222
toolchain: stable
223+
components: llvm-tools-preview
219224

220225
- name: Cache cargo
221226
uses: Swatinem/rust-cache@v2
227+
with:
228+
shared-key: "coverage"
229+
save-if: ${{ github.ref == 'refs/heads/main' }}
222230

223231
- name: Install cargo-llvm-cov
224232
uses: taiki-e/install-action@v2

0 commit comments

Comments
 (0)