Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RN][CI] Zip slices to preserve symlinks #46301

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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 }}
Expand Down
37 changes: 26 additions & 11 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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 }}
Expand Down
Loading
Loading