Skip to content

ci(mobile): collapse OTA matrix to single job with parallel code-push#14331

Open
dylanjeffers wants to merge 1 commit into
mainfrom
ci/mobile-ota-speed-improvements
Open

ci(mobile): collapse OTA matrix to single job with parallel code-push#14331
dylanjeffers wants to merge 1 commit into
mainfrom
ci/mobile-ota-speed-improvements

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

Builds on #14326 (which already added node_modules cache reuse in the OTA job and decoupled OTA from mobile-verify) by further collapsing the iOS/Android OTA matrix into a single job.

  • The previous matrix (platform: [ios, android]) parallelized publishing but at the cost of running the full setup pipeline — checkout, setup-node, patch checksum, cache restore, npm run postinstall/npm ci, AWS config — on two separate runners. That setup is the bulk of the wall time on each runner.
  • This change runs both platforms on one runner and parallelizes only the code-push create-history/code-push release calls via background processes (ios & android & wait), which is the part that actually benefits from running concurrently. Per-platform stdout/stderr is captured to log files and emitted under ::group:: headers so each platform's output stays readable. Exit status from both platforms is aggregated so a failure on either still fails the job.
  • Applied symmetrically to both mobile-ota-release (rc channel) and mobile-ota-release-production (production channel).

For reference, the three optimizations described in the brief map to:

  1. Cache reuse in OTA — already in main (ci(mobile): cache deps + parallelize OTA + decouple lint to speed up OTA ~3x #14326); cache key npm-cache-mobile-${{ runner.os }}-node-${{ env.NODE_VERSION }}-${{ hashFiles('package-lock.json') }}-${{ steps.patch-file.outputs.patch_checksum }} matches the mobile-install writer, and the install step short-circuits to npm run postinstall on hit.
  2. Parallel iOS + Android code-push — this PR (background processes within one job).
  3. Decouple from verify/lint — already in main (ci(mobile): cache deps + parallelize OTA + decouple lint to speed up OTA ~3x #14326); OTA depends on [mobile-install, mobile-version-check], not mobile-verify.

Test plan

  • Workflow YAML parses (validated locally with python3 -c "import yaml; yaml.safe_load(...)")
  • Trigger an rc OTA release (push to main without a version bump, or workflow_dispatch with ota_channel=rc) and confirm both iOS and Android code-push release calls complete successfully and the published bundles are reachable
  • Trigger a production OTA release via workflow_dispatch with ota_channel=production and confirm the environment approval gate still fires and both platforms publish
  • Force-fail one platform (e.g. invalid OTA_APP_VERSION) and confirm the job still fails even though the other platform succeeded — both logs should appear in the job output

🤖 Generated with Claude Code

The OTA matrix runs ios and android on separate runners, each repeating
the ~5min node_modules setup. Combining both platforms into one job and
running code-push as background processes (`ios & android & wait`) does
the setup once and parallelizes only the publish step, which is the part
that actually benefits from parallelism. Captures per-platform logs into
collapsible groups and aggregates exit status so a failure on either
platform still fails the job.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: fe0f60c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant