ci: per-app build matrix with precise path triggers#1112
Conversation
Replaces the LLM-only Android/iOS build workflows with one matrix-based workflow per platform that gates each app's build on `dorny/paths-filter`. Adds coverage for computer-vision, speech, text-embeddings, and bare-rn demos, plus a Jest smoke test for bare-rn. Skips builds on draft PRs and fires on ready_for_review so flipping a draft to ready triggers CI. Closes #963.
| computer-vision: | ||
| - *expo-shared | ||
| - packages/react-native-executorch/common/rnexecutorch/models/VisionModel.{cpp,h} | ||
| - packages/react-native-executorch/common/rnexecutorch/models/{classification,instance_segmentation,object_detection,ocr,semantic_segmentation,style_transfer,text_to_image,vertical_ocr}/** |
There was a problem hiding this comment.
these and speech models should be gathered is a separate PR to separate subdirs to exclude this too long inclusion lines.
… hash - bundle job now runs `yarn prepare` before bundling bare-rn so react-native-executorch-bare-resource-fetcher's lib/ exists for metro (Expo apps don't need it; expo export resolves workspace deps directly). - iOS composite caches CocoaPods recipes + installed Pods keyed by Podfile.lock, saving ~3-5 min per cell on cache hits. - compute-app-hash.js excludes .github/workflows/build-apps.yml from the content hash. Workflow edits still trigger the matrix, but each cell hits its existing marker and skips. Build-behavior workflow edits (with:, runs-on:, env:) need a manual cache clear via the UI.
There was a problem hiding this comment.
i know this is a tiny script, but please use TS instead of JS
There was a problem hiding this comment.
i know this is a tiny script, but please use TS instead of JS
| jobs: | ||
| check: | ||
| if: github.repository == 'software-mansion/react-native-executorch' | ||
| if: github.repository == 'software-mansion/react-native-executorch' && github.event.pull_request.draft != true |
There was a problem hiding this comment.
isn't this enough?
pull_request:
types: [review_requested, ready_for_review]
There was a problem hiding this comment.
Specifying types: overrides the defaults [opened, synchronize, reopened], so [review_requested, ready_for_review] alone would mean:
- pushes to a non-draft PR (
synchronize) would not trigger the docs build, - and a PR opened directly as non-draft (no review yet requested) wouldn't either.
The current set + draft != true guard preserves the default "run on every push to non-draft PRs" behavior while also triggering once on the draft→ready transition.
Description
Replaces the LLM-only build workflows with one matrix-based
build-apps.yml, gated bydorny/paths-filterso each app/platform cell runs only when its code or shared infrastructure changes.Three parallel matrices per push:
Cells skip in ~30s via content-hash cache markers when their relevant files haven't changed since the last passing run.
A lint-time drift check fails PRs that introduce source files not covered by any per-app filter.
Adds a Jest smoke test for bare-rn.
Skips all build workflows on draft PRs; fires on
ready_for_review.Introduces a breaking change?
Type of change
Tested on
Not applicable
Testing instructions
Example apps build checkruns; the matrix contains only the apps whose paths actually changed.apps/computer-vision/**— onlycomputer-visioncells run (Android + iOS + bundle).packages/react-native-executorch/android/**— only Android native cells run; iOS and bundle skip.App.tsx— the bundle cell for that app fails fast before any native build finishes.packages/react-native-executorch/not matched by any filter —Check CI filter coveragein thelintjob fails and lists the uncovered path.Related issues
Closes #963.
Checklist
Additional notes
This PR also fixes notorious iOS CI fails but getting available simulator, not a specific one.