Skip to content

Commit 9e98346

Browse files
committed
[RN][CI] Zip slices to preserve symlinks
1 parent 44158de commit 9e98346

File tree

3 files changed

+79
-33
lines changed

3 files changed

+79
-33
lines changed

.github/workflows/nightly.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
uses: actions/cache/restore@v4.0.0
110110
with:
111111
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
112-
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
112+
key: v5-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
113113
- name: Build the Hermes ${{ matrix.slice }} frameworks
114114
run: |
115115
cd ./packages/react-native/sdks/hermes || exit 1
@@ -163,17 +163,21 @@ jobs:
163163
echo "Please try again"
164164
exit 1
165165
fi
166+
- name: Compress slices to preserve Symlinks
167+
run: |
168+
cd ./packages/react-native/sdks/hermes
169+
tar -czv -f build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz build_${{ matrix.slice }}_${{ matrix.flavor }}
166170
- name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}}
167171
uses: actions/upload-artifact@v4.3.1
168172
with:
169173
name: slice-${{ matrix.slice }}-${{ matrix.flavor }}
170-
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
174+
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz
171175
- name: Save slice cache
172176
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
173177
uses: actions/cache/save@v4.0.0
174178
with:
175179
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
176-
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
180+
key: v5-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
177181

178182
build_hermes_macos:
179183
runs-on: macos-13
@@ -198,7 +202,7 @@ jobs:
198202
- name: Restore Cached Artifacts
199203
uses: actions/cache/restore@v4.0.0
200204
with:
201-
key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
205+
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
202206
path: |
203207
/tmp/hermes/osx-bin/${{ matrix.flavor }}
204208
/tmp/hermes/dSYM/${{ matrix.flavor }}
@@ -227,38 +231,49 @@ jobs:
227231
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
228232
uses: actions/download-artifact@v4.1.3
229233
with:
230-
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
234+
path: ./packages/react-native/sdks/hermes/
231235
name: slice-macosx-${{ matrix.flavor }}
232236
- name: Slice cache iphoneos
233237
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
234238
uses: actions/download-artifact@v4.1.3
235239
with:
236-
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
240+
path: ./packages/react-native/sdks/hermes/
237241
name: slice-iphoneos-${{ matrix.flavor }}
238242
- name: Slice cache iphonesimulator
239243
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
240244
uses: actions/download-artifact@v4.1.3
241245
with:
242-
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
246+
path: ./packages/react-native/sdks/hermes/
243247
name: slice-iphonesimulator-${{ matrix.flavor }}
244248
- name: Slice cache catalyst
245249
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
246250
uses: actions/download-artifact@v4.1.3
247251
with:
248-
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
252+
path: ./packages/react-native/sdks/hermes/
249253
name: slice-catalyst-${{ matrix.flavor }}
250254
- name: Slice cache xros
251255
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
252256
uses: actions/download-artifact@v4.1.3
253257
with:
254-
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
258+
path: ./packages/react-native/sdks/hermes/
255259
name: slice-xros-${{ matrix.flavor }}
256260
- name: Slice cache xrsimulator
257261
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
258262
uses: actions/download-artifact@v4.1.3
259263
with:
260-
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
264+
path: ./packages/react-native/sdks/hermes/
261265
name: slice-xrsimulator-${{ matrix.flavor }}
266+
- name: Unzip slices
267+
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
268+
run: |
269+
cd ./packages/react-native/sdks/hermes
270+
ls -l .
271+
tar -xzv -f build_catalyst_${{ matrix.flavor }}.tar.gz
272+
tar -xzv -f build_iphoneos_${{ matrix.flavor }}.tar.gz
273+
tar -xzv -f build_iphonesimulator_${{ matrix.flavor }}.tar.gz
274+
tar -xzv -f build_macosx_${{ matrix.flavor }}.tar.gz
275+
tar -xzv -f build_xros_${{ matrix.flavor }}.tar.gz
276+
tar -xzv -f build_xrsimulator_${{ matrix.flavor }}.tar.gz
262277
- name: Move back build folders
263278
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
264279
run: |
@@ -358,7 +373,7 @@ jobs:
358373
uses: actions/cache/save@v4.0.0
359374
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
360375
with:
361-
key: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
376+
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
362377
path: |
363378
/tmp/hermes/osx-bin/${{ matrix.flavor }}
364379
/tmp/hermes/dSYM/${{ matrix.flavor }}

