Cap the Xcode compilation cache and tighten the native CI path filter - #33
Merged
Merged
Conversation
janicduplessis
force-pushed
the
@janic/ci-cache-tuning
branch
from
September 23, 2026 20:27
a7542f6 to
90e524a
Compare
janicduplessis
marked this pull request as ready for review
September 23, 2026 22:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to #29's native CI changes, both in
.github/workflows/ci.yml.The path filter skipped both native jobs for non-ASCII paths. By default
git diff --name-onlyprints such a path quoted and octal-escaped ("example/ios/R\303\251glages.swift"), so the^-anchored patterns didn't match. The diff now runs withgit -c core.quotePath=false. Paths containing",\or control characters are still quoted, becausecore.quotePathdoesn't apply to those. The iOS list also gainsexample/.bundle/: itsconfigfile affectsbundle install, butexample/[^/]+$only covers top-level files.Cap the Xcode compilation cache at 1 GB. The
ios-cas-*cache only grows within one lockfile generation, because each new key saves the restored CAS plus the new entries.COMPILATION_CACHE_LIMIT_SIZE=1Gmakes Xcode prune it. Without it, the limit is half of the free disk space plus the current CAS size. The setting isn't in Xcode 26.6's.xcspecfiles, but Xcode 26.6'sSWBCorereads it. swift-build parses the value as bytes or a number with aK/M/G/Tsuffix (CASOptions.swift), and the build's prune tasks enforce it (CompilationCachingDataPruner.swift). Pruning is generational. The on-disk CAS starts a new generation once its primary directory passes half the limit (UnifiedOnDiskCache.cpp), copies entries forward as they are used, and deletes the older generation on a later build. The directory therefore stays at about 1 GB plus one build. One cold build of the example is about 474 MiB, just under the 512 MiB rotation point (179 MB compressed in the Actions cache), so a lockfile generation rotates after its first few native source changes. Cache hits carry over (see the100Mrun below).Test plan
git diffvscore.quotePath=false:example/ios/Réglages.swift:ios=false→ios=trueandroid/src/main/java/Ünï.kt:android=false→android=trueexample/.bundle/config:ios=false→ios=true,android=falsedocs/README.md:false falseeither wayxcodebuildcommand:100Mlogsnote: cache size (497295101 bytes) larger than size limit (104857600 bytes)and rotates the CAS generation, and all 380 compile tasks are still cache hits.1Glogs no note.iosrestored main's CAS and got 385 cache hits, 0 misses and no size-limit note. Across three attemptsiostook 2m02s–2m28s andxcodebuild36–44 s. The cap isn't meant to change build time.