Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
4942727
fix(workflow): enhance Windows build configurations for CUDA, HIP, an…
Gioee Jul 23, 2025
785e007
fix(workflow): update Windows OpenBLAS build configuration
Gioee Jul 23, 2025
17a3b37
update(workflow): update Windows CUDA
Gioee Jul 24, 2025
8867923
fix(workflow): missing if condition in install cuda step
Gioee Jul 24, 2025
7e61058
fix(workflow): configure CUDA for MinGW on Windows builds
Gioee Jul 24, 2025
d4e0498
fix(workflow): windows test were missing custom make flags
Gioee Jul 24, 2025
b077d72
clear(workflow): update conditional dependencies for Windows Vulkan a…
Gioee Jul 24, 2025
0e6ec65
clear(workflow): remove unnecessary shell specification for Windows V…
Gioee Jul 24, 2025
d9d593f
fix(workflow): update Windows HIP toolkit installation process
Gioee Jul 24, 2025
e81f6e8
fix(workflow): set HIP_PATH and CMAKE_PREFIX_PATH for Windows HIP too…
Gioee Jul 24, 2025
52d3b47
fix(workflow): enhance Windows HIP build configuration with ROCm and …
Gioee Jul 24, 2025
fa29827
fix(workflow): update Windows HIP build configuration
Gioee Jul 24, 2025
cb446c2
fix(workflow): update Windows HIP build configuration
Gioee Jul 24, 2025
0d34e78
fix(workflow): update Windows HIP build configuration to disable CPU …
Gioee Jul 24, 2025
42e6a47
fix(workflow): Windows HIP pwsh path to bash path
Gioee Jul 24, 2025
ea9375b
fix(workflow): correct path handling for HIP and CMAKE_PREFIX in Wind…
Gioee Jul 24, 2025
282615b
fix(workflow): set HIP_PLATFORM to amd and update environment variabl…
Gioee Jul 25, 2025
c2a6297
fix(workflow): update CMake flags for Windows HIP build to remove unn…
Gioee Jul 25, 2025
6a0d7a1
fix(workflow): increase timeout for build job and adjust CUDA host co…
Gioee Jul 25, 2025
4d8e164
fix(workflow): update Windows build steps for sqlite-ai with CUDA and…
Gioee Jul 25, 2025
bd0001a
fix(workflow): add Ninja installation step for Windows CUDA build and…
Gioee Jul 25, 2025
192bb0a
fix(workflow): update Windows build steps to use Ninja and adjust CMa…
Gioee Jul 25, 2025
f55ab9a
fix(workflow): no escape ninja argument windows cuda
Gioee Jul 25, 2025
9bd17b4
fix(workflow): update Windows CUDA build configuration to use Ninja g…
Gioee Jul 25, 2025
4f4ed56
fix(workflow): increase timeout for Windows CUDA build to 60 minutes …
Gioee Jul 25, 2025
ac97374
fix(build): update windows cuda linker flags
Gioee Jul 25, 2025
e26a547
fix(workflow): remove unnecessary LLAMA_ARGS from windows ggml-cuda b…
Gioee Jul 25, 2025
3de582b
fix(build): update WHISPER_OPTIONS to use llama.cpp GGML
Gioee Jul 25, 2025
b565796
fix(build): update WHISPER_OPTIONS and add ggml package config for wh…
Gioee Jul 25, 2025
cddd5a8
fix(build): update ggml package config for whisper.cpp to use new dir…
Gioee Jul 25, 2025
41e887c
fix(build): update ggml package config for whisper.cpp to use new inc…
Gioee Jul 25, 2025
0d5eac0
fix(build): fix windows hip and cuda linker flags
Gioee Jul 26, 2025
1da520a
fix(build): update LLAMA_LDFLAGS to include CUDA and HIP library paths
Gioee Jul 26, 2025
fa3b648
fix(build): update LLAMA_LDFLAGS to link against amdhip64 library for…
Gioee Jul 26, 2025
fdb20f7
fix(build): add msvcrt library to LLAMA_LDFLAGS for Windows support
Gioee Jul 26, 2025
965d43f
fix(build): update LLAMA_LDFLAGS to include vcruntime and ucrt for Wi…
Gioee Jul 26, 2025
3933b53
fix(build): update LLAMA_LDFLAGS for improved Windows support and rem…
Gioee Jul 26, 2025
667fe7e
fix(build): update make command to build extension for Windows
Gioee Jul 26, 2025
d699e61
fix(build): enhance Windows build process for CUDA and HIP support wi…
Gioee Jul 27, 2025
08f3a16
fix(utils): improve timestamp handling for UUID generation across pla…
Gioee Jul 27, 2025
e4656bd
fix(utils): improve Windows compatibility by adjusting header inclusi…
Gioee Jul 27, 2025
ea7594c
fix(build): update linker flags for MSVC compatibility in Makefile
Gioee Jul 28, 2025
94938aa
fix(build): update Windows build configuration for CUDA and HIP support
Gioee Jul 28, 2025
e6a086d
fix(build): update Windows HIP build configuration to use Clang inste…
Gioee Jul 28, 2025
b5de875
fix(build): update MSVC linker flags and library handling for Windows…
Gioee Jul 28, 2025
5f9961f
fix(build): update path for rocwmma library include in Windows HIP bu…
Gioee Jul 28, 2025
c87d436
fix(build): update Windows HIP build configuration to use Clang and c…
Gioee Jul 28, 2025
13b03c8
fix(build): update Windows build process to set PATH for VCTools and …
Gioee Jul 28, 2025
2c03dd9
fix(build): update Windows HIP build configuration to include ROCWMMA…
Gioee Jul 28, 2025
56d1084
feat(workflow): cache dependencies and modules build
Gioee Jul 28, 2025
a6072e0
feat(workflow): disable Windows CUDA and HIP build and test steps to …
Gioee Jul 28, 2025
41da11c
fix(workflow): update cache keys to include OS and architecture for l…
Gioee Jul 28, 2025
3b61188
fix(workflow): include make hash in cache keys for llama, whisper, an…
Gioee Jul 28, 2025
ce9660f
fix(workflow): make command hash cross platform fix
Gioee Jul 28, 2025
353b59c
fix(workflow): rename step to clarify purpose of calculating cache ve…
Gioee Jul 28, 2025
8b77eae
feat(workflow): add support for Windows SYCL builds and install Intel…
Gioee Jul 28, 2025
1f729c5
fix(workflow): use environment variable for make hash calculation in …
Gioee Jul 28, 2025
fb94950
fix(build): enhance support for SYCL builds in Windows and adjust MSV…
Gioee Jul 28, 2025
aa47bf4
fix(workflow): add caching for CUDA toolkit installation on Windows
Gioee Jul 28, 2025
7062c2f
fix(workflow): add verification for Intel OneAPI installation in Wind…
Gioee Jul 28, 2025
4ac603c
run(workflow): skip windows-hip steps to create cache for hip toolkit…
Gioee Jul 28, 2025
0ccd3bd
fix(test): re-enable every sycl, cuda and hip step
Gioee Jul 28, 2025
09fec2c
fix(workflow): update include path for hip build on Windows
Gioee Jul 28, 2025
37f1d75
fix(workflow): add caching for module dependencies and intel oneAPI t…
Gioee Jul 28, 2025
1eac8de
run(workflow): skip failing compilation to cache windows-sycl depende…
Gioee Jul 28, 2025
0551b2a
fix(workflow): re-enable windows-sycl steps
Gioee Jul 28, 2025
ced43b6
fix(build): remove DEF_FILE from link command for MSVC
Gioee Jul 28, 2025
afdae88
fix(build): update MSVC library paths to use backslashes for compatib…
Gioee Jul 28, 2025
62704e1
fix(build): update link command to use absolute path for MSVC linker
Gioee Jul 28, 2025
65d6438
fix(build): update link command to use cmd.exe for MSVC compatibility
Gioee Jul 28, 2025
137c290
fix(build): update MSVC link command to use response file for improve…
Gioee Jul 28, 2025
e9f6d51
fix(build): add checks for build directories and required library fil…
Gioee Jul 28, 2025
25b33a1
fix(build): reorder LLAMA_LIBS for correct library linking in MSVC ta…
Gioee Jul 28, 2025
00a1e1a
fix(build): add CUDA_PATH and MSVC_LIBS echo statements for improved …
Gioee Jul 28, 2025
7e95f85
fix(build): escape quotes in MSVC_LIBS for proper CUDA library linking
Gioee Jul 28, 2025
b045d6a
fix(build): update MSVC link command to use printf for improved forma…
Gioee Jul 28, 2025
a325429
fix(build): add support for HIP Clang in Makefile for improved compat…
Gioee Jul 28, 2025
dff9ef3
fix(build): correct MSVC_LIBS path formatting for CUDA libraries in M…
Gioee Jul 28, 2025
a8e2544
fix(build): add additional MSVC libraries for improved compatibility …
Gioee Jul 28, 2025
71d7fc4
fix(build): add support for additional MSVC libraries and implement s…
Gioee Jul 28, 2025
b77b37c
run(workflow): cache llama, whisper and miniaudio hip builds
Gioee Jul 28, 2025
8da7e7c
fix(workflow): enable hip build
Gioee Jul 28, 2025
9e6403e
fix(build): add HIP_CLANG support for object file compilation
Gioee Jul 28, 2025
43c962b
fix(workflow): install sqlite alongside ninja for cuda, hip, and sycl…
Gioee Jul 28, 2025
3b4aebd
fix(build): quote paths for clang executables in HIP_CLANG configuration
Gioee Jul 28, 2025
3b99fa9
fix(workflow): set CUDA_PATH for windows-cuda in build environment
Gioee Jul 28, 2025
29bc44b
fix(build): correct paths for LLAMA_LIBS and update linker flags for …
Gioee Jul 28, 2025
2671781
fix(build): clear linker flags for WHISPER and MINIAUDIO when using H…
Gioee Jul 28, 2025
551b7fd
fix(build): update LLAMA_LDFLAGS to set linker flags correctly for HI…
Gioee Jul 28, 2025
e44af25
fix(tests): update SQLite command to load AI version from the correct…
Gioee Jul 28, 2025
8621f35
fix(tests): update test command to load AI version from the correct path
Gioee Jul 28, 2025
e667297
fix(build): add linker flags for HIP_CLANG to support shared library …
Gioee Jul 29, 2025
284d731
fix(build): add MSVC libraries for HIP_CLANG support and update linke…
Gioee Jul 29, 2025
b55915b
fix(build): remove unnecessary MSVC libraries for HIP_CLANG support
Gioee Jul 29, 2025
b85a39f
fix(workflow): uncomment and format OneAPI setup for windows-sycl
Gioee Jul 29, 2025
20e36d5
fix(workflow): escape backslashes in OneAPI setvars.bat path for wind…
Gioee Jul 29, 2025
f57c69b
fix(workflow): update OneAPI setvars.bat path handling for windows-sycl
Gioee Jul 29, 2025
b6838f1
fix(workflow): streamline build steps for llama.cpp, whisper.cpp, and…
Gioee Jul 29, 2025
2c6fabd
fix(build): enforce release build type for LLAMA, WHISPER, and MINIAU…
Gioee Jul 29, 2025
82c3d32
fix(build): adjust LLAMA library linking for SYCL on Windows
Gioee Jul 29, 2025
bfee57d
fix(workflow): increase build timeout to 120 minutes and CACHE consol…
Gioee Jul 29, 2025
d589422
fix(build): update LLAMA build configurations for CUDA, HIP, and SYCL…
Gioee Jul 29, 2025
c6935b1
fix(build): adjust llama.cpp build condition
Gioee Jul 29, 2025
cd232e5
fix(build): cache android modules
Gioee Jul 29, 2025
04d0826
fix(build): add adb command to push commands.sh to Android device
Gioee Jul 29, 2025
e4e80a6
fix(build): update LLAMA build flags for windows-gpu and disable unne…
Gioee Jul 29, 2025
bfd98ff
fix(build): remove unnecessary GGML_BACKEND_DL flag for windows-gpu b…
Gioee Jul 29, 2025
859c3d4
fix(build): enable GGML_BACKEND_DL flag for windows-gpu CUDA and HIP …
Gioee Jul 29, 2025
d850711
fix(build): enable dynamic backend loading for Windows builds and adj…
Gioee Jul 29, 2025
0398836
Update main.yml
Gioee Jul 30, 2025
94841bf
fix(build): update llama.cpp build commands for windows-gpu to includ…
Gioee Jul 30, 2025
5ace07a
fix(build): add CUDAToolkit_ROOT environment variable for windows-gpu…
Gioee Jul 30, 2025
b05405e
fix(build): correct CUDAToolkit_ROOT path format for Windows
Gioee Jul 30, 2025
73d678c
fix(build): add CUDA toolkit setup for windows-gpu in workflow
Gioee Jul 30, 2025
0faae7f
fix(build): change shell to cmd for llama.cpp build on windows-gpu
Gioee Jul 30, 2025
b73a1e3
fix(build): add call to setvars.bat for Intel oneAPI in windows-gpu b…
Gioee Jul 30, 2025
594d06f
fix(build): consolidate Linux build configurations and install steps
Gioee Jul 30, 2025
5237375
fix(build): enable dynamic loading backend for Linux builds
Gioee Jul 30, 2025
ea0f366
fix(build): remove backend dynamic loading flag for Linux builds
Gioee Jul 30, 2025
3acfe3e
fix(build): update LLAMA and WHISPER make options for Linux and Windo…
Gioee Jul 30, 2025
fe3e1c2
fix(build): update iOS build configuration for universal binary support
Gioee Jul 30, 2025
0d544b8
fix(build): update make options for LLAMA and WHISPER across all plat…
Gioee Jul 30, 2025
07db5c9
clear(build): change build order
Gioee Jul 30, 2025
19ef0ae
fix(build): update Windows setup conditions and streamline Vulkan pac…
Gioee Jul 30, 2025
257d796
fix(build): enhance iOS Miniaudio options for compatibility with Obje…
Gioee Jul 30, 2025
4cd00d9
fix(build): update llama.cpp build targets for improved compatibility
Gioee Jul 30, 2025
241d7a3
fix(build): set VULKAN_SDK environment variable for Windows build
Gioee Jul 30, 2025
299922c
fix(build): set VULKAN_SDK environment variable for Windows testing
Gioee Jul 30, 2025
aa56334
fix(build): update iOS build settings for universal binary support an…
Gioee Jul 30, 2025
baabbe5
fix(build): update Windows build environment setup for llama.cpp
Gioee Jul 30, 2025
c6b2c54
fix(build): test build cuda
Gioee Jul 30, 2025
9dda222
fix(build): add call to setvars.bat for Intel oneAPI environment setu…
Gioee Jul 30, 2025
ec1ca90
restore ios and isim makefile
Gioee Jul 30, 2025
573b32f
fix(build): update iOS make command to use 'isim' platform for compat…
Gioee Jul 30, 2025
4d8a497
fix(build): add iOS support for Miniaudio options in Makefile
Gioee Jul 30, 2025
12b6c50
fix(build): update iOS make command
Gioee Jul 30, 2025
6a0aa70
fix(build): update iOS build configuration for isim platform
Gioee Jul 30, 2025
5021cb0
fix(build): update iSIM build configuration for arm64 architecture
Gioee Jul 30, 2025
ecf6dcc
fix(build): enhance iOS support for 'isim' platform with multi-archit…
Gioee Jul 30, 2025
182cf13
fix(build): simplify make commands for windows-gpu and remove unused …
Gioee Jul 30, 2025
aad5a77
fix(build): update Windows build conditions to use 'windows-latest' a…
Gioee Jul 30, 2025
594e660
Windows gpu enable cpu
Gioee Jul 30, 2025
0eff14f
Cpu all variants
Gioee Jul 30, 2025
c9f533f
Update main.yml
Gioee Jul 31, 2025
4e0f9ef
fix(build): resolve symbol conflicts for GGML_STATIC Windows builds
Gioee Jul 31, 2025
d1d9b95
fix(build): update make options for Linux and Windows to enable Vulka…
Gioee Jul 31, 2025
fd617e6
fix(build): remove OpenBLAS installation from Linux workflow and stre…
Gioee Jul 31, 2025
6d0d921
fix(build): add static linking flags for Linux to improve compatibility
Gioee Jul 31, 2025
06298ca
fix(build): update linker and compiler flags for Linux to enhance com…
Gioee Jul 31, 2025
34dc114
fix(build): update Ubuntu version in workflow and remove deprecated C…
Gioee Jul 31, 2025
57c824f
fix(build): simplify compiler flags for Windows builds and remove unu…
Gioee Jul 31, 2025
ac4801c
fix(build): remove static linking support for CUDA, HIP, and SYCL in …
Gioee Jul 31, 2025
05665c3
fix(build): correct object file extension handling in Makefile
Gioee Jul 31, 2025
5feee7a
fix(build): streamline LLAMA_OPTIONS and linker flags for shared libr…
Gioee Jul 31, 2025
74940b9
fix(src): remove msvc changes
Gioee Jul 31, 2025
970bc1e
fix(build): standardize formatting of LLAMA_OPTIONS and LLAMA_LDFLAGS…
Gioee Jul 31, 2025
7ef315d
fix(src): revert msvc changes
Gioee Jul 31, 2025
cfdac8e
fix(build): adjust LLAMA_OPTIONS and LDFLAGS for shared library support
Gioee Jul 31, 2025
cddcd6b
fix(build): enable shared library support for Whisper and Miniaudio
Gioee Jul 31, 2025
f4567af
fix(build): conditionally include Vulkan and OpenCL dependencies for …
Gioee Jul 31, 2025
2142291
fix(build): remove unnecessary installation of ninja and sqlite for w…
Gioee Jul 31, 2025
d3395e8
fix(build): ensure conditional inclusion of Vulkan and OpenCL depende…
Gioee Jul 31, 2025
e332062
fix(build): add ggml build directory to caching and update library paths
Gioee Jul 31, 2025
f09d44c
fix(build): update CMake command for Whisper to use CMAKE_PREFIX_PATH
Gioee Jul 31, 2025
2ca11e1
fix(build): ensure object files depend on llama.cpp.stamp for proper …
Gioee Jul 31, 2025
27ecaec
fix(build): disable OpenMP for LLAMA and WHISPER on macOS
Gioee Jul 31, 2025
f1aa3d5
fix(build): remove duplicate ggml-blas library from macOS and iOS bui…
Gioee Jul 31, 2025
ea7fe35
fix(build): update test command to conditionally include make options
Gioee Jul 31, 2025
8393a81
fix(build): update Whisper build command to use ggml_DIR for CMake
Gioee Jul 31, 2025
62dbd6e
fix(build): update WHISPER_OPTIONS to include ggml_DIR for CMake conf…
Gioee Jul 31, 2025
b7dbc72
fix(build): update WHISPER_OPTIONS to use CMAKE_PREFIX_PATH for ggml …
Gioee Jul 31, 2025
c7e9d6d
fix(build): update WHISPER_OPTIONS to set ggml_DIR for CMake configur…
Gioee Jul 31, 2025
f7465cb
fix(build): add ggml_DIR to WHISPER_OPTIONS for CMake configuration
Gioee Jul 31, 2025
049663e
fix(build): ensure ggml_DIR is set correctly in Whisper build command
Gioee Jul 31, 2025
82a6629
fix(build): export ggml_DIR for CMake configuration in Whisper build …
Gioee Jul 31, 2025
5d5227c
fix(build): remove redundant export of ggml_DIR in Whisper build process
Gioee Jul 31, 2025
a59b816
fix(build): update ggml_DIR configuration for Whisper build process
Gioee Jul 31, 2025
c4160f1
fix(build): update Whisper build options for iOS and isim platforms
Gioee Jul 31, 2025
9364665
fix(build): update CMake command for Whisper build to include CMAKE_P…
Gioee Jul 31, 2025
b44d376
fix(build): update CMake command for Whisper build to specify ggml_DIR
Gioee Jul 31, 2025
58a038c
fix(build): update CMake command for Whisper build to use absolute pa…
Gioee Jul 31, 2025
9c77828
fix(build): disable GGML_OPENMP for iOS and isim platforms in build o…
Gioee Jul 31, 2025
6a772d9
fix(build): simplify CMake command for Whisper build by removing redu…
Gioee Jul 31, 2025
9987a97
fix(build): update CMake command for Whisper build to use -D flag for…
Gioee Jul 31, 2025
540e10e
fix(build): update CMake command for Whisper build to use ggml_DIR in…
Gioee Jul 31, 2025
be39ddb
fix(build): add additional Miniaudio dependencies to linker flags
Gioee Jul 31, 2025
98f3434
fix(build): refactor Makefile and Workflow file
Gioee Jul 31, 2025
46d46a6
fix(build): update macOS build configuration and refine Android make …
Gioee Jul 31, 2025
627013c
fix(build): update make options for LLAMA and WHISPER in macOS and Li…
Gioee Jul 31, 2025
2ca12d1
fix(build): include Makefile hash in cache keys for llama, whisper, a…
Gioee Jul 31, 2025
5a92831
Merge branch 'main' into add-win-builds
Gioee Jul 31, 2025
ed0ad36
fix(build): update Android make options to enable AVX2 and FMA optimi…
Gioee Jul 31, 2025
31318a0
bump version
Gioee Jul 31, 2025
9685a56
fix(build): remove unnecessary make options for Android build
Gioee Jul 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 135 additions & 112 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,108 +10,53 @@ jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }} build${{ matrix.arch != 'arm64-v8a' && matrix.name != 'isim' && matrix.name != 'ios' && ' + test' || ''}}
timeout-minutes: 20
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
# Linux builds
- os: ubuntu-latest
- os: macos-latest
name: macos
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple" WHISPER="-DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON"
- os: ubuntu-22.04
arch: x86_64
name: linux-cpu
make: LLAMA="-DGGML_NATIVE=ON"
- os: ubuntu-latest
arch: x86_64
name: linux-cpu-avx2
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_AVX2=ON -DGGML_FMA=ON -DGGML_F16C=ON"
- os: ubuntu-latest
arch: x86_64
name: linux-cpu-avx512
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX512_VNNI=ON"
- os: ubuntu-latest
arch: x86_64
name: linux-openblas
make: LLAMA="-DGGML_NATIVE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
- os: ubuntu-latest
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU=ON -DGGML_AVX2=ON"
- os: ubuntu-22.04
arch: x86_64
name: linux-vulkan
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_VULKAN=ON"
- os: ubuntu-latest
arch: x86_64
name: linux-opencl
make: LLAMA="-DGGML_NATIVE=ON -DGGML_OPENCL=ON"

# Linux ARM64 builds
name: linux-gpu
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU=ON -DGGML_VULKAN=ON -DGGML_OPENCL=ON"
- os: LinuxARM64
arch: arm64
name: linux-cpu
make: LLAMA="-DGGML_NATIVE=ON"
- os: LinuxARM64
arch: arm64
name: linux-neon
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8.2-a"
- os: LinuxARM64
arch: arm64
name: linux-openblas
make: LLAMA="-DGGML_NATIVE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU=ON -DGGML_CPU_ARM_ARCH=armv8.2-a"
- os: LinuxARM64
arch: arm64
name: linux-vulkan
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_VULKAN=ON"
- os: LinuxARM64
arch: arm64
name: linux-opencl
make: LLAMA="-DGGML_NATIVE=ON -DGGML_OPENCL=ON"

# macOS builds
- os: macos-latest
name: macos
make: LLAMA="-DGGML_NATIVE=ON -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple" WHISPER="-DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple -DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON"

# Windows builds
name: linux-gpu
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU=ON -DGGML_VULKAN=ON -DGGML_OPENCL=ON"
- os: windows-latest
arch: x86_64
name: windows-cpu
make: LLAMA="-DGGML_NATIVE=ON"
- os: windows-latest
arch: x86_64
name: windows-cpu-avx2
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_AVX2=ON -DGGML_FMA=ON -DGGML_F16C=ON -DGGML_BMI2=ON -DGGML_SSE42=ON"
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU=ON -DGGML_AVX2=ON"
- os: windows-latest
arch: x86_64
name: windows-cpu-avx512
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX512_VNNI=ON -DGGML_AVX512_VBMI=ON -DGGML_AVX512_BF16=ON"
# - os: windows-latest
# arch: x86_64
# name: windows-openblas
# make: LLAMA="-DGGML_NATIVE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
# - os: windows-latest
# arch: x86_64
# name: windows-vulkan
# make: LLAMA="-DGGML_NATIVE=OFF -DGGML_VULKAN=ON"
# - os: windows-latest
# arch: x86_64
# name: windows-opencl
# make: LLAMA="-DGGML_NATIVE=ON -DGGML_OPENCL=ON"

