Skip to content

perf(ci): Parallelize screenshot generation across CI jobs#113

Draft
philprime wants to merge 1 commit intomainfrom
perf/parallel-screenshots
Draft

perf(ci): Parallelize screenshot generation across CI jobs#113
philprime wants to merge 1 commit intomainfrom
perf/parallel-screenshots

Conversation

@philprime
Copy link
Member

Parallelize App Store screenshot generation to reduce release workflow time.

Previously, fastlane snapshot ran screenshots in 2 batches (iPhones, then iPads), rebuilding the test target for each batch. With 4 devices this took ~48 minutes — most of it building, not testing (actual UI tests take <1 min per device).

This PR introduces a build-once + run-per-device approach:

  1. Build phase: build_screenshots lane runs xcodebuild build-for-testing once
  2. Run phase: run_screenshot_on_device lane runs test-without-building on a single device with status bar override
  3. Collect phase: collect_screenshots gathers PNGs into fastlane/screenshots/en-US/

The release workflow is restructured into parallel jobs:

  • release-build — IPA build, validation, Sentry setup (runs in parallel with screenshots)
  • build-screenshots — single test bundle build
  • screenshot (matrix: 4 devices) — parallel per-device test execution
  • release-upload — collects everything, uploads to App Store

Benefits:

  • Eliminates duplicate builds (was 2, now 1)
  • IPA build and screenshot build run in parallel
  • Per-device jobs can be retried individually on failure
  • No resource contention — each device gets its own runner

New lanes release_ci_build and release_ci_upload split the monolithic release_ci for the multi-job workflow. The original release_ci lane is preserved for single-job use.

Split screenshot generation into build-once + run-per-device jobs
to eliminate fastlane snapshot's per-device-family rebuild and enable
targeted retries on failure.

New lanes:
- build_screenshots: xcodebuild build-for-testing (single build)
- run_screenshot_on_device: test-without-building on one device
- collect_screenshots: gather results into fastlane/screenshots/
- generate_screenshots_parallel: local convenience lane

Split release_ci into release_ci_build + release_ci_upload so the
release workflow can run IPA build and screenshot generation in
parallel, then combine for App Store upload.
@sentry
Copy link

sentry bot commented Mar 20, 2026

Sentry Build Distribution

App Name App ID Version Configuration Install Page
Flinky com.techprimate.Flinky 1.1.3 (48) -- Install Build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant