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
- Cache Pods/, ~/.gradle/caches and the Metro transformer cache
- Run iOS and Android builds as parallel matrix legs, not sequentially
- Use DerivedData persistence on the macOS runner for incremental Xcode builds
- 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 assembleReleaseThe 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.
Related
iOSXcode builds from scratch and code signing is fragile in CI.AndroidGradle re-resolves dependencies and the emulator has no hardware acceleration.FlutterThe Flutter SDK and pub cache download on every run, for every platform.FastlaneFastlane lanes spend most of their time on bundle install and signing setup.