# Android builds
- os: ubuntu-latest
arch: arm64-v8a
name: android
make: PLATFORM=android ARCH=arm64-v8a
name: windows-gpu
make: LLAMA="-DGGML_NATIVE=OFF -DGGML_CPU=ON -DGGML_VULKAN=ON -DGGML_OPENCL=ON"
- os: ubuntu-latest
arch: x86_64
name: android
make: PLATFORM=android ARCH=x86_64
sqlite-amalgamation-zip: https://sqlite.org/2025/sqlite-amalgamation-3490100.zip

# iOS builds
- os: ubuntu-latest
arch: arm64-v8a
name: android
make: PLATFORM=android ARCH=arm64-v8a LLAMA="-DGGML_CPU_ARM_ARCH=armv8.2-a+dotprod"
- os: macos-latest
name: ios
make: PLATFORM=ios
make: PLATFORM=ios LLAMA="-DGGML_NATIVE=OFF -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple" WHISPER="-DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON"
- os: macos-latest
name: isim
make: PLATFORM=isim
make: PLATFORM=isim LLAMA="-DGGML_NATIVE=OFF -DGGML_METAL=ON -DGGML_ACCELERATE=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=Apple" WHISPER="-DWHISPER_COREML=ON -DWHISPER_COREML_ALLOW_FALLBACK=ON"

