Skip to content

[RN][CI] Factor out build hermesc apple #45341

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

Closed
Closed
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
40 changes: 40 additions & 0 deletions .github/actions/build-hermesc-apple/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build-hermesc-apple
description: This action builds hermesc for Apple platforms
inputs:
HERMES_WS_DIR:
required: true
description: The hermes dir we need to use to setup the workspace
HERMES_VERSION:
required: True
description: The version of Hermes
REACT_NATIVE_VERSION:
required: True
description: The version of Hermes
runs:
using: composite
steps:
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
- name: Build HermesC Apple
shell: bash
run: |
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ inputs.HERMES_VERSION }}-${{ inputs.REACT_NATIVE_VERSION }}
enableCrossOsArchive: true
27 changes: 4 additions & 23 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,34 +47,15 @@ jobs:
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Build HermesC Apple
run: |
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
uses: ./.github/actions/build-hermesc-apple
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
enableCrossOsArchive: true
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.output.HERMES_VERSION }}
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.output.REACT_NATIVE_VERSION }}

build_apple_slices_hermes:
runs-on: macos-14
Expand Down
28 changes: 5 additions & 23 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,16 @@ jobs:
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Build HermesC Apple
run: |
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
uses: ./.github/actions/build-hermesc-apple
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
enableCrossOsArchive: true
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.output.HERMES_VERSION }}
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.output.REACT_NATIVE_VERSION }}


build_apple_slices_hermes:
runs-on: macos-14
Expand Down
27 changes: 4 additions & 23 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,15 @@ jobs:
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
- name: Build HermesC Apple
run: |
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
uses: ./.github/actions/build-hermesc-apple
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
enableCrossOsArchive: true
HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }}
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.output.HERMES_VERSION }}
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.output.REACT_NATIVE_VERSION }}

build_apple_slices_hermes:
runs-on: macos-14
Expand Down
Loading