Skip to content

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

  1. Cache the Flutter SDK directory and ~/.pub-cache keyed on the Flutter version
  2. Build iOS and Android as parallel matrix legs on native runners
  3. Persist Pods/ and Gradle caches for the native halves
  4. 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 8
A working starting point

The 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.