defaults:
run:
Expand All @@ -123,6 +68,38 @@ jobs:
with:
submodules: true

- name: calculate cache version hashes for modules and dependencies
id: submodule-hashes
env:
MATRIX_MAKE: ${{ matrix.make && matrix.make || '' }}
run: |
LLAMA_HASH=$(git -C modules/llama.cpp rev-parse HEAD)
WHISPER_HASH=$(git -C modules/whisper.cpp rev-parse HEAD)
MINIAUDIO_HASH=$(git -C modules/miniaudio rev-parse HEAD)
if command -v sha256sum >/dev/null 2>&1; then
MAKE_HASH=$(echo "$MATRIX_MAKE" | sha256sum | cut -d' ' -f1)
MAKEFILE_HASH=$(sha256sum Makefile | cut -d' ' -f1)
DPCPP_MKL_HASH=$(echo "$WINDOWS_DPCPP_MKL" | sha256sum | cut -d' ' -f1)
BASEKIT_URL_HASH=$(echo "$WINDOWS_BASEKIT_URL" | sha256sum | cut -d' ' -f1)
elif command -v shasum >/dev/null 2>&1; then
MAKE_HASH=$(echo "$MATRIX_MAKE" | shasum -a 256 | cut -d' ' -f1)
MAKEFILE_HASH=$(shasum -a 256 Makefile | cut -d' ' -f1)
DPCPP_MKL_HASH=$(echo "$WINDOWS_DPCPP_MKL" | shasum -a 256 | cut -d' ' -f1)
BASEKIT_URL_HASH=$(echo "$WINDOWS_BASEKIT_URL" | shasum -a 256 | cut -d' ' -f1)
else
MAKE_HASH=$(echo "$MATRIX_MAKE" | openssl dgst -sha256 | cut -d' ' -f2)
MAKEFILE_HASH=$(openssl dgst -sha256 Makefile | cut -d' ' -f2)
DPCPP_MKL_HASH=$(echo "$WINDOWS_DPCPP_MKL" | openssl dgst -sha256 | cut -d' ' -f2)
BASEKIT_URL_HASH=$(echo "$WINDOWS_BASEKIT_URL" | openssl dgst -sha256 | cut -d' ' -f2)
fi
echo "llama=$LLAMA_HASH" >> $GITHUB_OUTPUT
echo "whisper=$WHISPER_HASH" >> $GITHUB_OUTPUT
echo "miniaudio=$MINIAUDIO_HASH" >> $GITHUB_OUTPUT
echo "make=$MAKE_HASH" >> $GITHUB_OUTPUT
echo "makefile=$MAKEFILE_HASH" >> $GITHUB_OUTPUT
echo "dpcpp-mkl=$DPCPP_MKL_HASH" >> $GITHUB_OUTPUT
echo "basekit-url=$BASEKIT_URL_HASH" >> $GITHUB_OUTPUT

