Skip to content

Add sccache to CI builds - #674

Merged
CoffeeFlux merged 6 commits into
TypesettingTools:masterfrom
CoffeeFlux:ci/sccache-prototype
Oct 8, 2026
Merged

CoffeeFlux merged 6 commits into
TypesettingTools:masterfrom
CoffeeFlux:ci/sccache-prototype

Conversation

@CoffeeFlux

Copy link
Copy Markdown
Member

No description provided.

@CoffeeFlux
CoffeeFlux marked this pull request as ready for review August 21, 2026 18:20
@CoffeeFlux
CoffeeFlux requested a review from arch1t3cht August 21, 2026 18:20
@CoffeeFlux

Copy link
Copy Markdown
Member Author

Seems to meaningfully shrink build times, though we'll see for sure if it's merged and we get a week or so of data.

Final AI Agent added 2 commits October 7, 2026 16:16
/usr/bin/clang is the same xcrun shim on Intel and Apple Silicon runners,
so sccache's compiler hash matched across them and arm64 builds were served
x86_64 objects. Factor a per-toolchain key into the hash via
SCCACHE_C_CUSTOM_CACHE_BUSTER.
@CoffeeFlux
CoffeeFlux force-pushed the ci/sccache-prototype branch from 3c3b4d1 to 615dcec Compare October 7, 2026 23:30
Meson wraps compilers it detects itself with sccache when it is on PATH,
including MSVC, so the per-job CC/CXX exports are unnecessary. Compilers
listed in machine files are not wrapped, so the x86_64 cross build never
used sccache; route them through a compiler_cache constant that
tools/sccache.ini overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CoffeeFlux
CoffeeFlux force-pushed the ci/sccache-prototype branch from 615dcec to ecdc0ab Compare October 8, 2026 00:24
CoffeeFlux and others added 3 commits October 7, 2026 18:16
Clang records header mtimes in the PCH, so a PCH served from the cache
is rejected once agi_pre.h has a new mtime on a fresh checkout.
-Xclang -fno-pch-timestamp would avoid that, but sccache does not hash
the PCH contents for its consumers, so a changed precompiled header
could then serve stale objects. Linux already builds without PCH; MSVC
PCH compiles are not cached by sccache, so Windows is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tag builds produce the official release artifacts, and manual dispatches
are how the signing branch runs, so compile those from scratch rather
than from cached objects. Without the action, sccache is not on PATH:
meson does not wrap the compilers and tools/sccache.ini falls back to the
plain cross compilers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Manual dispatches use sccache by default, with a checkbox to compile from
scratch instead (e.g. for signing test runs). Tag builds still never use
it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CoffeeFlux
CoffeeFlux merged commit e71ec2a into TypesettingTools:master Oct 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant