Skip to content

perf(ci): build the iOS IPA in ~4 minutes by reusing the native app - #32

Merged
getBoolean merged 3 commits into
mainfrom
t3/ios-js-only-rebuild
Nov 18, 2026
Merged

getBoolean merged 3 commits into
mainfrom
t3/ios-js-only-rebuild

Conversation

@getBoolean

Copy link
Copy Markdown
Owner

Every release rebuilt the unsigned IPA's native code on an Intel macOS runner: 13–25 min warm, ~80 cold. Most releases change only JavaScript.

The workflow is now three jobs:

  • fingerprint (Linux) computes Expo's native fingerprint, the runtime version expo-updates already embeds, and looks up a native app saved for it and for this workflow file.
  • native (macOS) runs only when none is saved. It runs xcodebuild and the iOS 17 check as before, then saves the .app (enableCrossOsArchive).
  • ipa (Linux) restores the app and regenerates what Xcode's script phases write: main.jsbundle (expo export:embed + hermesc, same arguments as react-native-xcode.sh), its assets, the Info.plist version, and expo-constants' app.config. Then it packages the IPA. Updates are disabled, so expo-updates launches main.jsbundle and never reads app.manifest.

Verification, all on this branch:

Run Path Time
1 single macOS job, native build 31 min
2 single macOS job, JS refresh 10 min; IPA identical to run 1's Xcode build
3 split jobs, native build macOS 35 min + Linux 3 min
4 split jobs, JS refresh 4 min 9 s total, no macOS job
  • The locally computed fingerprint matched the one embedded in the CI-built IPA (76eba841…).
  • On macOS, the refreshed app matched the xcodebuild app byte for byte.
  • On Linux, main.jsbundle differs by 21 KB: Metro sorts require.context files, so the likely cause is the Linux hermesc build laying out the same bytecode differently. EAS Update ships Linux-compiled Hermes bytecode to iOS devices routinely.

Branch caches aren't visible to main, so the first nightly after merge builds the native app once.

Claude Opus 5.5 via Claude Code in T3 Code

The IPA rebuilt every native target on each release (~13 min warm, ~80
cold) though most releases change only JavaScript. Key the built app by
Expo's native fingerprint and, on a hit, regenerate only the Hermes
bundle, assets, Info.plist version, and embedded Expo config.

Claude Opus 5.5 via Claude Code in T3 Code
The fast path spent its time installing packages (4.6 min) and bundling
(3.6 min) on the Intel macOS runner. Fingerprinting, JavaScript refresh,
and packaging need no macOS, so they move to Linux jobs. The macOS job
now only builds and saves the native app when none matches.

Claude Opus 5.5 via Claude Code in T3 Code
@getBoolean
getBoolean merged commit 80df7ea into main Nov 18, 2026
22 checks passed
@getBoolean
getBoolean deleted the t3/ios-js-only-rebuild branch November 18, 2026 04:38
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