-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add job to build the XCFramework for ios prebuilds (#49563)
Summary: This change introduces a job to prebuild iOS XCFrameworks. ## Changelog: [Internal] - Create prepare artifacts workflows Reviewed By: cortinico Differential Revision: D69924325
- Loading branch information
1 parent
38a3cff
commit 7aec96a
Showing
1 changed file
with
56 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -93,7 +93,7 @@ jobs: | |
- name: Upload Artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: ios-slice-${{ matrix.flavor }}-${{ matrix.slice }} | ||
name: prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }} | ||
path: | | ||
packages/react-native/third-party/.build/Build/Products | ||
- name: Save Cache | ||
|
@@ -104,3 +104,58 @@ jobs: | |
enableCrossOsArchive: true | ||
path: | | ||
packages/react-native/third-party/.build/Build/Products | ||
create-xcframework: | ||
name: Prepare XCFramework | ||
runs-on: macos-14 | ||
needs: [build-apple-slices] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
flavor: [Debug, Release] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup node.js | ||
uses: ./.github/actions/setup-node | ||
- name: Setup xcode | ||
uses: ./.github/actions/setup-xcode | ||
with: | ||
xcode-version: '16.1' | ||
- name: Restore XCFramework | ||
id: restore-xcframework | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework | ||
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuilds/dependencies') }} | ||
# If cache hit, we already have our binary. We don't need to do anything. | ||
- name: Yarn Install | ||
if: steps.restore-xcframework.outputs.cache-hit != 'true' | ||
uses: ./.github/actions/yarn-install | ||
- name: Download slices | ||
if: steps.restore-xcframework.outputs.cache-hit != 'true' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: prebuild-slice-${{ matrix.flavor }}-* | ||
path: packages/react-native/third-party/.build/Build/Products | ||
merge-multiple: true | ||
- name: Create XCFramework | ||
if: steps.restore-xcframework.outputs.cache-hit != 'true' | ||
run: node scripts/releases/prepare-ios-prebuilds.js -t create-xcframework | ||
- name: Rename XCFramework | ||
if: steps.restore-xcframework.outputs.cache-hit != 'true' | ||
run: mv packages/react-native/third-party/ReactNativeDependencies.xcframework packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework | ||
- name: Upload XCFramework Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework | ||
path: | | ||
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework | ||
- name: Save XCFramework in Cache | ||
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework | ||
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuilds/dependencies') }} |