2121 fail-fast : false
2222 matrix :
2323 include :
24- # ============ Linux x86_64 ============
25- # Makefile defaults to CPU-only (AVX2) on Linux x86_64
2624 - os : ubuntu-22.04
2725 arch : x86_64
2826 name : linux
3836 name : linux
3937 variant : full
4038
41- # ============ Linux arm64 ============
42- # Makefile defaults to CPU-only (armv8.2-a) on Linux arm64
4339 - os : ubuntu-22.04-arm
4440 arch : arm64
4541 name : linux
5551 name : linux
5652 variant : full
5753
58- # ============ Linux musl x86_64 ============
5954 - os : ubuntu-22.04
6055 arch : x86_64
6156 name : linux-musl
7469 variant : full
7570 container : alpine:latest
7671
77- # ============ Linux musl arm64 ============
7872 - os : ubuntu-22.04-arm
7973 arch : arm64
8074 name : linux-musl
9084 name : linux-musl
9185 variant : full
9286
93- # ============ macOS (universal) ============
94- # Makefile defaults to Metal + Accelerate + BLAS on macOS
9587 - os : macos-15
9688 name : macos
9789 variant : remote
10496 name : macos
10597 variant : full
10698
107- # ============ macOS x86_64 ============
10899 - os : macos-15
109100 arch : x86_64
110101 name : macos
@@ -124,7 +115,6 @@ jobs:
124115 make : ARCH=x86_64
125116 skip_test : true
126117
127- # ============ macOS arm64 ============
128118 - os : macos-15
129119 arch : arm64
130120 name : macos
@@ -141,8 +131,6 @@ jobs:
141131 variant : full
142132 make : ARCH=arm64
143133
144- # ============ Windows x86_64 ============
145- # Makefile defaults to CPU-only (AVX2) on Windows
146134 - os : windows-2022
147135 arch : x86_64
148136 name : windows
@@ -158,8 +146,6 @@ jobs:
158146 name : windows
159147 variant : full
160148
161- # ============ Android arm64-v8a ============
162- # Makefile defaults to CPU-only on Android
163149 - os : ubuntu-22.04
164150 arch : arm64-v8a
165151 name : android
@@ -179,15 +165,14 @@ jobs:
179165 make : PLATFORM=android ARCH=arm64-v8a
180166 skip_test : true
181167
182- # ============ Android armeabi-v7a ( remote only - llama.cpp not well supported) ============
168+ # armeabi-v7a: remote only ( llama.cpp not well supported)
183169 - os : ubuntu-22.04
184170 arch : armeabi-v7a
185171 name : android
186172 variant : remote
187173 make : PLATFORM=android ARCH=armeabi-v7a OMIT_LOCAL_ENGINE=1
188174 skip_test : true
189175
190- # ============ Android x86_64 ============
191176 - os : ubuntu-22.04
192177 arch : x86_64
193178 name : android
@@ -207,8 +192,6 @@ jobs:
207192 make : PLATFORM=android ARCH=x86_64
208193 sqlite-amalgamation-zip : https://sqlite.org/2025/sqlite-amalgamation-3490100.zip
209194
210- # ============ iOS ============
211- # Makefile defaults to Metal + Accelerate + BLAS on iOS
212195 - os : macos-15
213196 name : ios
214197 variant : remote
@@ -225,8 +208,6 @@ jobs:
225208 make : PLATFORM=ios
226209 skip_test : true
227210
228- # ============ iOS Simulator ============
229- # Makefile defaults to Metal + Accelerate + BLAS on iOS Simulator
230211 - os : macos-15
231212 name : ios-sim
232213 variant : remote
@@ -243,13 +224,11 @@ jobs:
243224 make : PLATFORM=ios-sim
244225 skip_test : true
245226
246- # ============ Apple XCFramework (all 3 variants) ============
247227 - os : macos-15
248228 name : apple-xcframework
249229 make : xcframework
250230 skip_test : true
251231
252- # ============ Android AAR (all 3 variants) ============
253232 - os : ubuntu-22.04
254233 name : android-aar
255234 make : aar
@@ -358,19 +337,17 @@ jobs:
358337 - name : android setup test environment
359338 if : matrix.name == 'android' && matrix.arch == 'x86_64'
360339 run : |
361-
362340 echo "::group::enable kvm group perms"
363341 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
364342 sudo udevadm control --reload-rules
365343 sudo udevadm trigger --name-match=kvm
366344 echo "::endgroup::"
367345
368- echo "::group::download and build sqlite3 without SQLITE_OMIT_LOAD_EXTENSION"
346+ echo "::group::build sqlite3 without SQLITE_OMIT_LOAD_EXTENSION"
369347 curl -O ${{ matrix.sqlite-amalgamation-zip }}
370348 unzip sqlite-amalgamation-*.zip
371349 export ${{ matrix.make }}
372350 $ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.arch }}-linux-android26-clang sqlite-amalgamation-*/shell.c sqlite-amalgamation-*/sqlite3.c -o sqlite3 -ldl
373- # remove unused folders to save up space
374351 rm -rf sqlite-amalgamation-*.zip sqlite-amalgamation-*
375352 echo "::endgroup::"
376353
@@ -441,12 +418,10 @@ jobs:
441418 if [ -d "$folder" ]; then
442419 name=$(basename "$folder")
443420 if [[ "$name" == "memory-apple-xcframework" ]]; then
444- # XCFramework has 3 variants: memory-remote, memory-local, memory-full
445421 for variant in remote local full; do
446422 (cd "$folder" && zip -rq "../../memory-apple-xcframework-${variant}-${VERSION}.zip" memory-${variant}.xcframework)
447423 done
448424 elif [[ "$name" == "memory-android-aar" ]]; then
449- # AAR has all variants bundled in one file
450425 cp "$folder"/*.aar "${name}-${VERSION}.aar"
451426 else
452427 tar -czf "${name}-${VERSION}.tar.gz" -C "$folder" .
@@ -463,7 +438,6 @@ jobs:
463438 LATEST_RELEASE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/latest)
464439 LATEST=$(echo "$LATEST_RELEASE" | jq -r '.name')
465440
466- # Check artifact sizes against previous release
467441 if [ -n "$LATEST" ] && [ "$LATEST" != "null" ]; then
468442 echo "Checking artifact sizes against previous release: $LATEST"
469443 FAILED=0
@@ -473,26 +447,18 @@ jobs:
473447 continue
474448 fi
475449
476- # Get current artifact size
477450 NEW_SIZE=$(stat -c%s "$artifact" 2>/dev/null || stat -f%z "$artifact")
478-
479- # Get artifact name for previous release
480451 ARTIFACT_NAME=$(echo "$artifact" | sed "s/${VERSION}/${LATEST}/")
481-
482- # Get previous artifact size from GitHub API
483452 OLD_SIZE=$(echo "$LATEST_RELEASE" | jq -r ".assets[] | select(.name == \"$(basename "$ARTIFACT_NAME")\") | .size")
484453
485454 if [ -z "$OLD_SIZE" ] || [ "$OLD_SIZE" = "null" ]; then
486455 echo "⚠️ Previous artifact not found: $(basename "$ARTIFACT_NAME"), skipping comparison"
487456 continue
488457 fi
489458
490- # Calculate percentage increase
491459 INCREASE=$(awk "BEGIN {printf \"%.2f\", (($NEW_SIZE - $OLD_SIZE) / $OLD_SIZE) * 100}")
492-
493460 echo "📦 $artifact: $OLD_SIZE → $NEW_SIZE bytes (${INCREASE}% change)"
494461
495- # Check if increase is more than 5%
496462 if (( $(echo "$INCREASE > 5" | bc -l) )); then
497463 if [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
498464 echo "⚠️ WARNING: $artifact size increased by ${INCREASE}% (limit: 5%)"
0 commit comments