fix: sccache setup and toggle (#10028) (#10043)

* fix: Try and fix sccache toggle...again

Signed-off-by: Gilver <roachy@fyralabs.com>

* Beep

Signed-off-by: Gilver <roachy@fyralabs.com>

* Revert "Beep"

This reverts commit 34ee5aa7fa.

* ?

Signed-off-by: Gilver <roachy@fyralabs.com>

* chore: sccache path

Signed-off-by: Gilver <roachy@fyralabs.com>

* chore: Add back if

Signed-off-by: Gilver <roachy@fyralabs.com>

* The Success

* fix: Reminder to disable autoformatting on Kate again

* feat: sccache summary back

Signed-off-by: Gilver <roachy@fyralabs.com>

---------

Signed-off-by: Gilver <roachy@fyralabs.com>
(cherry picked from commit d2e74d4b37)
Signed-off-by: GildedRoach <GildedRoach@users.noreply.github.com>

# Conflicts:
#	.github/workflows/json-build.yml
This commit is contained in:
Gilver
2026-02-22 19:29:11 -06:00
committed by GitHub
parent 26ec5812ce
commit fd471aef6e
2 changed files with 29 additions and 12 deletions
+9 -1
View File
@@ -6,7 +6,7 @@
// Note: ACTIONS_CACHE_SERVICE_V2 and SCCACHE_GHA_ENABLED are set at workflow level
module.exports = async ({ github, context, core, exec }) => {
// Find sccache path (try which command)
let sccachePath = "sccache";
let sccachePath = "/usr/bin/sccache";
try {
const result = await exec.getExecOutput("which", ["sccache"], {
ignoreReturnCode: true,
@@ -31,6 +31,13 @@ module.exports = async ({ github, context, core, exec }) => {
core.warning(`Could not get sccache version: ${e.message}`);
}
// Enable caching
core.exportVariable("RUSTC_WRAPPER", sccachePath);
core.exportVariable("SCCACHE_GHA_ENABLED", "true");
// Disable Cargo incremental builds to not interfere with caching
core.exportVariable("CARGO_INCREMENTAL", "false");
// Debug: Show what environment variables are available
core.info("=== Environment Variables Diagnostic ===");
core.info(`SCCACHE_GHA_ENABLED: ${process.env.SCCACHE_GHA_ENABLED}`);
@@ -106,6 +113,7 @@ module.exports = async ({ github, context, core, exec }) => {
}
if (bustCache) {
core.exportVariable("SCCACHE_BUST_CACHE", "true");
core.exportVariable("SCCACHE_RECACHE", "1");
core.info("SCCACHE_RECACHE enabled because bust_cache is true");
}