-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RN][CI] Zip slices to preserve symlinks
- Loading branch information
1 parent
44158de
commit c17e42e
Showing
1 changed file
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,7 +117,7 @@ jobs: | |
uses: actions/cache/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} | ||
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 }} | ||
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 }} | ||
- name: Build the Hermes ${{ matrix.slice }} frameworks | ||
run: | | ||
cd ./packages/react-native/sdks/hermes || exit 1 | ||
|
@@ -171,17 +171,21 @@ jobs: | |
echo "Please try again" | ||
exit 1 | ||
fi | ||
- name: Compress slices to preserve Symlinks | ||
run: | | ||
cd ./packages/react-native/sdks/hermes | ||
tar -czv -f build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz build_${{ matrix.slice }}_${{ matrix.flavor }} | ||
- name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}} | ||
uses: actions/[email protected] | ||
with: | ||
name: slice-${{ matrix.slice }}-${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz | ||
- name: Save slice cache | ||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. | ||
uses: actions/cache/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} | ||
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 }} | ||
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 }} | ||
|
||
build_hermes_macos: | ||
runs-on: macos-13 | ||
|
@@ -206,7 +210,7 @@ jobs: | |
- name: Restore Cached Artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
key: v4-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
path: | | ||
/tmp/hermes/osx-bin/${{ matrix.flavor }} | ||
/tmp/hermes/dSYM/${{ matrix.flavor }} | ||
|
@@ -235,38 +239,50 @@ jobs: | |
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/ | ||
name: slice-macosx-${{ matrix.flavor }} | ||
- name: Slice cache iphoneos | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/ | ||
name: slice-iphoneos-${{ matrix.flavor }} | ||
- name: Slice cache iphonesimulator | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/ | ||
name: slice-iphonesimulator-${{ matrix.flavor }} | ||
- name: Slice cache catalyst | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/ | ||
name: slice-catalyst-${{ matrix.flavor }} | ||
- name: Slice cache xros | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/ | ||
name: slice-xros-${{ matrix.flavor }} | ||
- name: Slice cache xrsimulator | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }} | ||
path: ./packages/react-native/sdks/hermes/ | ||
name: slice-xrsimulator-${{ matrix.flavor }} | ||
- name: Unzip slices | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
run: | | ||
cd ./packages/react-native/sdks/hermes | ||
ls -l . | ||
tar -xzv -f build_catalyst_${{ matrix.flavor }}.tar.gz | ||
tar -xzv -f build_iphoneos_${{ matrix.flavor }}.tar.gz | ||
tar -xzv -f build_iphonesimulator_${{ matrix.flavor }}.tar.gz | ||
tar -xzv -f build_macosx_${{ matrix.flavor }}.tar.gz | ||
tar -xzv -f build_xros_${{ matrix.flavor }}.tar.gz | ||
tar -xzv -f build_xrsimulator_${{ matrix.flavor }}.tar.gz | ||
- name: Move back build folders | ||
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} | ||
run: | | ||
|
@@ -366,7 +382,7 @@ jobs: | |
uses: actions/cache/[email protected] | ||
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. | ||
with: | ||
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
key: v4-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
path: | | ||
/tmp/hermes/osx-bin/${{ matrix.flavor }} | ||
/tmp/hermes/dSYM/${{ matrix.flavor }} | ||
|