From fc3e9ee4085c12aec0908c70e04870f3e71d5bd1 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 2 Dec 2026 02:47:49 -0800 Subject: [PATCH] Resolve Hermes once for each iOS core prebuild Summary: Resolve the selected Hermes version in one prerequisite job and pass its exact output to every slice and XCFramework composition job. This keeps the compiled binaries, staged headers and cache keys on the same version when the npm `latest-v1` tag changes during a build. All existing cache, signing, matrix and failure behavior is retained. Do not fall back to a different Hermes version or suppress missing-artifact failures. The observed Test All run built all six slices with `260318099.0.8`, then both composition jobs re-resolved `260318099.0.9` after its npm publication and failed because the new iOS tarballs returned HTTP 404. The parent commit shows the same error, so the monitored Android-only tip is not the introducing regression. Source-history localization places the independently resolved composition staging in commit `43b44ed7c30ebe331ba58ef841a89dcae37301d8` (#57661); this is a latent timing-dependent race, not a full native-runtime bisect. Changelog: [Internal] Differential Revision: D135122774 --- .github/workflows/prebuild-ios-core.yml | 43 +++++++++++++------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/prebuild-ios-core.yml b/.github/workflows/prebuild-ios-core.yml index 9d567edb708d..5e5c7a2d3535 100644 --- a/.github/workflows/prebuild-ios-core.yml +++ b/.github/workflows/prebuild-ios-core.yml @@ -15,17 +15,15 @@ on: default: false jobs: - build-rn-slice: - runs-on: xcode-27 - strategy: - fail-fast: false - matrix: - flavor: ['Debug', 'Release'] - slice: ['ios', 'ios-simulator', 'mac-catalyst'] + resolve-hermes-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.hermes-version.outputs.version }} steps: - name: Checkout uses: actions/checkout@v6 - name: Set Hermes version + id: hermes-version shell: bash env: USE_HERMES_PREBUILT: ${{ inputs.use-hermes-prebuilt }} @@ -36,7 +34,21 @@ jobs: HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties) fi test -n "$HERMES_VERSION" - echo "HERMES_VERSION=$HERMES_VERSION" >> "$GITHUB_ENV" + echo "version=$HERMES_VERSION" >> "$GITHUB_OUTPUT" + + build-rn-slice: + runs-on: xcode-27 + needs: resolve-hermes-version + env: + HERMES_VERSION: ${{ needs.resolve-hermes-version.outputs.version }} + strategy: + fail-fast: false + matrix: + flavor: ['Debug', 'Release'] + slice: ['ios', 'ios-simulator', 'mac-catalyst'] + steps: + - name: Checkout + uses: actions/checkout@v6 - name: Restore cache if present id: restore-ios-slice if: inputs.version-type == '' @@ -122,29 +134,18 @@ jobs: compose-xcframework: runs-on: xcode-27 - needs: [build-rn-slice] + needs: [resolve-hermes-version, build-rn-slice] strategy: fail-fast: false matrix: flavor: ['Debug', 'Release'] env: + HERMES_VERSION: ${{ needs.resolve-hermes-version.outputs.version }} REACT_ORG_CODE_SIGNING_P12_CERT: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT }} REACT_ORG_CODE_SIGNING_P12_CERT_PWD: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }} steps: - name: Checkout uses: actions/checkout@v6 - - name: Set Hermes version - shell: bash - env: - USE_HERMES_PREBUILT: ${{ inputs.use-hermes-prebuilt }} - run: | - if [ "$USE_HERMES_PREBUILT" == "true" ]; then - HERMES_VERSION=$(curl --fail --silent --show-error --retry 3 https://registry.npmjs.org/hermes-compiler/latest-v1 | jq -er '.version') - else - HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties) - fi - test -n "$HERMES_VERSION" - echo "HERMES_VERSION=$HERMES_VERSION" >> "$GITHUB_ENV" - name: Restore cache if present id: restore-ios-xcframework if: inputs.version-type == ''