Skip to content

Commit cf8d3f8

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Port CI improvements from Release branch to main (facebook#45175)
Summary: Pull Request resolved: facebook#45175 This change ports the CI improvements we made on stable branch to main. ## Changelog: [Internal] - Port back to main improvements we made in GHA Reviewed By: cortinico Differential Revision: D59053873 fbshipit-source-id: 73eb7e33b9bbdc5d8c3a9294f487ad969b144bf3
1 parent b80812a commit cf8d3f8

File tree

6 files changed

+358
-229
lines changed

6 files changed

+358
-229
lines changed

.github/actions/test_ios_helloworld/action.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,20 @@ runs:
4545
uses: ./.github/actions/setup-xcode
4646
- name: Setup node.js
4747
uses: ./.github/actions/setup-node
48-
- name: Cache setup
49-
id: cache_setup
50-
uses: ./.github/actions/cache_setup
48+
- name: Create Hermes folder
49+
shell: bash
50+
run: mkdir -p "$HERMES_WS_DIR"
51+
- name: Download Hermes
52+
uses: actions/download-artifact@v4
5153
with:
52-
hermes-version: ${{ inputs.hermes-version }}
53-
react-native-version: ${{ inputs.react-native-version }}
54+
name: hermes-darwin-bin-${{ inputs.flavor }}
55+
path: /tmp/hermes/hermes-runtime-darwin/
56+
- name: Print Downloaded hermes
57+
shell: bash
58+
run: ls -lR "$HERMES_WS_DIR"
5459
- name: Run yarn
5560
shell: bash
5661
run: yarn install --non-interactive
57-
- name: Restore Hermes workspace
58-
uses: ./.github/actions/restore-hermes-workspace
5962
- name: Setup ruby
6063
uses: ruby/[email protected]
6164
with:
@@ -78,6 +81,17 @@ runs:
7881
args+=(--jsvm jsc)
7982
yarn bootstrap ios "${args[@]}" | cat
8083
else
84+
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
85+
# Let's ensure that the tarballs have the right names
86+
87+
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
88+
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
89+
fi
90+
91+
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
92+
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
93+
fi
94+
8195
BUILD_TYPE="${{ inputs.flavor }}"
8296
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
8397
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
@@ -87,6 +101,7 @@ runs:
87101
shell: bash
88102
run: |
89103
cd packages/helloworld
104+
90105
args=()
91106
if [[ ${{ inputs.flavor }} == "Release" ]]; then
92107
args+=(--prod)

.github/actions/test_ios_rntester/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@ runs:
3838
- name: Run yarn
3939
shell: bash
4040
run: yarn install --non-interactive
41-
- name: Cache setup
42-
id: cache_setup
43-
uses: ./.github/actions/cache_setup
41+
- name: Download Hermes
42+
uses: actions/download-artifact@v4
4443
with:
45-
hermes-version: ${{ inputs.hermes-version }}
46-
react-native-version: ${{ inputs.react-native-version }}
44+
name: hermes-darwin-bin-${{ inputs.flavor }}
45+
path: ${{ inputs.hermes-tarball-artifacts-dir }}
4746
- name: Setup ruby
4847
uses: ruby/[email protected]
4948
with:
@@ -82,6 +81,7 @@ runs:
8281
if [[ -e $TARBALL_PATH ]]; then
8382
tar -xf $TARBALL_PATH
8483
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js
84+
chmod +x ./destroot/bin/hermes
8585
./destroot/bin/hermes test.js
8686
rm test.js
8787
rm -rf destroot

0 commit comments

Comments
 (0)