Skip to content

Commit 9780af9

Browse files
committed
ci: fix sccache in release workflow
Remove rust-cache from release workflow to fix low sccache hit rate (was 24%). Same issue as in CI workflow - rust-cache conflicts with sccache. Changes: - Removed Swatinem/rust-cache from build job - Added CARGO_INCREMENTAL=0 for better sccache performance Expected improvements: - sccache hit rate should increase from 24% to 40-60% - Each target builds independently with sccache GitHub Actions cache - Cache persists across releases (not expiring immediately) Note: First build after this change will still be 0% (cache miss), but subsequent releases will benefit from sccache.
1 parent f6ad14f commit 9780af9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ permissions:
1313
env:
1414
CARGO_TERM_COLOR: always
1515
RUST_BACKTRACE: 1
16+
CARGO_INCREMENTAL: 0 # Disable incremental compilation for better sccache performance
1617

1718
# Cancel previous release workflows if a new tag is pushed
1819
concurrency:
@@ -154,12 +155,6 @@ jobs:
154155
run: |
155156
cargo install cross --git https://github.com/cross-rs/cross
156157
157-
- name: Cache Cargo dependencies
158-
uses: Swatinem/rust-cache@v2
159-
with:
160-
shared-key: release-${{ matrix.target }}
161-
save-if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
162-
163158
- name: Build release binary (with cross)
164159
if: matrix.use_cross == true
165160
run: cross build --release --target ${{ matrix.target }} --locked --verbose

0 commit comments

Comments
 (0)