WhoBuilt

From Hours to Minutes: Making Your React Native CI Builds 20x Faster

May 19, 2025· 1 h 5 min· 992 views·Watch on YouTube

Speakers

Mihai Peshawa, principal engineer at Callstack, and Mike, Callstack’s CTO and co-founder, present the React Native Enterprise Framework and its CI build reuse approach, with an example from Expensify.

Why React Native CI builds take so long

The speakers outline common pipelines for JavaScript checks, native iOS and Android builds, end-to-end tests, and release previews. They say native builds can take 25 to 40 minutes, while caching dependencies, Xcode derived data, and C++ compilation can help but may be slow or unreliable. They recommend measuring cache performance because large caches can cost more time to retrieve than a fresh install.

A framework for incremental adoption

Callstack’s open-source React Native Enterprise Framework builds on the history of the Community CLI and React Native’s move toward framework-based development. Its design emphasizes modularity, self-hosting, and incremental adoption for both existing React Native projects and native apps adding React Native. Teams can configure platforms, bundlers, plugins, and a remote cache provider.

Reuse native builds through a remote cache

The Expensify demo shows GitHub Actions workflows using the framework to find and reuse native build artifacts. The CLI calculates a fingerprint for the project and checks the remote cache; when it finds a match, it downloads the artifact, and when it does not, it builds locally. In the demonstrated setup, many workflows took about one or two minutes, while a fresh Android build could take around 38 minutes.

Expensify’s build and cost results

For every 25 repository changes at Expensify, about one triggered a native build; the other 24 were JavaScript or other non-native changes. The presenters report that this reduced native builds from every change to 4% of changes, cut monthly GitHub Actions costs for debug iOS and Android builds from about $6,000 to $317, and reduced compute for 25 builds from over 16 hours to about 90 minutes. They say release builds and end-to-end tests remain opportunities for further reuse.

Adoption, integrations, and roadmap

The speakers describe creating a project with `npm create rnf-app` or migrating from the Community CLI, then adding remote caching as needed. They discuss integrating with Fastlane and implementing cache providers for other storage systems, while noting that GitHub Actions support is available out of the box. They also mention roadmap items including more cache providers, continuous native generation, out-of-tree platforms, and mobile micro-frontends.

Takeaways

  • Measure cache retrieval and setup time against a fresh build before adopting a caching strategy.
  • Check how often changes affect native code; if most changes are JavaScript-only, native build reuse may save substantial CI time.
  • Use project fingerprints to reuse native artifacts when the relevant project inputs have not changed.
  • Adopt the framework incrementally: migrate the CLI first, then add remote caching or brownfield support as needed.

Mentioned in this talk

Search inside this talk

What was claimed 12

Related talks