- uses: msys2/setup-msys2@v2.27.0
if: matrix.os == 'windows-latest'
with:
Expand All @@ -133,25 +110,18 @@ jobs:
sqlite
mingw-w64-x86_64-cc
mingw-w64-x86_64-cmake
${{ contains(matrix.name, 'vulkan') && 'mingw-w64-x86_64-vulkan-headers' || '' }}
${{ contains(matrix.name, 'vulkan') && 'mingw-w64-x86_64-vulkan-loader' || '' }}
${{ contains(matrix.name, 'vulkan') && 'mingw-w64-x86_64-shaderc' || '' }}
${{ contains(matrix.name, 'openblas') && 'mingw-w64-x86_64-openblas' || '' }}
${{ contains(matrix.name, 'opencl') && 'mingw-w64-x86_64-opencl-headers' || '' }}
${{ contains(matrix.name, 'opencl') && 'mingw-w64-x86_64-opencl-icd' || '' }}

- name: linux install openblas
if: matrix.name == 'linux-openblas'
run: |
sudo apt-get install -y libopenblas-dev
${{ matrix.name == 'windows-gpu' && 'mingw-w64-x86_64-vulkan-headers' || '' }}
${{ matrix.name == 'windows-gpu' && 'mingw-w64-x86_64-vulkan-loader' || '' }}
${{ matrix.name == 'windows-gpu' && 'mingw-w64-x86_64-shaderc' || '' }}
${{ matrix.name == 'windows-gpu' && 'mingw-w64-x86_64-opencl-headers' || '' }}
${{ matrix.name == 'windows-gpu' && 'mingw-w64-x86_64-opencl-icd' || '' }}

- name: linux install opencl
if: matrix.name == 'linux-opencl'
run: |
sudo apt-get install -y opencl-headers ocl-icd-opencl-dev
if: matrix.name == 'linux-gpu'
run: sudo apt-get install -y opencl-headers ocl-icd-opencl-dev

- name: linux-x86_64 install vulkan
if: matrix.name == 'linux-vulkan' && matrix.arch == 'x86_64'
if: matrix.name == 'linux-gpu' && matrix.arch == 'x86_64'
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
Expand All @@ -168,7 +138,7 @@ jobs:
echo "VK_ADD_LAYER_PATH=$VK_ADD_LAYER_PATH" >> $GITHUB_ENV

- name: linux-arm64 install vulkan
if: matrix.name == 'linux-vulkan' && matrix.arch == 'arm64'
if: matrix.name == 'linux-gpu' && matrix.arch == 'arm64'
run: |
sudo dpkg --add-architecture arm64

Expand All @@ -181,26 +151,75 @@ jobs:
EOF

sudo apt-get update || true ;# Prevent failure due to missing URLs.
sudo apt-get install -y --no-install-recommends build-essential glslc crossbuild-essential-arm64 libvulkan-dev:arm64

sudo apt-get install -y --no-install-recommends \
build-essential \
glslc \
crossbuild-essential-arm64 \
libvulkan-dev:arm64
- name: cache llama.cpp build
id: cache-llama
uses: actions/cache@v4
with:
path: |
build/ggml
build/llama.cpp
build/llama.cpp.stamp
key: llama-${{ matrix.name }}-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.submodule-hashes.outputs.llama }}-${{ hashFiles('modules/llama.cpp/**') }}-${{ steps.submodule-hashes.outputs.make }}-${{ steps.submodule-hashes.outputs.makefile }}

