@@ -47,11 +47,19 @@ jobs:
4747 uses : actions/checkout@v6
4848
4949 - name : ccache
50- uses : ggml-org/ccache-action@v1.2.21
50+ uses : ggml-org/ccache-action@v1.2.24
5151 with :
5252 key : apple-arm64
53- evict-old-files : 1d
54- save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
53+ save : false
54+
55+ - name : ccache-buckets-restore
56+ uses : ./.github/actions/ccache-buckets
57+ env :
58+ HF_TOKEN : ${{ secrets.HF_TOKEN_CI }}
59+ with :
60+ key : apple-arm64
61+ folder : llama.cpp
62+ hf_bucket : ggml-org/cache
5563
5664 - name : Build
5765 id : cmake_build
@@ -66,24 +74,32 @@ jobs:
6674 -DGGML_RPC=ON \
6775 -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
6876 time cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
69- leaks -atExit -- ./build/bin/test-thread-safety -hf ggml-org/gemma-3-270m-qat-GGUF -ngl 99 -p "$(printf 'hello %.0s' {1..128})" -n 16 -c 512 -ub 32 -np 2 -t 2 -lv 1
77+
78+ - name : ccache-buckets-save
79+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
80+ uses : ./.github/actions/ccache-buckets
81+ env :
82+ HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
83+ with :
84+ key : apple-arm64
85+ folder : llama.cpp
86+ evict-old-files : 1d
87+ hf_bucket : ggml-org/cache
88+ save : true
89+
90+ - name : Check for leaks
91+ run : |
92+ cmd=(./build/bin/test-thread-safety -hf ggml-org/gemma-3-270m-qat-GGUF -ngl 99 -p "$(printf 'hello %.0s' {1..128})" -n 16 -c 512 -ub 32 -np 2 -t 2 -lv 1)
93+ leaks -atExit -- "${cmd[@]}"
94+ # Graphics devices are leaked by Metal in Apple code sometimes, so we ignore those leaks
95+ OBJC_DEBUG_MISSING_POOLS=YES "${cmd[@]}" 2>&1 | awk '{ print } index($0, "autoreleased with no pool in place") && !/class [a-zA-Z0-9]+Device autoreleased/ { found = 1 } END { exit found }'
7096
7197 - name : Test
7298 id : cmake_test
7399 run : |
74100 cd build
75101 ctest -L main -E "test-llama-archs" --verbose --timeout 900
76102
77- - name : ccache-clear
78- uses : ./.github/actions/ccache-clear
79- env :
80- GH_TOKEN : ${{ github.token }}
81- with :
82- key : apple-arm64
83- older : 5m
84- min : 1
85- dry-run : ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
86-
87103 macos-latest-x64 :
88104 runs-on : macos-15-intel
89105
@@ -93,11 +109,19 @@ jobs:
93109 uses : actions/checkout@v6
94110
95111 - name : ccache
96- uses : ggml-org/ccache-action@v1.2.21
112+ uses : ggml-org/ccache-action@v1.2.24
97113 with :
98114 key : apple-x64
99- evict-old-files : 1d
100- save : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
115+ save : false
116+
117+ - name : ccache-buckets-restore
118+ uses : ./.github/actions/ccache-buckets
119+ env :
120+ HF_TOKEN : ${{ secrets.HF_TOKEN_CI }}
121+ with :
122+ key : apple-x64
123+ folder : llama.cpp
124+ hf_bucket : ggml-org/cache
101125
102126 - name : Build
103127 id : cmake_build
@@ -114,22 +138,24 @@ jobs:
114138 -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
115139 time cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
116140
141+ - name : ccache-buckets-save
142+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
143+ uses : ./.github/actions/ccache-buckets
144+ env :
145+ HF_TOKEN : ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
146+ with :
147+ key : apple-x64
148+ folder : llama.cpp
149+ evict-old-files : 1d
150+ hf_bucket : ggml-org/cache
151+ save : true
152+
117153 - name : Test
118154 id : cmake_test
119155 run : |
120156 cd build
121157 ctest -L main --verbose --timeout 900
122158
123- - name : ccache-clear
124- uses : ./.github/actions/ccache-clear
125- env :
126- GH_TOKEN : ${{ github.token }}
127- with :
128- key : apple-x64
129- older : 5m
130- min : 1
131- dry-run : ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
132-
133159 macos-latest-ios-xcode :
134160 runs-on : macos-latest
135161
0 commit comments