3636 CMAKE_ARGS : " -DLLAMA_BUILD_EXAMPLES=ON -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON"
3737
3838jobs :
39- macOS-arm64 :
40- runs-on : macos-14
41-
42- steps :
43- - name : Clone
44- id : checkout
45- uses : actions/checkout@v6
46- with :
47- fetch-depth : 0
48-
49- - name : ccache
50- uses : ggml-org/ccache-action@v1.2.21
51- with :
52- key : macOS-latest-arm64
53- evict-old-files : 1d
54-
55- - name : Build
56- id : cmake_build
57- run : |
58- sysctl -a
59- cmake -B build \
60- -DCMAKE_INSTALL_RPATH='@loader_path' \
61- -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
62- -DLLAMA_FATAL_WARNINGS=ON \
63- -DLLAMA_BUILD_BORINGSSL=ON \
64- -DGGML_METAL_USE_BF16=ON \
65- -DGGML_METAL_EMBED_LIBRARY=ON \
66- -DGGML_RPC=ON \
67- ${{ env.CMAKE_ARGS }}
68- cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
69-
70- - name : Determine tag name
71- id : tag
72- uses : ./.github/actions/get-tag-name
73-
74- - name : Pack artifacts
75- id : pack_artifacts
76- run : |
77- cp LICENSE ./build/bin/
78- tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
79-
80- - name : Upload artifacts
81- uses : actions/upload-artifact@v6
82- with :
83- path : llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz
84- name : llama-bin-macos-arm64.tar.gz
39+ macOS-cpu :
40+ strategy :
41+ matrix :
42+ include :
43+ - build : ' arm64'
44+ arch : ' arm64'
45+ os : macos-14
46+ defines : " -DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON"
47+ - build : ' arm64-kleidiai'
48+ arch : ' arm64'
49+ os : macos-14
50+ defines : " -DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_CPU_KLEIDIAI=ON"
51+ - build : ' x64'
52+ arch : ' x64'
53+ os : macos-15-intel
54+ # Metal is disabled on x64 due to intermittent failures with Github runners not having a GPU:
55+ # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313
56+ defines : " -DGGML_METAL=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3"
8557
86- macOS-x64 :
87- runs-on : macos-15-intel
58+ runs-on : ${{ matrix.os }}
8859
8960 steps :
9061 - name : Clone
@@ -96,23 +67,20 @@ jobs:
9667 - name : ccache
9768 uses : ggml-org/ccache-action@v1.2.21
9869 with :
99- key : macOS-latest-x64
70+ key : macOS-latest-${{ matrix.arch }}
10071 evict-old-files : 1d
10172
10273 - name : Build
10374 id : cmake_build
10475 run : |
10576 sysctl -a
106- # Metal is disabled due to intermittent failures with Github runners not having a GPU:
107- # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313
10877 cmake -B build \
78+ ${{ matrix.defines }} \
10979 -DCMAKE_INSTALL_RPATH='@loader_path' \
11080 -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
11181 -DLLAMA_FATAL_WARNINGS=ON \
11282 -DLLAMA_BUILD_BORINGSSL=ON \
113- -DGGML_METAL=OFF \
114- -DGGML_RPC=ON \
115- -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
83+ ${{ env.CMAKE_ARGS }}
11684 cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
11785
11886 - name : Determine tag name
@@ -123,13 +91,13 @@ jobs:
12391 id : pack_artifacts
12492 run : |
12593 cp LICENSE ./build/bin/
126- tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-x64 .tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
94+ tar -czvf llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }} .tar.gz -s ",./,llama-${{ steps.tag.outputs.name }}/," -C ./build/bin .
12795
12896 - name : Upload artifacts
12997 uses : actions/upload-artifact@v6
13098 with :
131- path : llama-${{ steps.tag.outputs.name }}-bin-macos-x64 .tar.gz
132- name : llama-bin-macos-x64 .tar.gz
99+ path : llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }} .tar.gz
100+ name : llama-bin-macos-${{ matrix.build }} .tar.gz
133101
134102 ubuntu-cpu :
135103 strategy :
@@ -1003,8 +971,7 @@ jobs:
1003971 - ubuntu-cpu
1004972 - ubuntu-vulkan
1005973 - ubuntu-24-openvino
1006- - macOS-arm64
1007- - macOS-x64
974+ - macOS-cpu
1008975 - ios-xcode-build
1009976 - openEuler-cann
1010977
@@ -1081,6 +1048,7 @@ jobs:
10811048
10821049 **macOS/iOS:**
10831050 - [macOS Apple Silicon (arm64)](https://github.com/Thireus/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz)
1051+ - [macOS Apple Silicon (arm64, KleidiAI enabled)](https://github.com/Thireus/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64-kleidiai.tar.gz)
10841052 - [macOS Intel (x64)](https://github.com/Thireus/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-x64.tar.gz)
10851053 - [iOS XCFramework](https://github.com/Thireus/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-xcframework.zip)
10861054
0 commit comments