- name: windows setup vulkan environment
if: matrix.name == 'windows-vulkan'
run: |
# MSYS2 Vulkan packages are already installed, just set up environment
echo "VULKAN_SDK=C:/msys64/mingw64" >> $GITHUB_ENV
shell: bash
- name: cache whisper.cpp build
id: cache-whisper
uses: actions/cache@v4
with:
path: |
build/whisper.cpp
build/whisper.cpp.stamp
key: whisper-${{ matrix.name }}-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.submodule-hashes.outputs.whisper }}-${{ hashFiles('modules/whisper.cpp/**') }}-${{ steps.submodule-hashes.outputs.make }}-${{ steps.submodule-hashes.outputs.makefile }}

- name: cache miniaudio build
id: cache-miniaudio
uses: actions/cache@v4
with:
path: |
build/miniaudio
build/miniaudio.stamp
key: miniaudio-${{ matrix.name }}-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.submodule-hashes.outputs.miniaudio }}-${{ hashFiles('modules/miniaudio/**') }}-${{ steps.submodule-hashes.outputs.make }}-${{ steps.submodule-hashes.outputs.makefile }}

- name: windows build llama.cpp
if: matrix.os == 'windows-latest' && steps.cache-llama.outputs.cache-hit != 'true'
shell: msys2 {0}
run: make build/llama.cpp.stamp ${{ matrix.make && matrix.make || ''}}
env:
VULKAN_SDK: "C:/msys64/mingw64"

