Skip to content

[0.89] Backport CI cost reductions - #60264

Merged
cipolleschi merged 2 commits into
0.89-stablefrom
cipolleschi/ci-cost-reduction-089
Nov 24, 2026
Merged

cipolleschi merged 2 commits into
0.89-stablefrom
cipolleschi/ci-cost-reduction-089

Conversation

@cipolleschi

@cipolleschi cipolleschi commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Backport the CI cost reductions from main to 0.89-stable and move the remaining Android app jobs from 4-core-ubuntu to ubuntu-latest. The stable branch already has the earlier RNTester E2E retry, simulator setup, Apple Silicon and superseded-run cancellation improvements.

The remaining differences addressed here are:

Area Before on 0.89-stable After this backport Upstream
iOS prebuild caches Restore/save paths and keys differ; library JS changes invalidate native caches Restore and save identical paths using the original primary key; hash native/codegen inputs and exact Hermes version; bypass unstamped core caches for release builds #59931
iOS app runners RNTester, standalone SwiftPM checks and template build/E2E jobs use large macOS runners Use standard macos-15 and macos-26 runners; verify the template executable supports arm64 and select the RNTester simulator for template E2E #60142
Android app runners Android template builds, RNTester E2E, template E2E and HelloWorld builds use 4-core-ubuntu All four jobs use ubuntu-latest Runner cleanup
Template E2E retries Rebuild and retest both configurations on every workflow retry Separate builds from E2E; retain successful configurations and app artifacts; retry unfinished configurations/flows; stop retries on cancellation #60143
Fantom coverage Build/run Fantom for every code change Skip platform-only PRs while keeping shared code, RNTester, pushes and manual runs covered #60155
Workflow overhead LICENSE-only changes count as code; a separate job computes an unused release type Exclude LICENSE files from code changes and use the existing dry-run build behavior directly #60037, #60039

Stable-branch adaptations:

  • Preserve all existing CocoaPods/Ruby, dynamic-framework and standalone SwiftPM configurations. The extracted template build keeps the stable branch's CocoaPods setup.
  • Save the corrected prebuild caches on 0.89-stable pushes so the branch can populate reusable caches. PRs only restore them.
  • Use github.base_ref || github.ref_name to select the stable template and pinned Hermes for PRs targeting 0.89-stable, as well as branch pushes.

Changelog:

[INTERNAL] [CHANGED] - Backport CI cost reductions to 0.89: reuse iOS prebuild caches and template app builds, run app checks on standard macOS and Ubuntu runners, and skip unnecessary Fantom work.

Test Plan:

Passed locally:

yarn test .github/workflow-scripts/__tests__/template-app-ci-state-test.js .github/workflow-scripts/__tests__/maestro-ios-test.js .github/workflow-scripts/__tests__/report-test-results-test.js --runInBand

3 suites, 64 tests passed, including partial configuration success, lost results, exhausted retries, cancellation, missing/corrupt state and completed-flow reuse.

yarn eslint --no-ignore --max-warnings 0 .github/workflow-scripts/template-app-ci-state.js .github/workflow-scripts/__tests__/template-app-ci-state-test.js
yarn prettier --check .github/workflows/test-all.yml .github/workflows/prebuild-ios-core.yml .github/workflows/prebuild-ios-dependencies.yml .github/workflows/test-ios-spm-helloworld.yml .github/workflows/test-ios-spm-rntester.yml .github/workflows/test-ios-spm-newapp.yml .github/workflows/build-ios-templateapp.yml .github/workflows/e2e-ios-templateapp.yml .github/workflow-scripts/template-app-ci-state.js .github/workflow-scripts/__tests__/template-app-ci-state-test.js
/tmp/react-native-ci-tools/actionlint -shellcheck='' -ignore 'label "[48]-core-ubuntu" is unknown' -ignore 'description is required in metadata' .github/workflows/test-all.yml .github/workflows/prebuild-ios-core.yml .github/workflows/prebuild-ios-dependencies.yml .github/workflows/test-ios-spm-helloworld.yml .github/workflows/test-ios-spm-rntester.yml .github/workflows/test-ios-spm-newapp.yml .github/workflows/build-ios-templateapp.yml .github/workflows/e2e-ios-templateapp.yml
git diff --check
git diff --cached --check

Actionlint 1.7.12 passed; only the repository's existing custom Ubuntu runner labels and missing reusable-workflow input descriptions were excluded. Shellcheck was disabled for this workflow validation.

An additional local YAML comparison verified that existing CocoaPods/Ruby and standalone SwiftPM matrices/action inputs are preserved, cache restore/save paths and primary keys match, stamped core builds bypass CI caches, representative platform-only changes skip Fantom while shared/RNTester changes retain it, and template retries retain cancellation and stable-branch selection.

The runner audit checked all 112 tracked CI files and found no remaining large macOS runner or 4-core-ubuntu labels. A YAML comparison confirmed that the four Android workflow changes only affect runner selection.

The additional Android runner changes passed:

yarn prettier --check .github/workflows/build-android-templateapp.yml .github/workflows/e2e-android-rntester.yml .github/workflows/e2e-android-templateapp.yml .github/workflows/test-all.yml
/tmp/react-native-ci-tools/actionlint -shellcheck='' -ignore 'label "8-core-ubuntu" is unknown' -ignore 'description is required in metadata' .github/workflows/build-android-templateapp.yml .github/workflows/e2e-android-rntester.yml .github/workflows/e2e-android-templateapp.yml .github/workflows/test-all.yml
git diff --check

Hosted native builds and simulator E2E validation are pending the PR's CI checks.

Backport prebuild cache reuse, standard macOS runners, selective template app build/test retries, Fantom path filtering, LICENSE exclusions and removal of the unused release-type job from main.

Retain the stable CocoaPods/Ruby and standalone SwiftPM configurations. Save CI caches on 0.89-stable pushes and use the PR base branch when selecting the template and pinned Hermes.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 24, 2026
@cipolleschi
cipolleschi merged commit cf149df into 0.89-stable Nov 24, 2026
85 checks passed
@cipolleschi
cipolleschi deleted the cipolleschi/ci-cost-reduction-089 branch November 24, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants