ci: set CARGO_INCREMENTAL=0 to prevent sccache from being bypassed

- sccache silently skips caching when incremental compilation is enabled, making the wrapper a no-op.
- Applied fix to both the shared build-native action and the CI workflow setup step.
This commit is contained in:
can1357
2026-05-27 02:09:14 +02:00
parent e5bb017b21
commit 58d95ae258
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -60,11 +60,17 @@ runs:
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.10
- name: Enable sccache for cargo
# `CARGO_INCREMENTAL=0` is required: sccache silently skips caching
# when incremental is enabled, which would turn the wrapper into a
# no-op. rust-cache also sets this today, but pin it here so sccache
# stays effective if rust-cache is removed or changes defaults. Also
# overrides `profile.dev.incremental = true` for `bun run test:rs`.
shell: bash
run: |
{
echo "SCCACHE_GHA_ENABLED=true"
echo "RUSTC_WRAPPER=sccache"
echo "CARGO_INCREMENTAL=0"
} >> "$GITHUB_ENV"
- uses: taiki-e/install-action@v2
if: inputs.target == ''
+1
View File
@@ -261,6 +261,7 @@ jobs:
{
echo "SCCACHE_GHA_ENABLED=true"
echo "RUSTC_WRAPPER=sccache"
echo "CARGO_INCREMENTAL=0"
} >> "$GITHUB_ENV"
- name: Cache bun dependencies
uses: actions/cache@v4