From bb8992c7603c0bafdf78e3127ddda1678cb0c82d Mon Sep 17 00:00:00 2001 From: Douglas Lowder Date: Thu, 17 Oct 2024 02:22:02 -0700 Subject: [PATCH] fix: Add missing tvOS steps to build-hermes-macos GH action (#47073) Summary: After examining Hermes artifacts built after merging of https://github.com/facebook/react-native/issues/46865 , it was apparent that tvOS frameworks were missing from the Hermes universal framework generated by CI. I went back and discovered additional steps that need to be added to the `build-hermes-macos` action to make CI work correctly. ## Changelog: [Internal][Fixed] add required steps to build tvOS in build-hermes-macos action Pull Request resolved: https://github.com/facebook/react-native/pull/47073 Test Plan: After merging, Hermes artifacts generated by CI should contain the missing tvOS bits. Reviewed By: rshest Differential Revision: D64528911 Pulled By: cipolleschi fbshipit-source-id: 61db3e154767830a4726d7ceeec229a4af30d247 --- .github/actions/build-hermes-macos/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-hermes-macos/action.yml b/.github/actions/build-hermes-macos/action.yml index 4e0b3721eca..6d1540b068a 100644 --- a/.github/actions/build-hermes-macos/action.yml +++ b/.github/actions/build-hermes-macos/action.yml @@ -22,7 +22,7 @@ runs: - name: Restore Cached Artifacts uses: actions/cache/restore@v4 with: - key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }} + key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes-engine/utils/build-apple-frameworks.sh') }} path: | /tmp/hermes/osx-bin/${{ inputs.flavor }} /tmp/hermes/dSYM/${{ inputs.flavor }} @@ -119,6 +119,8 @@ runs: mv build_macosx_${{ inputs.flavor }} build_macosx mv build_iphoneos_${{ inputs.flavor }} build_iphoneos mv build_iphonesimulator_${{ inputs.flavor }} build_iphonesimulator + mv build_appletvos_${{ inputs.flavor }} build_appletvos + mv build_appletvsimulator_${{ inputs.flavor }} build_appletvsimulator mv build_catalyst_${{ inputs.flavor }} build_catalyst mv build_xros_${{ inputs.flavor }} build_xros mv build_xrsimulator_${{ inputs.flavor }} build_xrsimulator @@ -177,6 +179,8 @@ runs: mkdir -p "$WORKING_DIR/catalyst" mkdir -p "$WORKING_DIR/iphoneos" mkdir -p "$WORKING_DIR/iphonesimulator" + mkdir -p "$WORKING_DIR/appletvos" + mkdir -p "$WORKING_DIR/appletvsimulator" mkdir -p "$WORKING_DIR/xros" mkdir -p "$WORKING_DIR/xrsimulator" @@ -187,6 +191,8 @@ runs: cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/" cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/" cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/" + cp -r build_appletvos/$DSYM_FILE_PATH "$WORKING_DIR/appletvos/" + cp -r build_appletvsimulator/$DSYM_FILE_PATH "$WORKING_DIR/appletvsimulator/" cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/" cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/" @@ -214,7 +220,7 @@ runs: uses: actions/cache/save@v4 if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. with: - key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }} + key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes-engine/utils/build-apple-frameworks.sh') }} path: | /tmp/hermes/osx-bin/${{ inputs.flavor }} /tmp/hermes/dSYM/${{ inputs.flavor }}