Skip to content

ci: fix the NDK flake and skip native builds on JS-only changes - #28

Merged
mizanxali merged 1 commit into
mainfrom
ci/native-build-reliability
Oct 16, 2026
Merged

mizanxali merged 1 commit into
mainfrom
ci/native-build-reliability

Conversation

@mizanxali

@mizanxali mizanxali commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • NDK flake: installs the NDK, platforms;android-36 and build-tools;36.0.0 with sdkmanager before Gradle runs, retrying up to 3 times and clearing partial downloads between attempts. Gradle used to download the NDK mid-build, and one corrupt download (Error on ZipFile unknown archive) failed every Gradle retry. That flake failed 4 runs in 3 days, including the first run on main after ci: only build native apps a PR changes #26.
  • Native builds only when native files change: Debug builds don't bundle JS, so JS-only changes (App.tsx, src/, packages/) no longer start native builds.
    • apps/<name>/android/ → Android only.
    • ios/ or Gemfile* → iOS only.
    • package.json → both.
    • The lockfile, root config and .github/ still build every app on both platforms.
    • check keeps its current scoping.
  • Testable app-picking logic: moved into .github/scripts/changed-apps.sh. The changes job runs its test, changed-apps.test.sh, first (13 cases).
  • native roll-up: now if: !cancelled(). When a newer push supersedes a run, the roll-up is skipped instead of failing, so old commits don't go red. A single job cancelled by its timeout still fails it.
  • iOS: ONLY_ACTIVE_ARCH=YES ARCHS=arm64 COMPILER_INDEX_STORE_ENABLE=NO. One simulator architecture, and no index store.

- install ndk, platform and build-tools with sdkmanager before gradle, with
  retries that clear partial downloads (the 'zipfile unknown archive' flake)
- build an app natively only when its android/, ios/, gemfile or package.json
  change, per platform; lockfile and ci changes still build everything
- move the app-picking logic to .github/scripts/changed-apps.sh with a test
- skip the native roll-up when the whole run is cancelled by a newer push
- build ios for arm64 only and skip the index store
@mizanxali
mizanxali merged commit 403429e into main Oct 16, 2026
29 checks passed
@mizanxali
mizanxali deleted the ci/native-build-reliability branch October 16, 2026 13:36
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