Skip to content

perf(ci): comprehensive ccache/sccache optimizations — all platforms#433

Merged
BenJule merged 1 commit into
masterfrom
feat/ccache-comprehensive-optimizations
Jun 3, 2026
Merged

perf(ci): comprehensive ccache/sccache optimizations — all platforms#433
BenJule merged 1 commit into
masterfrom
feat/ccache-comprehensive-optimizations

Conversation

@BenJule

@BenJule BenJule commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Properly researched fixes for all platforms based on official documentation.

Windows x64

Removes sccache entirely. Reasons:

  • 0% cache hit rate in every run (sccache GHA backend initialises after MSVC toolchain)
  • Causes C1041 PDB contention (known unresolved issue mozilla/sccache#2320) that neither /FS nor /Z7 in CMAKE_FLAGS can fix reliably for all subprojects
  • The deps cache (165 MB, already working) avoids the slowest part of the build

Keeps CMP0141=NEW + CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded — correct setup per sccache docs should sccache ever be re-enabled.

macOS + Linux (ccache)

Per ccache 4.10 manual:

  • Add include_file_mtime + include_file_ctime to CCACHE_SLOPPINESS: CI file timestamps change between runs causing unnecessary cache misses
  • Add CCACHE_BASEDIR=GITHUB_WORKSPACE: converts absolute paths to relative before hashing → cache hits even if checkout path changes
Windows x64:
- Remove sccache entirely (0% hit rate in all runs, caused C1041 PDB
  contention that /FS could not fix)
- Remove mozilla-actions/sccache-action step
- Remove SCCACHE_GHA_ENABLED env var
- Keep CMP0141=NEW + CMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded
  (correct setup for sccache if ever re-enabled; also harmless without it)

macOS + Linux (ccache):
- Add include_file_mtime + include_file_ctime to CCACHE_SLOPPINESS:
  CI file timestamps change between runs causing unnecessary cache misses
  (documented in ccache manual as recommended for CI)
- Add CCACHE_BASEDIR=GITHUB_WORKSPACE: converts absolute paths to
  relative ones before hashing, allowing cache sharing across different
  checkout paths

Debian + Fedora (cd-packages.yml): same sloppiness + basedir additions

Sources: ccache 4.10 manual (troubleshooting), sccache README (MSVC),
sccache issue bambulab#2320 (C1041 is a known unresolved issue with sccache+MSVC)
@BenJule BenJule self-assigned this Jun 3, 2026
@BenJule BenJule merged commit 585ff98 into master Jun 3, 2026
@BenJule BenJule deleted the feat/ccache-comprehensive-optimizations branch June 3, 2026 11:36
@github-actions github-actions Bot added area: ci GitHub Actions, CI/CD platform: linux Linux-specific issue platform: macos macOS-specific issue platform: windows Windows-specific issue labels Jun 3, 2026
@github-actions github-actions Bot added this to the v02.07.00-dev milestone Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci GitHub Actions, CI/CD platform: linux Linux-specific issue platform: macos macOS-specific issue platform: windows Windows-specific issue

1 participant