mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
[LOCAL][RN][CI] Improve stability of the Hermes pipeline (#45142)
* [LOCAL][CI] Require cocoapods to hermes-engine podspec * Refactor Hermes workspace (#45071) Summary: This change is the first step in refactoring GHA so that they can be reused more easily across jobs. Its goal is also to be more reliable w.r.t. caches. That this change do: * moves `prepare_hermes_workspace` to a composite action * saves the `prepare_hermes_workspace` caches only on main * uploads the destination folder as an artifact so that we can use it later in the run * makes the `test-all`, `nightly` and `publish-release` workflow use the new composite action * updates the `setup-hermes-workspace` to download and use the artifact uploaded by `prepare_hermes_workspace` [Internal] - Factor out the prepare_hermes_workspace action Pull Request resolved: https://github.com/facebook/react-native/pull/45071 Test Plan: GHA in CI Reviewed By: cortinico Differential Revision: D58808087 Pulled By: cipolleschi fbshipit-source-id: 42c46bcf75fc73b2edfda9be62b5d0fe8a919a5d * [LOCAL][RN][CI] Improve stability of the Hermes pipeline * chore: align nighlties and releases to the test-all jobs which is green in GHA
This commit is contained in:
@@ -45,17 +45,19 @@ runs:
|
||||
uses: ./.github/actions/setup-xcode
|
||||
- name: Setup node.js
|
||||
uses: ./.github/actions/setup-node
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Create Hermes folder
|
||||
run: mkdir -p "$HERMES_WS_DIR"
|
||||
- name: Download Hermes
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
hermes-version: ${{ inputs.hermes-version }}
|
||||
react-native-version: ${{ inputs.react-native-version }}
|
||||
name: hermes-darwin-bin-${{ inputs.flavor }}
|
||||
path: $HERMES_WS_DIR/hermes-runtime-darwin/
|
||||
- name: Print Downloaded hermes
|
||||
shell: bash
|
||||
run: ls -lR "$HERMES_WS_DIR"
|
||||
- name: Run yarn
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Restore Hermes workspace
|
||||
uses: ./.github/actions/restore-hermes-workspace
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1.170.0
|
||||
with:
|
||||
@@ -78,9 +80,10 @@ runs:
|
||||
args+=(--jsvm jsc)
|
||||
yarn bootstrap ios "${args[@]}" | cat
|
||||
else
|
||||
|
||||
BUILD_TYPE="${{ inputs.flavor }}"
|
||||
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
|
||||
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
|
||||
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/hermes-darwin-bin-${{ inputs.flavor }}/$TARBALL_FILENAME"
|
||||
HERMES_ENGINE_TARBALL_PATH="$HERMES_PATH" yarn bootstrap ios "${args[@]}" | cat
|
||||
fi
|
||||
- name: Build HelloWorld project
|
||||
|
||||
@@ -38,12 +38,11 @@ runs:
|
||||
- name: Run yarn
|
||||
shell: bash
|
||||
run: yarn install --non-interactive
|
||||
- name: Cache setup
|
||||
id: cache_setup
|
||||
uses: ./.github/actions/cache_setup
|
||||
- name: Download Hermes
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
hermes-version: ${{ inputs.hermes-version }}
|
||||
react-native-version: ${{ inputs.react-native-version }}
|
||||
name: hermes-darwin-bin-${{ inputs.flavor }}
|
||||
path: ${{ inputs.hermes-tarball-artifacts-dir }}
|
||||
- name: Setup ruby
|
||||
uses: ruby/setup-ruby@v1.170.0
|
||||
with:
|
||||
@@ -82,6 +81,7 @@ runs:
|
||||
if [[ -e $TARBALL_PATH ]]; then
|
||||
tar -xf $TARBALL_PATH
|
||||
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js
|
||||
chmod +x ./destroot/bin/hermes
|
||||
./destroot/bin/hermes test.js
|
||||
rm test.js
|
||||
rm -rf destroot
|
||||
|
||||
Reference in New Issue
Block a user