.github/workflows/publish-release.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
uses: actions/cache/restore@v4.0.0
107107
with:
108108
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
109-
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
109+
key: v5-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
110110
- name: Build the Hermes ${{ matrix.slice }} frameworks
111111
run: |
112112
cd ./packages/react-native/sdks/hermes || exit 1
@@ -160,17 +160,21 @@ jobs:
160160
echo "Please try again"
161161
exit 1
162162
fi
163+
- name: Compress slices to preserve Symlinks
164+
run: |
165+
cd ./packages/react-native/sdks/hermes
166+
tar -czv -f build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz build_${{ matrix.slice }}_${{ matrix.flavor }}
163167
- name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}}
164168
uses: actions/upload-artifact@v4.3.1
165169
with:
166170
name: slice-${{ matrix.slice }}-${{ matrix.flavor }}
167-
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
171+
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz
168172
- name: Save slice cache
169173
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
170174
uses: actions/cache/save@v4.0.0
171175
with:
172176
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}
173-
key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
177+
key: v5-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }}
174178

175179
build_hermes_macos:
176180
runs-on: macos-13
@@ -195,7 +199,7 @@ jobs:
195199
- name: Restore Cached Artifacts
196200
uses: actions/cache/restore@v4.0.0
197201
with:
198-
key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
202+
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
199203
path: |
200204
/tmp/hermes/osx-bin/${{ matrix.flavor }}
201205
/tmp/hermes/dSYM/${{ matrix.flavor }}
@@ -224,38 +228,49 @@ jobs:
224228
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
225229
uses: actions/download-artifact@v4.1.3
226230
with:
227-
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }}
231+
path: ./packages/react-native/sdks/hermes/
228232
name: slice-macosx-${{ matrix.flavor }}
229233
- name: Slice cache iphoneos
230234
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
231235
uses: actions/download-artifact@v4.1.3
232236
with:
233-
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }}
237+
path: ./packages/react-native/sdks/hermes/
234238
name: slice-iphoneos-${{ matrix.flavor }}
235239
- name: Slice cache iphonesimulator
236240
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
237241
uses: actions/download-artifact@v4.1.3
238242
with:
239-
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }}
243+
path: ./packages/react-native/sdks/hermes/
240244
name: slice-iphonesimulator-${{ matrix.flavor }}
241245
- name: Slice cache catalyst
242246
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
243247
uses: actions/download-artifact@v4.1.3
244248
with:
245-
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }}
249+
path: ./packages/react-native/sdks/hermes/
246250
name: slice-catalyst-${{ matrix.flavor }}
247251
- name: Slice cache xros
248252
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
249253
uses: actions/download-artifact@v4.1.3
250254
with:
251-
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }}
255+
path: ./packages/react-native/sdks/hermes/
252256
name: slice-xros-${{ matrix.flavor }}
253257
- name: Slice cache xrsimulator
254258
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
255259
uses: actions/download-artifact@v4.1.3
256260
with:
257-
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }}
261+
path: ./packages/react-native/sdks/hermes/
258262
name: slice-xrsimulator-${{ matrix.flavor }}
263+
- name: Unzip slices
264+
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
265+
run: |
266+
cd ./packages/react-native/sdks/hermes
267+
ls -l .
268+
tar -xzv -f build_catalyst_${{ matrix.flavor }}.tar.gz
269+
tar -xzv -f build_iphoneos_${{ matrix.flavor }}.tar.gz
270+
tar -xzv -f build_iphonesimulator_${{ matrix.flavor }}.tar.gz
271+
tar -xzv -f build_macosx_${{ matrix.flavor }}.tar.gz
272+
tar -xzv -f build_xros_${{ matrix.flavor }}.tar.gz
273+
tar -xzv -f build_xrsimulator_${{ matrix.flavor }}.tar.gz
259274
- name: Move back build folders
260275
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
261276
run: |
@@ -355,7 +370,7 @@ jobs:
355370
uses: actions/cache/save@v4.0.0
356371
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
357372
with:
358-
key: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
373+
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
359374
path: |
360375
/tmp/hermes/osx-bin/${{ matrix.flavor }}
361376
/tmp/hermes/dSYM/${{ matrix.flavor }}

0 commit comments

Comments
 (0)