Skip to content

Commit d81b786

Browse files
authored
[LOCAL] Skip Hermes nightly override on stable branches (#56582)
The test-ios-rntester, test-ios-helloworld actions and the test_android_helloworld job unconditionally run use-hermes-nightly.js, which replaces the pinned Hermes version with the latest nightly from npm. On stable/release branches this is wrong: the pinned version from version.properties should be used instead. Add a `use-hermes-nightly` input (default true for backward compat) to both composite actions, and guard the nightly override steps behind it. In test-all.yml, pass `!endsWith(github.ref_name, '-stable')` so that pushes to *-stable branches use the pinned Hermes version.
1 parent e356fd0 commit d81b786

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/actions/test-ios-helloworld/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ inputs:
1010
flavor:
1111
description: The flavor of the build. Must be one of "Debug", "Release".
1212
default: Debug
13+
use-hermes-nightly:
14+
description: Whether to override pinned Hermes versions with the latest nightly
15+
required: false
16+
default: 'true'
1317
runs:
1418
using: composite
1519
steps:
@@ -26,10 +30,12 @@ runs:
2630
with:
2731
ruby-version: ${{ inputs.ruby-version }}
2832
- name: Set nightly Hermes versions
33+
if: ${{ inputs.use-hermes-nightly == 'true' }}
2934
shell: bash
3035
run: |
3136
node ./scripts/releases/use-hermes-nightly.js
3237
- name: Run yarn install again, with the correct hermes version
38+
if: ${{ inputs.use-hermes-nightly == 'true' }}
3339
uses: ./.github/actions/yarn-install
3440
- name: Download ReactNativeDependencies
3541
uses: actions/download-artifact@v4

.github/actions/test-ios-rntester/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ inputs:
1717
description: Whether we want to run E2E tests or not
1818
required: false
1919
default: false
20+
use-hermes-nightly:
21+
description: Whether to override pinned Hermes versions with the latest nightly
22+
required: false
23+
default: 'true'
2024

2125
runs:
2226
using: composite
@@ -34,10 +38,12 @@ runs:
3438
with:
3539
ruby-version: ${{ inputs.ruby-version }}
3640
- name: Set nightly Hermes versions
41+
if: ${{ inputs.use-hermes-nightly == 'true' }}
3742
shell: bash
3843
run: |
3944
node ./scripts/releases/use-hermes-nightly.js
4045
- name: Run yarn install again, with the correct hermes version
46+
if: ${{ inputs.use-hermes-nightly == 'true' }}
4147
uses: ./.github/actions/yarn-install
4248
- name: Prepare IOS Tests
4349
if: ${{ inputs.run-unit-tests == 'true' }}

.github/workflows/test-all.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
with:
5858
ruby-version: "3.2.0"
5959
flavor: Debug
60+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
6061

6162
test_ios_rntester:
6263
runs-on: macos-15-large
@@ -76,6 +77,7 @@ jobs:
7677
with:
7778
use-frameworks: ${{ matrix.frameworks }}
7879
flavor: ${{ matrix.flavor }}
80+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
7981

8082
test_e2e_ios_rntester:
8183
runs-on: macos-15-large
@@ -397,10 +399,12 @@ jobs:
397399
- name: Run yarn install
398400
uses: ./.github/actions/yarn-install
399401
- name: Set nightly Hermes versions
402+
if: ${{ !endsWith(github.ref_name, '-stable') }}
400403
shell: bash
401404
run: |
402405
node ./scripts/releases/use-hermes-nightly.js
403406
- name: Run yarn install again, with the correct hermes version
407+
if: ${{ !endsWith(github.ref_name, '-stable') }}
404408
uses: ./.github/actions/yarn-install
405409
- name: Prepare the Helloworld application
406410
shell: bash
@@ -434,6 +438,7 @@ jobs:
434438
with:
435439
ruby-version: 3.2.0
436440
flavor: Debug
441+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
437442

438443
test_ios_helloworld:
439444
runs-on: macos-15
@@ -456,6 +461,7 @@ jobs:
456461
with:
457462
flavor: ${{ matrix.flavor }}
458463
use-frameworks: ${{ matrix.use_frameworks }}
464+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
459465

460466
test_js:
461467
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)