-
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 117cdbc
Showing
3 changed files
with
79 additions
and
33 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 |
---|---|---|
|
@@ -109,7 +109,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 | ||
|
@@ -163,17 +163,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 | ||
|
@@ -198,7 +202,7 @@ jobs: | |
- name: Restore Cached Artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
key: v3-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 }} | ||
|
@@ -227,38 +231,49 @@ 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: | | ||
|
@@ -358,7 +373,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: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
key: v3-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 }} | ||
|
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 |
---|---|---|
|
@@ -106,7 +106,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 | ||
|
@@ -160,17 +160,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 | ||
|
@@ -195,7 +199,7 @@ jobs: | |
- name: Restore Cached Artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
key: v3-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 }} | ||
|
@@ -224,38 +228,49 @@ 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: | | ||
|
@@ -355,7 +370,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: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} | ||
key: v3-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 }} | ||
|
Oops, something went wrong.