Skip to content

ci(mobile): cache deps + parallelize OTA + decouple lint to speed up OTA ~3x#14326

Merged
dylanjeffers merged 1 commit into
mainfrom
claude/goofy-dubinsky-41c87f
May 15, 2026
Merged

ci(mobile): cache deps + parallelize OTA + decouple lint to speed up OTA ~3x#14326
dylanjeffers merged 1 commit into
mainfrom
claude/goofy-dubinsky-41c87f

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

Mobile OTA publish on merge-to-main takes ~21 min today. This PR drops it to ~6-7 min on the critical path with three changes to .github/workflows/mobile.yml.

1. Cache node_modules in mobile-ota-release(-production) — ~5 min saved

The OTA job ran npm ci cold every time (5m37s on run 25822024076). The install job 7 minutes earlier already has the right actions/cache@v4 block — the OTA job was just missing it. Now restored from the same key; install drops to ~30s.

2. Matrix the OTA job over [ios, android] — ~5 min saved

The publish step ran iOS and Android code-push release calls sequentially in one step (10m9s). Now matrixed so the two platforms run as parallel matrix-runs of the same job. Each does its own Metro bundle + S3 upload. fail-fast: false so one platform's failure doesn't kill the other's upload.

3. Split mobile-init into mobile-install + mobile-verify — ~3 min saved on critical path

mobile-init previously did install (~30s) + lint/typecheck (~3m28s) in one job, and every downstream job (OTA + 4 build jobs) had to wait on the full 4m27s before starting.

  • mobile-install — checkout + cache + install only (~1 min).
  • mobile-verify — lint + typecheck, depends on mobile-install. Runs in parallel with all downstream jobs. Still fails the workflow if lint/types break, but no longer gates publish.

All needs: [mobile-init, …] references updated to mobile-install.

New dependency graph

mobile-install (~1m)
├── mobile-verify (~3.5m)         ← runs in parallel, still gates workflow success
├── mobile-version-check (~10s)
│   ├── mobile-ota-release [ios]      ← parallel matrix run
│   ├── mobile-ota-release [android]  ← parallel matrix run
│   └── (native build jobs, gated on version bump as before)

Critical path on the hot path (JS-only merge, no version bump): ~1m install + ~10s version-check + ~5m OTA = ~6-7 min wall-clock, vs. ~21 min before.

Test plan

  • YAML parses cleanly (verified locally with python3 -c \"import yaml; yaml.safe_load(open('.github/workflows/mobile.yml'))\")
  • On merge to main with no version bump:
    • mobile-install runs first and populates the node_modules cache
    • mobile-verify runs in parallel with mobile-ota-release (no longer gates it)
    • mobile-ota-release appears as two parallel matrix runs (ios, android)
    • Both matrix runs hit the node_modules cache (install step ~30s, not ~5min)
    • Both publish to S3 under mobile-ota/bundles/{ios,android}/rc/…
    • Total wall-clock for the run is ~6-7 min vs. the prior ~21 min
  • On a version-bump merge, the native build jobs still run as before (they depend on mobile-install + mobile-version-check, same shape as before)
  • workflow_dispatch with ota_channel=production still triggers the production OTA job (now matrixed)
  • If lint/typecheck breaks on main, the workflow as a whole still fails (via mobile-verify) even though the OTA publish completes

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: 7ed84c6

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

…off OTA runtime

OTA publish on merge-to-main currently takes ~21min. Three changes cut the
critical path to ~6-7min on the hot path (JS-only merges, no version bump):

1. Restore the node_modules cache in mobile-ota-release(-production). The
   previous job ran `npm ci` cold every time (~5m37s); with the same cache
   block as the install job, the install drops to ~30s.

2. Matrix mobile-ota-release(-production) over [ios, android] so the two
   code-push releases run in parallel jobs instead of sequentially in one
   step (~10min → ~5min on the publish step).

3. Split mobile-init into mobile-install (install + cache only, ~1min) and
   mobile-verify (lint + typecheck, ~3.5min). All downstream jobs depend on
   mobile-install; mobile-verify runs in parallel and still fails the
   workflow if lint/types break, but no longer gates publish.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dylanjeffers dylanjeffers force-pushed the claude/goofy-dubinsky-41c87f branch from 423de3d to 7ed84c6 Compare May 15, 2026 18:03
@dylanjeffers dylanjeffers merged commit a15bbea into main May 15, 2026
3 checks passed
@dylanjeffers dylanjeffers deleted the claude/goofy-dubinsky-41c87f branch May 15, 2026 18:26
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