Skip to content

Commit e681ffc

Browse files
committed
Skip Hermes nightly override on stable branches
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 6614fe7 commit e681ffc

3 files changed

Lines changed: 19 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:
@@ -24,10 +28,12 @@ runs:
2428
with:
2529
ruby-version: ${{ inputs.ruby-version }}
2630
- name: Set nightly Hermes versions
31+
if: ${{ inputs.use-hermes-nightly == 'true' }}
2732
shell: bash
2833
run: |
2934
node ./scripts/releases/use-hermes-nightly.js
3035
- name: Run yarn install again, with the correct hermes version
36+
if: ${{ inputs.use-hermes-nightly == 'true' }}
3137
uses: ./.github/actions/yarn-install
3238
- name: Download ReactNativeDependencies
3339
uses: actions/download-artifact@v7

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ inputs:
1818
description: Whether we have to build with Dynamic Frameworks. If this is set to true, it builds from source
1919
required: false
2020
default: false
21+
use-hermes-nightly:
22+
description: Whether to override pinned Hermes versions with the latest nightly
23+
required: false
24+
default: 'true'
2125

2226
runs:
2327
using: composite
@@ -33,10 +37,12 @@ runs:
3337
with:
3438
ruby-version: ${{ inputs.ruby-version }}
3539
- name: Set nightly Hermes versions
40+
if: ${{ inputs.use-hermes-nightly == 'true' }}
3641
shell: bash
3742
run: |
3843
node ./scripts/releases/use-hermes-nightly.js
3944
- name: Run yarn install again, with the correct hermes version
45+
if: ${{ inputs.use-hermes-nightly == 'true' }}
4046
uses: ./.github/actions/yarn-install
4147
- name: Prepare IOS Tests
4248
if: ${{ inputs.run-unit-tests == 'true' }}

.github/workflows/test-all.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113
with:
114114
ruby-version: "3.2.0"
115115
flavor: Debug
116+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
116117

117118
test_ios_rntester_dynamic_frameworks:
118119
runs-on: macos-15-large
@@ -133,6 +134,7 @@ jobs:
133134
flavor: ${{ matrix.flavor }}
134135
use-frameworks: true
135136
run-unit-tests: false # tests for dynamic frameworks are already run in the test_ios_rntester job; this is to just a test build from source (no prebuilds)
137+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
136138

137139
test_ios_rntester:
138140
runs-on: macos-15-large
@@ -152,6 +154,7 @@ jobs:
152154
with:
153155
use-frameworks: ${{ matrix.frameworks }}
154156
flavor: ${{ matrix.flavor }}
157+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
155158

156159
test_e2e_ios_rntester:
157160
runs-on: macos-15-large
@@ -499,10 +502,12 @@ jobs:
499502
- name: Run yarn install
500503
uses: ./.github/actions/yarn-install
501504
- name: Set nightly Hermes versions
505+
if: ${{ !endsWith(github.ref_name, '-stable') }}
502506
shell: bash
503507
run: |
504508
node ./scripts/releases/use-hermes-nightly.js
505509
- name: Run yarn install again, with the correct hermes version
510+
if: ${{ !endsWith(github.ref_name, '-stable') }}
506511
uses: ./.github/actions/yarn-install
507512
- name: Prepare the Helloworld application
508513
shell: bash
@@ -536,6 +541,7 @@ jobs:
536541
with:
537542
ruby-version: 3.2.0
538543
flavor: Debug
544+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
539545

540546
test_ios_helloworld:
541547
runs-on: macos-15
@@ -558,6 +564,7 @@ jobs:
558564
with:
559565
flavor: ${{ matrix.flavor }}
560566
use-frameworks: ${{ matrix.use_frameworks }}
567+
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
561568

562569
lint:
563570
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)