Skip to content

Commit a384ee0

Browse files
committed
ci : upload xcframework artifact from ios-xcode-build job
This commit updates the github workflows build.yml file to include steps for uploading and downloading the xcframework artifact. The macos-latest-swift job now depends on the ios-xcode-build job and downloads the xcframework artifact produced by it. The motivation for this changes is that it takes a long time to build the xcframework and we are currently doing this twice in the workflow. With this change, we only build it once and reuse the artifact.
1 parent 51abc96 commit a384ee0

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ jobs:
711711
712712
macOS-latest-swift:
713713
runs-on: macos-latest
714+
needs: ios-xcode-build
714715

715716
strategy:
716717
matrix:
@@ -727,6 +728,12 @@ jobs:
727728
key: macOS-latest-swift
728729
evict-old-files: 1d
729730

731+
- name: Download xcframework artifact
732+
uses: actions/download-artifact@v4
733+
with:
734+
name: llama-xcframework
735+
path: build-apple/llama.xcframework/
736+
730737
- name: Dependencies
731738
id: depends
732739
continue-on-error: true
@@ -748,11 +755,6 @@ jobs:
748755
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
749756
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
750757
751-
- name: xcodebuild for swift package
752-
id: xcodebuild
753-
run: |
754-
./build-xcframework.sh
755-
756758
windows-msys2:
757759
runs-on: windows-2025
758760

@@ -1170,6 +1172,13 @@ jobs:
11701172
run: |
11711173
./build-xcframework.sh
11721174
1175+
- name: Upload xcframework artifact
1176+
uses: actions/upload-artifact@v4
1177+
with:
1178+
name: llama-xcframework
1179+
path: build-apple/llama.xcframework/
1180+
retention-days: 1
1181+
11731182
- name: Build Xcode project
11741183
run: |
11751184
xcodebuild -downloadPlatform iOS

0 commit comments

Comments
 (0)