Skip to content

Commit d7a3ddf

Browse files
aidan-baileyclaude
andcommitted
ci: replace rust-cache with sccache for shared compilation caching
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 25173cc commit d7a3ddf

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ on:
77
branches: [main]
88

99
env:
10+
CARGO_INCREMENTAL: 0
1011
CARGO_TERM_COLOR: always
1112
RUST_BACKTRACE: 1
13+
SCCACHE_GHA_ENABLED: "true"
14+
RUSTC_WRAPPER: "sccache"
1215

1316
jobs:
1417
format:
@@ -29,7 +32,9 @@ jobs:
2932
- uses: dtolnay/rust-toolchain@stable
3033
with:
3134
components: clippy
32-
- uses: Swatinem/rust-cache@v2
35+
- uses: mozilla-actions/sccache-action@v0.0.9
36+
with:
37+
version: "v0.14.0"
3338
- run: cargo clippy --all-targets --all-features -- -D warnings
3439

3540
test:
@@ -38,7 +43,9 @@ jobs:
3843
steps:
3944
- uses: actions/checkout@v4
4045
- uses: dtolnay/rust-toolchain@stable
41-
- uses: Swatinem/rust-cache@v2
46+
- uses: mozilla-actions/sccache-action@v0.0.9
47+
with:
48+
version: "v0.14.0"
4249
- run: cargo test --all-features --workspace
4350

4451
build:
@@ -47,7 +54,7 @@ jobs:
4754
steps:
4855
- uses: actions/checkout@v4
4956
- uses: dtolnay/rust-toolchain@stable
50-
- uses: Swatinem/rust-cache@v2
57+
- uses: mozilla-actions/sccache-action@v0.0.9
5158
with:
52-
cache-on-failure: true
59+
version: "v0.14.0"
5360
- run: cargo build --release --all-features --workspace

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ permissions:
1111
contents: write
1212

1313
env:
14+
CARGO_INCREMENTAL: 0
1415
CARGO_TERM_COLOR: always
1516
RUST_BACKTRACE: 1
17+
SCCACHE_GHA_ENABLED: "true"
18+
RUSTC_WRAPPER: "sccache"
1619

1720
jobs:
1821
version:
@@ -212,9 +215,9 @@ jobs:
212215
with:
213216
targets: ${{ matrix.target }}
214217

215-
- uses: Swatinem/rust-cache@v2
218+
- uses: mozilla-actions/sccache-action@v0.0.9
216219
with:
217-
key: ${{ matrix.target }}
220+
version: "v0.14.0"
218221

219222
- name: Install cross-compilation tools
220223
if: matrix.target == 'aarch64-unknown-linux-gnu'

0 commit comments

Comments
 (0)