mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53390 Changelog: [General][Fixed] - Change leftover references to `hermes.framework` to `hermesvm.framework` Reviewed By: cipolleschi Differential Revision: D80701257 fbshipit-source-id: 9c0e8e49e50f515941e48de2219fb7730d8896bd
104 lines
4.3 KiB
YAML
104 lines
4.3 KiB
YAML
name: build-apple-slices-hermes
|
|
description: This action builds hermesc for Apple platforms
|
|
inputs:
|
|
hermes-version:
|
|
required: true
|
|
description: The version of Hermes
|
|
react-native-version:
|
|
required: true
|
|
description: The version of Hermes
|
|
slice:
|
|
required: true
|
|
description: The slice of hermes you want to build. It could be iphone, iphonesimulator, macos, catalyst, appletvos, appletvsimulator, xros, or xrossimulator
|
|
flavor:
|
|
required: true
|
|
description: The flavor we want to build. It can be Debug or Release
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Setup xcode
|
|
uses: ./.github/actions/setup-xcode
|
|
- name: Restore Hermes workspace
|
|
uses: ./.github/actions/restore-hermes-workspace
|
|
- name: Restore HermesC Artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: hermesc-apple
|
|
path: ./packages/react-native/sdks/hermes/build_host_hermesc
|
|
- name: Restore Slice From Cache
|
|
id: restore-slice-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ./packages/react-native/sdks/hermes/build_${{ 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: |
|
|
cd ./packages/react-native/sdks/hermes || exit 1
|
|
SLICE=${{ inputs.slice }}
|
|
FLAVOR=${{ inputs.flavor }}
|
|
FINAL_PATH=build_"$SLICE"_"$FLAVOR"
|
|
echo "Final path for this slice is: $FINAL_PATH"
|
|
|
|
if [[ -d "$FINAL_PATH" ]]; then
|
|
echo "[HERMES] Skipping! Found the requested slice at $FINAL_PATH".
|
|
exit 0
|
|
fi
|
|
|
|
if [[ "$ARTIFACTS_EXIST" ]]; then
|
|
echo "[HERMES] Skipping! Artifacts exists already."
|
|
exit 0
|
|
fi
|
|
|
|
export RELEASE_VERSION=${{ inputs.react-native-version }}
|
|
|
|
# HermesC is used to build hermes, so it has to be executable
|
|
chmod +x ./build_host_hermesc/bin/hermesc
|
|
|
|
if [[ "$SLICE" == "macosx" ]]; then
|
|
echo "[HERMES] Building Hermes for MacOS"
|
|
|
|
chmod +x ./utils/build-mac-framework.sh
|
|
BUILD_TYPE="${{ inputs.flavor }}" ./utils/build-mac-framework.sh
|
|
else
|
|
echo "[HERMES] Building Hermes for iOS: $SLICE"
|
|
|
|
chmod +x ./utils/build-ios-framework.sh
|
|
BUILD_TYPE="${{ inputs.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
|
|
fi
|
|
|
|
echo "Moving from build_$SLICE to $FINAL_PATH"
|
|
mv build_"$SLICE" "$FINAL_PATH"
|
|
|
|
# check whether everything is there
|
|
if [[ -d "$FINAL_PATH/lib/hermesvm.framework" ]]; then
|
|
echo "Successfully built hermesvm.framework for $SLICE in $FLAVOR"
|
|
else
|
|
echo "Failed to built hermesvm.framework for $SLICE in $FLAVOR"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ -d "$FINAL_PATH/lib/hermesvm.framework.dSYM" ]]; then
|
|
echo "Successfully built hermesvm.framework.dSYM for $SLICE in $FLAVOR"
|
|
else
|
|
echo "Failed to built hermesvm.framework.dSYM for $SLICE in $FLAVOR"
|
|
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/upload-artifact@v4.3.4
|
|
with:
|
|
name: slice-${{ 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: 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 }}
|