Repository navigation
Conversation
Most of the ~32 min iOS build is recompiling unchanged third-party pods (Reanimated, SVG, Screens, Worklets) in Release. Route clang through ccache via USE_CCACHE and persist the cache between runs, skip index store generation, and cache Ruby gems with setup-ruby. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The workflow changes are coherent, scoped to CI, and use safe cache restoration and persistence behavior.
0 open findings
What changed in this PR
Adds ccache-based native compilation caching to reduce iOS CI build times.
Changes:
- Configures Ruby/Bundler and ccache.
- Restores and saves compilation caches around the Release build.
- Disables unnecessary compiler index generation.
| File | Description |
|---|---|
.github/workflows/ios.yml |
Adds Ruby dependency caching and iOS native compilation caching. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🔴 e2e: no tests ran
e2e 0.18.0 · 31.8s · 2 targets (ios, android) · run artifacts |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Xcode does not export the CCACHE_BINARY build setting to the compiler wrapper, so RN's ccache-clang.sh ran plain clang. Backport react/react-native#56612 via a bun patch and drop the explicit modules workaround. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow react-native-reanimated's setup: set ccache as C_COMPILER_LAUNCHER with explicit modules kept on, instead of RN's CC wrapper. This drops the react-native patch for the wrapper's CCACHE_BINARY bug. ccache is configured with --set-config since RN's ccache.conf only applies to the wrapper, and the cache is only saved from main (plus this PR, temporarily). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
The iOS job spends ~32 min in
Build iOS App. React Native core and Hermes are already prebuilt; the time goes to recompiling unchanged third-party pods in Release (RNReanimated 269 files, RNSVG 206, RNScreens 195, RNWorklets 134 …) vs. 42 files forreact-native-pager-view.What
USE_CCACHE_LAUNCHER=1, the Podfile setsC_COMPILER_LAUNCHER=<ccache>andCLANG_ENABLE_EXPLICIT_MODULES_WITH_COMPILER_LAUNCHER=YESon the Pods and app projects. Explicit modules stay on.USE_CCACHECC wrapper isn't used: it silently runs plain clang on Xcode 26 becauseCCACHE_BINARYisn't exported to the wrapper (Fix ccache being silently bypassed on iOS builds react/react-native#56612).--set-config, mirroring RN'sccache.conf, which only applies to that wrapper.~/Library/Caches/ccache) is saved frommainonly; PRs restore from it.ccache --show-stats -vis printed.COMPILER_INDEX_STORE_ENABLE=NOpassed via--extra-params, since CI never uses the index.ruby/setup-rubywithbundler-cacheto stop reinstalling gems on every run.Local builds are unaffected (the launcher is only enabled via env in CI).
Results
With the previous wrapper-based iteration of this PR, a warm cache gave 918/918 hits and a 9.4 min build (from ~32 min). Results for the launcher setup will be added after a warm re-run.
Before merging
pull_requestcondition on "Save ccache" (it's only there to measure warm builds on this PR).🤖 Generated with Claude Code