diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 582b7f3c4f0dc9..5d1c7610cd273b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -109,7 +109,7 @@ jobs: uses: actions/cache/restore@v4.0.0 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/upload-artifact@v4.3.1 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/save@v4.0.0 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/restore@v4.0.0 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/save@v4.0.0 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 }} diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 06560a2c848cde..18e5f058d33751 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -106,7 +106,7 @@ jobs: uses: actions/cache/restore@v4.0.0 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/upload-artifact@v4.3.1 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/save@v4.0.0 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/restore@v4.0.0 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/save@v4.0.0 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 }} diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 6daedc97a77316..33b8485c6e781b 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -117,7 +117,7 @@ jobs: uses: actions/cache/restore@v4.0.0 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 @@ -171,17 +171,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/upload-artifact@v4.3.1 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/save@v4.0.0 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 @@ -206,7 +210,7 @@ jobs: - name: Restore Cached Artifacts uses: actions/cache/restore@v4.0.0 with: - key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + key: v4-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 }} @@ -235,38 +239,50 @@ jobs: if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} uses: actions/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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/download-artifact@v4.1.3 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: | @@ -366,7 +382,7 @@ jobs: uses: actions/cache/save@v4.0.0 if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. with: - key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + key: v4-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 }}