You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test-shared: use ccache for V8 to avoid up to 6h macOS rebuilds #67303
Since #61860, the darwin jobs in test-shared.yml get V8 from Cachix. When a commit changes one of V8's build inputs (e.g. configure.py, common.gypi, deps/v8), they rebuild it from source instead.
This now takes 3–6h, compared with 20–50 min on a cache hit. On #66823 the aarch64-darwin job took 5h44m, close to the 6h limit. Fork PRs can't push to Cachix, so every push pays this cost again.
This isn't rare: 129 of the 1638 commits on main in the last 90 days touched one of these inputs.
On my fork I tried building V8 with ccache, stored as a single actions/cache entry so it doesn't run into the cache rate limit. Caches saved on main are readable from PRs, so fork PRs would benefit too.
Results on aarch64-linux:
cold: 73 min, 111 MB cache
with the configure.py change from that PR: 100% cache hits, rebuilt in under a minute
output byte-identical to the V8 in Cachix
The setup also works on both macOS runners. The full macOS timings are still running, and I'll post them here. The core of the change is small: v8-ccache.nix (the rest of that branch is measurement scaffolding).
Would something like this be acceptable for test-shared?
This is just one possible approach. Suggestions for simpler or better solutions are welcome, and anyone can take this forward.
Tried ccache on macOS too. It never hits as-is: gyp adds -gdwarf-2 even in Release, and with -g ccache hashes the build dir, which Nix randomizes on darwin.
With -g0 it works: V8 rebuilds in 1-3 min, and the cache drops from 1.9 GB to ~140 MB. A cold build isn't any faster, though, and a V8 upgrade still rebuilds almost everything.
For PRs to benefit, main would also need to save the cache.
Warm rebuild on aarch64-darwin: with -g (0% hits, stopped at 20 min) / with -g0 (1 min)
Activity
inoway46 commentedon Nov 7, 2026
I observed this timeout actually happened recently, but not so frequently.
inoway46 commentedon Nov 7, 2026
Tried ccache on macOS too. It never hits as-is: gyp adds
-gdwarf-2even in Release, and with-gccache hashes the build dir, which Nix randomizes on darwin.With
-g0it works: V8 rebuilds in 1-3 min, and the cache drops from 1.9 GB to ~140 MB. A cold build isn't any faster, though, and a V8 upgrade still rebuilds almost everything.For PRs to benefit, main would also need to save the cache.
Warm rebuild on aarch64-darwin: with
-g(0% hits, stopped at 20 min) / with-g0(1 min)