-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zip slices to preserve symlinks (#46387)
Summary: When creating Hermes in CI, we build it for MacOS and Mac Catalyst as well. The slices for these platforms requires symlinks to work properly. The upload artifacts action on github, when applied to folders, follows the symlinks and copies the destination folder. The result is that Hermes for macOS and Catalyst does not work as expected. This should fix #46213. ## Changelog: [Internal] - Build Hermes in CI properly Pull Request resolved: #46387 Test Plan: Tested already in 0.75 Reviewed By: robhogan Differential Revision: D62355050 Pulled By: cipolleschi fbshipit-source-id: 7abb85c8a2a88f13e06a49c6cb0caccbdad4551a
- Loading branch information
1 parent
d687d38
commit d424c24
Showing
2 changed files
with
28 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 |
---|---|---|
|
@@ -30,7 +30,7 @@ runs: | |
uses: actions/cache/restore@v4 | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.flavor }} | ||
key: v5-hermes-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.slice }}-${{ inputs.flavor }} | ||
key: v6-hermes-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.slice }}-${{ inputs.flavor }} | ||
- name: Build the Hermes ${{ inputs.slice }} frameworks | ||
shell: bash | ||
run: | | ||
|
@@ -85,14 +85,19 @@ runs: | |
echo "Please try again" | ||
exit 1 | ||
fi | ||
- name: Compress slices to preserve Symlinks | ||
shell: bash | ||
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 (${{ inputs.slice }}, ${{ inputs.flavor }}} | ||
uses: actions/[email protected] | ||
with: | ||
name: slice-${{ inputs.slice }}-${{ inputs.flavor }} | ||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.flavor }} | ||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.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/save@v4 | ||
with: | ||
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.flavor }} | ||
key: v5-hermes-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.SLICE }}-${{ inputs.FLAVOR }} | ||
key: v6-hermes-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.SLICE }}-${{ inputs.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