From 58d95ae258720c9dda61877733e93881f7d74de7 Mon Sep 17 00:00:00 2001 From: can1357 Date: Wed, 27 May 2026 02:09:14 +0200 Subject: [PATCH] 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. --- .github/actions/build-native/action.yml | 6 ++++++ .github/workflows/ci.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/actions/build-native/action.yml b/.github/actions/build-native/action.yml index efe570f68..10bd00f85 100644 --- a/.github/actions/build-native/action.yml +++ b/.github/actions/build-native/action.yml @@ -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 == '' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35da4b2eb..b838310ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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