Android emulator
Android emulator CI on GitHub Actions
Instrumentation tests take 40 minutes because the emulator runs in software.
4m → 25s
Emulator boot
40m → 9m
Test suite
Instrumentation tests take 40 minutes because the emulator runs in software.
Why it happens
Without /dev/kvm the emulator falls back to software rendering, which is roughly ten times slower.
What to change
- Run on a runner that exposes KVM to the job
- Cache the AVD snapshot so the emulator boots warm
- Use a headless system image without Google Play services where possible
- Shard instrumentation tests across several emulator instances
Android emulator on runnerhut
yaml
jobs: instrumentation: runs-on: runnerhut-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - run: ls -l /dev/kvm - uses: reactivecircus/android-emulator-runner@v2 with: api-level: 34 arch: x86_64 script: ./gradlew connectedDebugAndroidTestThe only runnerhut-specific line is `runs-on: runnerhut-8vcpu-ubuntu-2404`. 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
React NativeEvery build recompiles native iOS and Android dependencies from source.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.