Flutter
Flutter CI on GitHub Actions
The Flutter SDK and pub cache download on every run, for every platform.
110s → 6s
SDK setup
8m → 2m
Test suite
The Flutter SDK and pub cache download on every run, for every platform.
Why it happens
Neither the SDK nor ~/.pub-cache is persisted, and iOS and Android builds each pay separately.
What to change
- Cache the Flutter SDK directory and ~/.pub-cache keyed on the Flutter version
- Build iOS and Android as parallel matrix legs on native runners
- Persist Pods/ and Gradle caches for the native halves
- Run flutter test with --concurrency set to the core count
Flutter on runnerhut
yaml
jobs: test: runs-on: runnerhut-8vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: { flutter-version: '3.27.0', cache: true } - run: flutter pub get - run: flutter test --concurrency 8The 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.FastlaneFastlane lanes spend most of their time on bundle install and signing setup.