Skip to content

React Native

React Native CI on GitHub Actions

Every build recompiles native iOS and Android dependencies from source.

22m → 7m
iOS build
14m → 4m
Android build

Every build recompiles native iOS and Android dependencies from source.

Why it happens

CocoaPods, Gradle and the Metro cache are all cold, so the native layer rebuilds even for a JS-only change.

What to change

  1. Cache Pods/, ~/.gradle/caches and the Metro transformer cache
  2. Run iOS and Android builds as parallel matrix legs, not sequentially
  3. Use DerivedData persistence on the macOS runner for incremental Xcode builds
  4. Skip the native build entirely when only JS changed, using path filters

React Native on runnerhut

yaml
jobs:
ios:
runs-on: runnerhut-macos-15-m4
steps:
- uses: actions/checkout@v4
- run: cd ios && pod install
- run: npx react-native build-ios --mode Release
android:
runs-on: runnerhut-8vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- run: cd android && ./gradlew assembleRelease
A working starting point

The only runnerhut-specific line is `runs-on: runnerhut-macos-15-m4`. Everything else is standard GitHub Actions — the same actions, the same secrets and the same permissions model you use today.

Your next build could be twice as fast, at half the price

Start free. Migrating away is the same one line, and we publish that diff too.