Skip to content

Commit 93cb3f7

Browse files
authored
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 Pull Request resolved: #60466
1 parent 7040f05 commit 93cb3f7

1 file changed

Lines changed: 22 additions & 21 deletions

File tree

‎.github/workflows/prebuild-ios-core.yml‎

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,15 @@ on:
1515
default: false
1616

1717
jobs:
18-
build-rn-slice:
19-
runs-on: xcode-27
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
flavor: ['Debug', 'Release']
24-
slice: ['ios', 'ios-simulator', 'mac-catalyst']
18+
resolve-hermes-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
version: ${{ steps.hermes-version.outputs.version }}
2522
steps:
2623
- name: Checkout
2724
uses: actions/checkout@v6
2825
- name: Set Hermes version
26+
id: hermes-version
2927
shell: bash
3028
env:
3129
USE_HERMES_PREBUILT: ${{ inputs.use-hermes-prebuilt }}
@@ -36,7 +34,21 @@ jobs:
3634
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
3735
fi
3836
test -n "$HERMES_VERSION"
39-
echo "HERMES_VERSION=$HERMES_VERSION" >> "$GITHUB_ENV"
37+
echo "version=$HERMES_VERSION" >> "$GITHUB_OUTPUT"
38+
39+
build-rn-slice:
40+
runs-on: xcode-27
41+
needs: resolve-hermes-version
42+
env:
43+
HERMES_VERSION: ${{ needs.resolve-hermes-version.outputs.version }}
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
flavor: ['Debug', 'Release']
48+
slice: ['ios', 'ios-simulator', 'mac-catalyst']
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v6
4052
- name: Restore cache if present
4153
id: restore-ios-slice
4254
if: inputs.version-type == ''
@@ -122,29 +134,18 @@ jobs:
122134
123135
compose-xcframework:
124136
runs-on: xcode-27
125-
needs: [build-rn-slice]
137+
needs: [resolve-hermes-version, build-rn-slice]
126138
strategy:
127139
fail-fast: false
128140
matrix:
129141
flavor: ['Debug', 'Release']
130142
env:
143+
HERMES_VERSION: ${{ needs.resolve-hermes-version.outputs.version }}
131144
REACT_ORG_CODE_SIGNING_P12_CERT: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT }}
132145
REACT_ORG_CODE_SIGNING_P12_CERT_PWD: ${{ secrets.REACT_ORG_CODE_SIGNING_P12_CERT_PWD }}
133146
steps:
134147
- name: Checkout
135148
uses: actions/checkout@v6
136-
- name: Set Hermes version
137-
shell: bash
138-
env:
139-
USE_HERMES_PREBUILT: ${{ inputs.use-hermes-prebuilt }}
140-
run: |
141-
if [ "$USE_HERMES_PREBUILT" == "true" ]; then
142-
HERMES_VERSION=$(curl --fail --silent --show-error --retry 3 https://registry.npmjs.org/hermes-compiler/latest-v1 | jq -er '.version')
143-
else
144-
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
145-
fi
146-
test -n "$HERMES_VERSION"
147-
echo "HERMES_VERSION=$HERMES_VERSION" >> "$GITHUB_ENV"
148149
- name: Restore cache if present
149150
id: restore-ios-xcframework
150151
if: inputs.version-type == ''

0 commit comments

Comments
 (0)