@@ -14,12 +14,12 @@ jobs:
1414 os : [ubuntu-22.04, windows-2022, macos-14, macos-15]
1515
1616 steps :
17- - uses : actions/checkout@v4
17+ - uses : actions/checkout@v6
1818 with :
1919 submodules : " recursive"
2020
2121 # Used to host cibuildwheel
22- - uses : actions/setup-python@v5
22+ - uses : actions/setup-python@v6
2323 with :
2424 python-version : " 3.9"
2525
@@ -42,13 +42,16 @@ jobs:
4242 shell : cmd
4343
4444 - name : Build wheels
45- uses : pypa/cibuildwheel@v2.22.0
45+ uses : pypa/cibuildwheel@v3.4.1
4646 env :
4747 # Keep repair disabled by default for non-Linux platforms in this job.
4848 CIBW_REPAIR_WHEEL_COMMAND : " "
4949 # Linux needs auditwheel repair so manylinux and musllinux wheels are
5050 # published with distinct platform tags instead of generic linux tags.
5151 CIBW_REPAIR_WHEEL_COMMAND_LINUX : " LD_LIBRARY_PATH=/project/llama_cpp/lib auditwheel repair -w {dest_dir} {wheel}"
52+ # cibuildwheel v3 defaults to manylinux_2_28 images whose current
53+ # GCC toolchain emits symbols newer than the policy allows.
54+ CIBW_MANYLINUX_X86_64_IMAGE : " manylinux2014"
5255 # The release wheel is tagged py3-none, so one build per platform
5356 # covers all supported Python versions and avoids duplicate names.
5457 CIBW_BUILD_LINUX : " cp38-*"
6669 package-dir : .
6770 output-dir : wheelhouse
6871
69- - uses : actions/upload-artifact@v4
72+ - uses : actions/upload-artifact@v7
7073 with :
7174 name : wheels-${{ matrix.os }}
7275 path : ./wheelhouse/*.whl
@@ -75,16 +78,18 @@ jobs:
7578 name : Build arm64 wheels
7679 runs-on : ubuntu-24.04-arm
7780 steps :
78- - uses : actions/checkout@v4
81+ - uses : actions/checkout@v6
7982 with :
8083 submodules : " recursive"
8184
8285 - name : Build wheels
83- uses : pypa/cibuildwheel@v2.22.0
86+ uses : pypa/cibuildwheel@v3.4.1
8487 env :
85- CIBW_SKIP : " *musllinux* pp*"
86- CIBW_REPAIR_WHEEL_COMMAND : " "
88+ CIBW_SKIP : " pp*"
89+ CIBW_REPAIR_WHEEL_COMMAND : " LD_LIBRARY_PATH=$PWD/llama_cpp/lib auditwheel repair -w {dest_dir} {wheel} "
8790 CIBW_ARCHS : " aarch64"
91+ # Keep this consistent with the x86_64 Linux release wheels.
92+ CIBW_MANYLINUX_AARCH64_IMAGE : " manylinux2014"
8893 # Keep native arm64 builds on a portable CPU baseline instead of
8994 # tuning wheels to the hosted runner.
9095 CIBW_ENVIRONMENT : CMAKE_ARGS="-DGGML_NATIVE=off"
@@ -95,74 +100,86 @@ jobs:
95100 output-dir : wheelhouse
96101
97102 - name : Upload wheels as artifacts
98- uses : actions/upload-artifact@v4
103+ uses : actions/upload-artifact@v7
99104 with :
100105 name : wheels_arm64
101106 path : ./wheelhouse/*.whl
102107
103108 build_wheels_riscv64 :
104- name : Build riscv64 wheels (${{ matrix.shard.name }})
109+ name : Build riscv64 wheel
105110 runs-on : ubuntu-latest
106- strategy :
107- fail-fast : false
108- matrix :
109- shard :
110- - name : cp310
111- build : " cp310-*"
112- artifact : wheels_riscv64_cp310
113- - name : cp311
114- build : " cp311-*"
115- artifact : wheels_riscv64_cp311
116- - name : cp312
117- build : " cp312-*"
118- artifact : wheels_riscv64_cp312
119- - name : cp313
120- build : " cp313-*"
121- artifact : wheels_riscv64_cp313
122- - name : cp314
123- build : " cp314-*"
124- artifact : wheels_riscv64_cp314
125111 steps :
126- - uses : actions/checkout@v4
112+ - uses : actions/checkout@v6
127113 with :
128114 submodules : " recursive"
129115
130116 - name : Set up QEMU
131- uses : docker/setup-qemu-action@v3
117+ uses : docker/setup-qemu-action@v4
132118 with :
133119 platforms : linux/riscv64
134120
135121 - name : Build wheels
136- uses : pypa/cibuildwheel@v3.1.2
122+ uses : pypa/cibuildwheel@v3.4.1
137123 env :
138124 CIBW_SKIP : " *musllinux* pp*"
139125 CIBW_REPAIR_WHEEL_COMMAND : " "
140126 CIBW_ARCHS : " riscv64"
141127 # Build riscv64 wheels against a conservative baseline instead of
142128 # enabling RVV-related extensions from the build container.
143129 CIBW_ENVIRONMENT : CMAKE_ARGS="-DGGML_NATIVE=off -DGGML_RVV=off -DGGML_RV_ZFH=off -DGGML_RV_ZVFH=off -DGGML_RV_ZICBOP=off -DGGML_RV_ZIHINTPAUSE=off"
144- # Split the emulated riscv64 build into one Python version per job
145- # to minimize wall-clock time without changing the release artifacts.
146- CIBW_BUILD : ${{ matrix.shard.build }}
130+ # The release wheel is tagged py3-none, so one riscv64 build is
131+ # enough and avoids duplicate same-name release artifacts.
132+ CIBW_BUILD : " cp310-*"
133+ with :
134+ output-dir : wheelhouse
135+
136+ - name : Upload wheels as artifacts
137+ uses : actions/upload-artifact@v7
138+ with :
139+ name : wheels_riscv64
140+ path : ./wheelhouse/*.whl
141+
142+ build_wheels_pyodide :
143+ name : Build Pyodide wheel
144+ runs-on : ubuntu-latest
145+ steps :
146+ - uses : actions/checkout@v6
147+ with :
148+ submodules : " recursive"
149+
150+ - uses : actions/setup-python@v6
151+ with :
152+ python-version : " 3.12"
153+
154+ - name : Build wheel
155+ uses : pypa/cibuildwheel@v4.1.0
156+ env :
157+ CIBW_PLATFORM : " pyodide"
158+ CIBW_BUILD : " cp314-pyodide_wasm32"
159+ CIBW_BUILD_VERBOSITY : " 1"
160+ CIBW_REPAIR_WHEEL_COMMAND : " "
161+ CIBW_BEFORE_TEST : " curl -L --fail --retry 3 -o /tmp/stories260K.gguf https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K.gguf"
162+ CIBW_TEST_COMMAND : " python -c \" import llama_cpp.mtmd_cpp as mtmd; from llama_cpp import Llama; print('mtmd marker', mtmd.mtmd_default_marker().decode()); llm = Llama(model_path='/tmp/stories260K.gguf', n_ctx=64, n_batch=8, n_threads=1, verbose=False); print('loaded', llm.n_vocab(), llm.n_ctx()); print('generated', llm('Once upon a', max_tokens=1, temperature=0)['choices'][0]['text'])\" "
163+ CMAKE_ARGS : " -DLLAMA_WASM_MEM64=OFF -DEMSCRIPTEN_SYSTEM_PROCESSOR=wasm32 -DGGML_NATIVE=OFF -DGGML_OPENMP=OFF -DGGML_METAL=OFF -DGGML_BLAS=OFF -DGGML_CUDA=OFF -DGGML_HIP=OFF -DGGML_VULKAN=OFF -DGGML_OPENCL=OFF -DGGML_RPC=OFF -DLLAMA_CURL=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TOOLS=OFF -DLLAMA_BUILD_SERVER=OFF"
147164 with :
148165 output-dir : wheelhouse
149166
150167 - name : Upload wheels as artifacts
151- uses : actions/upload-artifact@v4
168+ uses : actions/upload-artifact@v7
152169 with :
153- name : ${{ matrix.shard.artifact }}
170+ name : wheels_pyodide
154171 path : ./wheelhouse/*.whl
155172
156173 build_sdist :
157174 name : Build source distribution
158175 runs-on : ubuntu-latest
159176
160177 steps :
161- - uses : actions/checkout@v4
178+ - uses : actions/checkout@v6
162179 with :
163180 submodules : " recursive"
164181
165- - uses : actions/setup-python@v5
182+ - uses : actions/setup-python@v6
166183 with :
167184 python-version : " 3.9"
168185
@@ -190,24 +207,24 @@ jobs:
190207 run : |
191208 python -m build --sdist
192209
193- - uses : actions/upload-artifact@v4
210+ - uses : actions/upload-artifact@v7
194211 with :
195212 name : sdist
196213 path : ./dist/*.tar.gz
197214
198215 release :
199216 name : Release
200- needs : [build_wheels, build_wheels_arm64, build_wheels_riscv64, build_sdist]
217+ needs : [build_wheels, build_wheels_arm64, build_wheels_riscv64, build_wheels_pyodide, build_sdist]
201218 if : startsWith(github.ref, 'refs/tags/')
202219 runs-on : ubuntu-latest
203220
204221 steps :
205- - uses : actions/download-artifact@v4
222+ - uses : actions/download-artifact@v8
206223 with :
207224 merge-multiple : true
208225 path : dist
209226
210- - uses : softprops/action-gh-release@v2
227+ - uses : softprops/action-gh-release@v3
211228 with :
212229 files : dist/*
213230 env :
0 commit comments