- name: unix build llama.cpp
if: matrix.os != 'windows-latest' && steps.cache-llama.outputs.cache-hit != 'true'
run: make build/llama.cpp.stamp ${{ matrix.make && matrix.make || ''}}

- name: windows build whisper.cpp
if: matrix.os == 'windows-latest' && steps.cache-whisper.outputs.cache-hit != 'true'
shell: msys2 {0}
run: make build/whisper.cpp.stamp ${{ matrix.make && matrix.make || ''}}
env:
VULKAN_SDK: "C:/msys64/mingw64"

- name: unix build whisper.cpp
if: matrix.os != 'windows-latest' && steps.cache-whisper.outputs.cache-hit != 'true'
run: make build/whisper.cpp.stamp ${{ matrix.make && matrix.make || ''}}

- name: windows build miniaudio
if: matrix.os == 'windows-latest' && steps.cache-miniaudio.outputs.cache-hit != 'true'
shell: msys2 {0}
run: make build/miniaudio.stamp ${{ matrix.make && matrix.make || ''}}

- name: unix build miniaudio
if: matrix.os != 'windows-latest' && steps.cache-miniaudio.outputs.cache-hit != 'true'
run: make build/miniaudio.stamp ${{ matrix.make && matrix.make || ''}}

- name: windows build sqlite-ai
if: matrix.os == 'windows-latest'
run: make extension ${{ matrix.make && matrix.make || ''}}
shell: msys2 {0}
env:
VULKAN_SDK: "C:/msys64/mingw64"

- name: build sqlite-ai
- name: unix build sqlite-ai
if: matrix.os != 'windows-latest'
run: make extension ${{ matrix.make && matrix.make || ''}}

Expand Down Expand Up @@ -235,7 +254,6 @@ jobs:
$(make test PLATFORM=$PLATFORM ARCH=$ARCH -n)
EOF
# remove big unused folders to avoid emulator errors
rm -rf build modules
echo "::endgroup::"

- name: android test sqlite-ai
Expand All @@ -247,17 +265,22 @@ jobs:
script: |
adb root
adb remount
adb push ${{ github.workspace }}/. /data/local/tmp/
adb push ${{ github.workspace }}/commands.sh /data/local/tmp/
adb push ${{ github.workspace }}/sqlite3 /data/local/tmp/
adb push ${{ github.workspace }}/dist /data/local/tmp/
adb push ${{ github.workspace }}/Makefile /data/local/tmp/
adb shell "sh /data/local/tmp/commands.sh"

- name: windows test sqlite-ai
if: startsWith(matrix.name, 'windows-')
run: make test
if: matrix.os == 'windows-latest'
run: make test ${{ matrix.make && matrix.make || ''}}
shell: msys2 {0}
env:
VULKAN_SDK: "C:/msys64/mingw64"

- name: test sqlite-ai
if: startsWith(matrix.name, 'linux-') || matrix.name == 'macos'
run: make test
- name: unix test sqlite-ai
if: contains(matrix.name, 'linux') || matrix.name == 'macos'
run: make test ${{ matrix.make && matrix.make || ''}}

- uses: actions/upload-artifact@v4.6.2
if: always()
Expand Down Expand Up @@ -316,4 +339,4 @@ jobs:
ai-*-${{ steps.tag.outputs.version }}.zip
ai-*-${{ steps.tag.outputs.version }}.tar.xz
ai-*-${{ steps.tag.outputs.version }}.tar.gz
make_latest: true
make_latest: true
Loading
Loading