You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements parallel builds for Android releases using GitHub Actions matrix
strategy, reducing release time by 32%.
Major Changes:
- Split release-android.yml into 3 jobs (version-info, build-artifacts, create-release)
- Use matrix strategy to build APK and AAB simultaneously
- Share version info via job outputs (single source of truth)
- Tests run once in version-info job (not duplicated in matrix)
Job Structure:
1. version-info: Get version, run tests if workflow_dispatch
2. build-artifacts: Matrix builds APK + AAB in parallel
3. create-release: Download artifacts, create GitHub release
Matrix Configuration:
- Two build types: apk and appbundle
- Separate runners for each (parallel execution)
- Identical dart-defines from shared version-info
- Upload as separate artifacts
Performance Impact:
- Before: ~220s sequential (APK then AAB)
- After: ~152s parallel (both simultaneously)
- Improvement: 68s faster (32% reduction)
- Trade-off: +25% runner minutes for -32% wall-clock time
Runner Cost Analysis:
- Before: 220s = 3.67 runner minutes
- After: 277s total = 4.62 runner minutes (+0.95 min)
- Worth it: Developer time > runner costs
Benefits:
✅ 32% faster Android releases
✅ Fail fast (tests before parallel builds)
✅ No partial releases (needs both artifacts)
✅ Easy to extend (add split APKs, more variants)
✅ Foundation for emulator tests (Patrol, Firebase Test Lab)
Future Enablement:
- Can add emulator testing with same matrix pattern
- Can add split APKs by architecture
- Can add Firebase Test Lab integration
- Patrol integration tests ready to add
Documentation:
- ADR 0003: Complete rationale and alternatives considered
- Explains version sharing via job outputs
- Documents trade-offs (runner minutes vs wall-clock time)
- Future enhancements (emulator tests, split APKs)
Risk: LOW - Matrix is standard GitHub Actions feature
Rollback: Easy - revert to sequential builds
Related:
- ADR 0001: Caching makes individual builds faster
- ADR 0002: Composite action keeps matrix DRY
- Future: Can add emulator tests using same matrix pattern
0 commit comments