Commit e216f4ec8 for llama.cpp
commit e216f4ec8753e7317314e1ee01861b0230e583aa
Author: Daniel Bevenius <daniel.bevenius@gmail.com>
Date: Fri Oct 30 10:01:28 2026 +0100
ci : extract most apple jobs into daily workflow (#31408)
This commit extracts all apple jobs except for macos-latest-arm64 into a
new daily workflow.
The motivation for this is to reducd the load on the macos runners.
diff --git a/.github/workflows/build-apple-daily.yml b/.github/workflows/build-apple-daily.yml
new file mode 100644
index 000000000..27c6e43b4
--- /dev/null
+++ b/.github/workflows/build-apple-daily.yml
@@ -0,0 +1,160 @@
+name: CI (apple - daily)
+
+on:
+ workflow_dispatch: # allows manual triggering
+ schedule:
+ - cron: '0 0 * * *'
+
+cache-mode: none
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
+ cancel-in-progress: true
+
+env:
+ GGML_NLOOP: 3
+ GGML_N_THREADS: 1
+ LLAMA_ARG_LOG_COLORS: 1
+ LLAMA_ARG_LOG_PREFIX: 1
+ LLAMA_ARG_LOG_TIMESTAMPS: 1
+
+jobs:
+ macos-latest-ios-xcode:
+ runs-on: macos-latest
+
+ permissions:
+ actions: write
+ contents: read
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Setup Xcode
+ uses: ggml-org/setup-xcode@v1
+ with:
+ xcode-version: latest-stable
+
+ - name: Build
+ id: cmake_build
+ run: |
+ sysctl -a
+ cmake -B build -G Xcode \
+ -DGGML_METAL_EMBED_LIBRARY=ON \
+ -DLLAMA_OPENSSL=OFF \
+ -DLLAMA_BUILD_APP=OFF \
+ -DLLAMA_BUILD_EXAMPLES=OFF \
+ -DLLAMA_BUILD_TOOLS=OFF \
+ -DLLAMA_BUILD_TESTS=OFF \
+ -DLLAMA_BUILD_SERVER=OFF \
+ -DCMAKE_SYSTEM_NAME=iOS \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
+ -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
+ cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
+
+ - name: xcodebuild for swift package
+ id: xcodebuild
+ run: |
+ ./build-xcframework.sh
+
+ - name: Upload xcframework artifact
+ uses: actions/upload-artifact@v6
+ with:
+ name: llama-xcframework
+ path: build-apple/llama.xcframework/
+ retention-days: 1
+
+ - name: Build Xcode project
+ run: |
+ xcodebuild -downloadPlatform iOS
+ xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
+
+ macos-latest-tvos:
+ runs-on: macos-latest
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Build
+ id: cmake_build
+ run: |
+ sysctl -a
+ cmake -B build -G Xcode \
+ -DGGML_METAL_EMBED_LIBRARY=ON \
+ -DLLAMA_BUILD_COMMON=OFF \
+ -DLLAMA_BUILD_APP=OFF \
+ -DLLAMA_BUILD_EXAMPLES=OFF \
+ -DLLAMA_BUILD_TOOLS=OFF \
+ -DLLAMA_BUILD_TESTS=OFF \
+ -DLLAMA_BUILD_SERVER=OFF \
+ -DCMAKE_SYSTEM_NAME=tvOS \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
+ -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
+ cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
+
+ macos-latest-visionos:
+ runs-on: macos-latest
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Build
+ id: cmake_build
+ run: |
+ sysctl -a
+ cmake -B build -G Xcode \
+ -DGGML_METAL_EMBED_LIBRARY=ON \
+ -DLLAMA_BUILD_COMMON=OFF \
+ -DLLAMA_BUILD_APP=OFF \
+ -DLLAMA_BUILD_EXAMPLES=OFF \
+ -DLLAMA_BUILD_TOOLS=OFF \
+ -DLLAMA_BUILD_TESTS=OFF \
+ -DLLAMA_BUILD_SERVER=OFF \
+ -DCMAKE_SYSTEM_NAME=visionOS \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=1.0 \
+ -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
+ cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
+
+ macos-latest-swift:
+ runs-on: macos-latest
+ needs: macos-latest-ios-xcode
+
+ permissions:
+ actions: read
+ contents: read
+
+ strategy:
+ matrix:
+ destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Download xcframework artifact
+ uses: actions/download-artifact@v7
+ with:
+ name: llama-xcframework
+ path: build-apple/llama.xcframework/
+
+ - name: Build llama.cpp with CMake
+ id: cmake_build
+ run: |
+ sysctl -a
+ cmake -B build -G Xcode \
+ -DGGML_METAL_EMBED_LIBRARY=ON \
+ -DLLAMA_OPENSSL=OFF \
+ -DLLAMA_BUILD_APP=OFF \
+ -DLLAMA_BUILD_EXAMPLES=OFF \
+ -DLLAMA_BUILD_TOOLS=OFF \
+ -DLLAMA_BUILD_TESTS=OFF \
+ -DLLAMA_BUILD_SERVER=OFF \
+ -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
+ cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
diff --git a/.github/workflows/build-apple.yml b/.github/workflows/build-apple.yml
index 9832d800b..7fbc4a549 100644
--- a/.github/workflows/build-apple.yml
+++ b/.github/workflows/build-apple.yml
@@ -107,140 +107,3 @@ jobs:
# ref: https://github.com/ggml-org/llama.cpp/pull/19802#issuecomment-4013704023
ctest -L main -E "test-llama-archs|test-llama-context|test-speculative-rejection-sampling" --verbose --timeout 900
- macos-latest-ios-xcode:
- runs-on: macos-latest
-
- permissions:
- actions: write
- contents: read
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v6
-
- - name: Setup Xcode
- uses: ggml-org/setup-xcode@v1
- with:
- xcode-version: latest-stable
-
- - name: Build
- id: cmake_build
- run: |
- sysctl -a
- cmake -B build -G Xcode \
- -DGGML_METAL_EMBED_LIBRARY=ON \
- -DLLAMA_OPENSSL=OFF \
- -DLLAMA_BUILD_APP=OFF \
- -DLLAMA_BUILD_EXAMPLES=OFF \
- -DLLAMA_BUILD_TOOLS=OFF \
- -DLLAMA_BUILD_TESTS=OFF \
- -DLLAMA_BUILD_SERVER=OFF \
- -DCMAKE_SYSTEM_NAME=iOS \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
- -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
- cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
-
- - name: xcodebuild for swift package
- id: xcodebuild
- run: |
- ./build-xcframework.sh
-
- - name: Upload xcframework artifact
- uses: actions/upload-artifact@v6
- with:
- name: llama-xcframework
- path: build-apple/llama.xcframework/
- retention-days: 1
-
- - name: Build Xcode project
- run: |
- xcodebuild -downloadPlatform iOS
- xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
-
- macos-latest-tvos:
- runs-on: macos-latest
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: Build
- id: cmake_build
- run: |
- sysctl -a
- cmake -B build -G Xcode \
- -DGGML_METAL_EMBED_LIBRARY=ON \
- -DLLAMA_BUILD_COMMON=OFF \
- -DLLAMA_BUILD_APP=OFF \
- -DLLAMA_BUILD_EXAMPLES=OFF \
- -DLLAMA_BUILD_TOOLS=OFF \
- -DLLAMA_BUILD_TESTS=OFF \
- -DLLAMA_BUILD_SERVER=OFF \
- -DCMAKE_SYSTEM_NAME=tvOS \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
- -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
- cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
-
- macos-latest-visionos:
- runs-on: macos-latest
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: Build
- id: cmake_build
- run: |
- sysctl -a
- cmake -B build -G Xcode \
- -DGGML_METAL_EMBED_LIBRARY=ON \
- -DLLAMA_BUILD_COMMON=OFF \
- -DLLAMA_BUILD_APP=OFF \
- -DLLAMA_BUILD_EXAMPLES=OFF \
- -DLLAMA_BUILD_TOOLS=OFF \
- -DLLAMA_BUILD_TESTS=OFF \
- -DLLAMA_BUILD_SERVER=OFF \
- -DCMAKE_SYSTEM_NAME=visionOS \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=1.0 \
- -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
- cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
-
- macos-latest-swift:
- runs-on: macos-latest
- needs: macos-latest-ios-xcode
-
- permissions:
- actions: read
- contents: read
-
- strategy:
- matrix:
- destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: Download xcframework artifact
- uses: actions/download-artifact@v7
- with:
- name: llama-xcframework
- path: build-apple/llama.xcframework/
-
- - name: Build llama.cpp with CMake
- id: cmake_build
- run: |
- sysctl -a
- cmake -B build -G Xcode \
- -DGGML_METAL_EMBED_LIBRARY=ON \
- -DLLAMA_OPENSSL=OFF \
- -DLLAMA_BUILD_APP=OFF \
- -DLLAMA_BUILD_EXAMPLES=OFF \
- -DLLAMA_BUILD_TOOLS=OFF \
- -DLLAMA_BUILD_TESTS=OFF \
- -DLLAMA_BUILD_SERVER=OFF \
- -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
- cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)