forked from ggml-org/llama.cpp
-
-
Notifications
You must be signed in to change notification settings - Fork 32
1520 lines (1365 loc) · 55.8 KB
/
Copy pathrelease.yml
File metadata and controls
1520 lines (1365 loc) · 55.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Release
on:
workflow_dispatch:
inputs:
source_ref:
description: "Branch or tag name that requested the build"
required: true
type: string
source_sha:
description: "Exact commit SHA to build"
required: true
type: string
tag_name:
description: "Release/package version name, for example v0.3.0"
required: true
type: string
publish_release:
description: "Create or update the GitHub release and release Docker tags"
required: true
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ inputs.source_ref || github.ref }}
cancel-in-progress: ${{ inputs.publish_release != true }}
env:
CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON"
jobs:
release-meta:
name: Release metadata
runs-on: ubuntu-24.04
outputs:
source_ref: ${{ steps.meta.outputs.source_ref }}
source_sha: ${{ steps.meta.outputs.source_sha }}
tag_name: ${{ steps.meta.outputs.tag_name }}
build_packages: ${{ steps.meta.outputs.build_packages }}
create_release: ${{ steps.meta.outputs.create_release }}
publish_docker: ${{ steps.meta.outputs.publish_docker }}
image_repo: ${{ steps.meta.outputs.image_repo }}
ref_name_safe: ${{ steps.meta.outputs.ref_name_safe }}
short_sha: ${{ steps.meta.outputs.short_sha }}
steps:
- name: Clone
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Resolve release metadata
id: meta
shell: bash
run: |
set -euo pipefail
source_ref="${INPUT_SOURCE_REF}"
source_sha="${INPUT_SOURCE_SHA}"
tag_name="${INPUT_TAG_NAME}"
create_release="${INPUT_PUBLISH_RELEASE}"
build_packages="true"
publish_docker="true"
short_sha="${source_sha::12}"
ref_name_safe="$(printf '%s' "${source_ref}" | tr '[:upper:]' '[:lower:]' | sed -E 's#[^a-z0-9_.-]+#-#g; s#^[.-]+##; s#[.-]+$##')"
if [[ -z "${ref_name_safe}" ]]; then
ref_name_safe="${short_sha}"
fi
if [[ -z "${source_sha}" || ! "${source_sha}" =~ ^[0-9a-f]{40}$ ]]; then
echo "source_sha must be a full 40-character commit SHA." >&2
exit 1
fi
if ! git cat-file -e "${source_sha}^{commit}"; then
git fetch origin +refs/heads/"${source_ref}":refs/remotes/origin/"${source_ref}" --no-tags || true
git fetch origin +refs/tags/"${source_ref}":refs/tags/"${source_ref}" || true
fi
if ! git cat-file -e "${source_sha}^{commit}"; then
git fetch origin "${source_sha}" --no-tags
fi
git cat-file -e "${source_sha}^{commit}"
git fetch origin +refs/heads/main:refs/remotes/origin/main --no-tags
if [[ "${create_release}" == "true" ]]; then
if [[ "${tag_name}" != v* ]]; then
echo "Release publishing requires a v* tag_name." >&2
exit 1
fi
git fetch origin +refs/tags/"${tag_name}":refs/tags/"${tag_name}"
tag_commit="$(git rev-list -n 1 "${tag_name}")"
if [[ "${tag_commit}" != "${source_sha}" ]]; then
echo "Tag ${tag_name} points to ${tag_commit}, not requested source ${source_sha}." >&2
exit 1
fi
if ! git merge-base --is-ancestor "${source_sha}" refs/remotes/origin/main; then
echo "Tag ${tag_name} is not reachable from origin/main; refusing to publish." >&2
exit 1
fi
fi
owner="$(printf '%s' "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')"
repo="$(printf '%s' "${GITHUB_REPOSITORY#*/}" | tr '[:upper:]' '[:lower:]')"
image_repo="ghcr.io/${owner}/${repo}"
echo "source_ref=${source_ref}" >> "${GITHUB_OUTPUT}"
echo "source_sha=${source_sha}" >> "${GITHUB_OUTPUT}"
echo "tag_name=${tag_name}" >> "${GITHUB_OUTPUT}"
echo "build_packages=${build_packages}" >> "${GITHUB_OUTPUT}"
echo "create_release=${create_release}" >> "${GITHUB_OUTPUT}"
echo "publish_docker=${publish_docker}" >> "${GITHUB_OUTPUT}"
echo "image_repo=${image_repo}" >> "${GITHUB_OUTPUT}"
echo "ref_name_safe=${ref_name_safe}" >> "${GITHUB_OUTPUT}"
echo "short_sha=${short_sha}" >> "${GITHUB_OUTPUT}"
echo "Using source ref: ${source_ref}"
echo "Using source SHA: ${source_sha}"
echo "Using package version: ${tag_name}"
echo "Build packages: ${build_packages}"
echo "Publish GitHub release: ${create_release}"
echo "Publish Docker images: ${publish_docker}"
env:
INPUT_SOURCE_REF: ${{ inputs.source_ref }}
INPUT_SOURCE_SHA: ${{ inputs.source_sha }}
INPUT_TAG_NAME: ${{ inputs.tag_name }}
INPUT_PUBLISH_RELEASE: ${{ inputs.publish_release }}
macos-arm64:
name: macOS arm64 Metal
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: macos-14
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-macos-arm64
evict-old-files: 1d
- name: Build
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=ON \
-DCMAKE_INSTALL_RPATH='@loader_path' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DLLAMA_FATAL_WARNINGS=ON \
-DLLAMA_BUILD_BORINGSSL=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j "$(sysctl -n hw.logicalcpu)"
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Smoke package binaries
run: |
./build/bin/llama-server --version
./build/bin/llama-cli --version
- name: Pack artifacts
run: |
cp LICENSE ./build/bin/
tar -czvf "beellama-${{ needs.release-meta.outputs.tag_name }}-bin-macos-arm64.tar.gz" \
-s ",^\.,beellama-${{ needs.release-meta.outputs.tag_name }}," \
-C ./build/bin .
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-${{ needs.release-meta.outputs.tag_name }}-bin-macos-arm64.tar.gz
name: beellama-bin-macos-arm64.tar.gz
ubuntu-cpu:
name: Ubuntu ${{ matrix.build }} CPU
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- build: x64
os: ubuntu-22.04
- build: arm64
os: ubuntu-24.04-arm
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-${{ matrix.os }}-cpu
evict-old-files: 1d
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev
- name: Toolchain workaround
if: ${{ contains(matrix.os, 'ubuntu-24.04') }}
run: |
sudo apt-get install -y gcc-14 g++-14
echo "CC=gcc-14" >> "${GITHUB_ENV}"
echo "CXX=g++-14" >> "${GITHUB_ENV}"
- name: Build
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DGGML_BACKEND_DL=ON \
-DGGML_NATIVE=OFF \
-DGGML_CPU_ALL_VARIANTS=ON \
-DLLAMA_FATAL_WARNINGS=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j "$(nproc)"
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Smoke package binaries
run: |
file ./build/bin/llama-server
./build/bin/llama-server --version
./build/bin/llama-cli --version
- name: Pack artifacts
run: |
cp LICENSE ./build/bin/
tar -czvf "beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-${{ matrix.build }}.tar.gz" \
--transform "s,^\.,beellama-${{ needs.release-meta.outputs.tag_name }}," \
-C ./build/bin .
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-${{ matrix.build }}.tar.gz
name: beellama-bin-ubuntu-${{ matrix.build }}.tar.gz
ubuntu-vulkan:
name: Ubuntu x64 Vulkan
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: ubuntu-22.04
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-ubuntu-vulkan-x64
evict-old-files: 1d
- name: Dependencies
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
sudo apt-get update -y
sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk libssl-dev
- name: Build
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DGGML_BACKEND_DL=ON \
-DGGML_NATIVE=OFF \
-DGGML_CPU_ALL_VARIANTS=ON \
-DGGML_VULKAN=ON \
-DLLAMA_FATAL_WARNINGS=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j "$(nproc)"
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Smoke package binaries
run: |
./build/bin/llama-server --version
./build/bin/llama-cli --version
- name: Pack artifacts
run: |
cp LICENSE ./build/bin/
tar -czvf "beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-vulkan-x64.tar.gz" \
--transform "s,^\.,beellama-${{ needs.release-meta.outputs.tag_name }}," \
-C ./build/bin .
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-vulkan-x64.tar.gz
name: beellama-bin-ubuntu-vulkan-x64.tar.gz
ubuntu-rocm:
name: Ubuntu x64 ROCm
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: ubuntu-22.04
env:
ROCM_VERSION: "7.2.1"
GPU_TARGETS: "gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1151;gfx1150;gfx1200;gfx1201"
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: Free up disk space
uses: ggml-org/free-disk-space@v1.3.1
with:
tool-cache: true
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-ubuntu-rocm-${{ env.ROCM_VERSION }}-x64
evict-old-files: 1d
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential git cmake wget libssl-dev
- name: Setup ROCm
run: |
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
sudo tee /etc/apt/sources.list.d/rocm.list << EOF
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${ROCM_VERSION} jammy main
EOF
sudo tee /etc/apt/preferences.d/rocm-pin-600 << EOF
Package: *
Pin: release o=repo.radeon.com
Pin-Priority: 600
EOF
sudo apt-get update
sudo apt-get install -y rocm-hip-sdk
- name: Build
run: |
cmake -B build -S . \
-DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_BACKEND_DL=ON \
-DGGML_NATIVE=OFF \
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DGGML_CPU_ALL_VARIANTS=ON \
-DGPU_TARGETS="${GPU_TARGETS}" \
-DGGML_HIP=ON \
-DGGML_CUDA_FA=ON \
-DGGML_CUDA_FA_ALL_QUANTS=ON \
-DHIP_PLATFORM=amd \
-DGGML_HIP_ROCWMMA_FATTN=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j "$(nproc)"
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Smoke package binaries
run: |
./build/bin/llama-server --version
./build/bin/llama-cli --version
- name: Pack artifacts
run: |
rocm_short="$(echo "${ROCM_VERSION}" | cut -d '.' -f 1,2)"
cp LICENSE ./build/bin/
tar -czvf "beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-rocm-${rocm_short}-x64.tar.gz" \
--transform "s,^\.,beellama-${{ needs.release-meta.outputs.tag_name }}," \
-C ./build/bin .
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-rocm-7.2-x64.tar.gz
name: beellama-bin-ubuntu-rocm-7.2-x64.tar.gz
ubuntu-sycl:
name: Ubuntu x64 SYCL
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: ubuntu-24.04
env:
ONEAPI_ROOT: /opt/intel/oneapi
ONEAPI_INSTALLER_VERSION: "2025.3.3"
ONEAPI_INSTALLER_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56f7923a-adb8-43f3-8b02-2b60fcac8cab/intel-deep-learning-essentials-2025.3.3.16_offline.sh
LEVEL_ZERO_VERSION: "1.28.2"
LEVEL_ZERO_UBUNTU_VERSION: "u24.04"
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: Free up disk space
uses: ggml-org/free-disk-space@v1.3.1
with:
tool-cache: true
- name: Prepare oneAPI cache path
run: |
sudo mkdir -p "${ONEAPI_ROOT}"
sudo chown -R "${USER}:${USER}" /opt/intel
- name: Cache oneAPI installation
id: cache-oneapi
uses: actions/cache@v5
with:
path: ${{ env.ONEAPI_ROOT }}
key: oneapi-linux-${{ env.ONEAPI_INSTALLER_VERSION }}-${{ runner.os }}
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-ubuntu-sycl-${{ env.ONEAPI_INSTALLER_VERSION }}-x64
evict-old-files: 1d
- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential git cmake ninja-build wget ca-certificates libssl-dev
- name: Install oneAPI
if: steps.cache-oneapi.outputs.cache-hit != 'true'
run: |
installer="${RUNNER_TEMP}/intel-deep-learning-essentials-${ONEAPI_INSTALLER_VERSION}.sh"
wget "${ONEAPI_INSTALLER_URL}" -O "${installer}"
sudo bash "${installer}" -s -a --silent --eula accept
sudo chown -R "${USER}:${USER}" "${ONEAPI_ROOT}"
- name: Install Level Zero SDK
run: |
cd /tmp
wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero.deb
wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb
sudo apt-get -o Dpkg::Options::="--force-overwrite" install -y ./level-zero.deb ./level-zero-devel.deb
- name: Build
run: |
source "${ONEAPI_ROOT}/setvars.sh"
cmake -B build -G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DGGML_SYCL=ON \
-DGGML_SYCL_F16=OFF \
-DCMAKE_C_COMPILER=icx \
-DCMAKE_CXX_COMPILER=icpx \
-DGGML_BACKEND_DL=ON \
-DGGML_NATIVE=OFF \
-DGGML_CPU_ALL_VARIANTS=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j "$(nproc)"
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Smoke package binaries
run: |
source "${ONEAPI_ROOT}/setvars.sh"
test -s ./build/bin/libggml-sycl.so
ldd ./build/bin/libggml-sycl.so
mv ./build/bin/libggml-sycl.so ./build/bin/libggml-sycl.so.smoke-disabled
trap 'mv ./build/bin/libggml-sycl.so.smoke-disabled ./build/bin/libggml-sycl.so' EXIT
./build/bin/llama-server --version
./build/bin/llama-cli --version
- name: Pack artifacts
run: |
cp LICENSE ./build/bin/
tar -czvf "beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-sycl-x64.tar.gz" \
--transform "s,^\.,beellama-${{ needs.release-meta.outputs.tag_name }}," \
-C ./build/bin .
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-sycl-x64.tar.gz
name: beellama-bin-ubuntu-sycl-x64.tar.gz
ubuntu-cuda:
name: Ubuntu x64 CUDA ${{ matrix.cuda }}
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: ubuntu-24.04
container: nvidia/cuda:${{ matrix.cuda_container }}
env:
CCACHE_MAXSIZE: 5G
CCACHE_SLOPPINESS: time_macros
strategy:
fail-fast: false
matrix:
include:
- cuda: "12.4"
cuda_container: "12.4.1-devel-ubuntu22.04"
- cuda: "13.1"
cuda_container: "13.1.1-devel-ubuntu24.04"
steps:
- name: Dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends build-essential ca-certificates cmake ninja-build ccache git file libssl-dev libgomp1
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-ubuntu-cuda-${{ matrix.cuda }}-x64
evict-old-files: 1d
- name: Build
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
-DGGML_NATIVE=OFF \
-DGGML_CUDA=ON \
-DGGML_CUDA_FA=ON \
-DGGML_CUDA_FA_ALL_QUANTS=ON \
-DGGML_BACKEND_DL=ON \
-DGGML_CPU_ALL_VARIANTS=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
${{ env.CMAKE_ARGS }} \
-DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined
cmake --build build --config Release -j "$(nproc)"
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Smoke package binaries
run: |
file ./build/bin/llama-server
./build/bin/llama-server --version
./build/bin/llama-cli --version
- name: Pack artifacts
run: |
cp LICENSE ./build/bin/
tar -czvf "beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.tar.gz" \
--transform "s,^\.,beellama-${{ needs.release-meta.outputs.tag_name }}," \
-C ./build/bin .
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-${{ needs.release-meta.outputs.tag_name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.tar.gz
name: beellama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.tar.gz
windows-cpu:
name: Windows x64 CPU
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: windows-2025
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-windows-cpu-x64
variant: ccache
evict-old-files: 1d
- name: Install Ninja
run: choco install ninja -y
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build -G "Ninja Multi-Config" ^
-D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake ^
-DLLAMA_BUILD_BORINGSSL=ON ^
-DGGML_NATIVE=OFF ^
-DGGML_BACKEND_DL=ON ^
-DGGML_CPU_ALL_VARIANTS=ON ^
-DGGML_OPENMP=ON ^
%CMAKE_ARGS%
cmake --build build --config Release
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Pack artifacts
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$bin = ".\build\bin\Release"
Copy-Item ".\LICENSE" $bin
$redistRoot = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC"
$omp = Get-ChildItem $redistRoot -Recurse -Filter "libomp140.x86_64.dll" |
Where-Object { $_.FullName -like "*\debug_nonredist\x64\Microsoft.VC143.OpenMP.LLVM\libomp140.x86_64.dll" } |
Sort-Object FullName -Descending |
Select-Object -First 1
if (-not $omp) {
throw "VC143 x64 libomp140.x86_64.dll not found under $redistRoot"
}
Copy-Item $omp.FullName $bin -Force
python scripts\verify-windows-package.py $bin
& "$bin\llama-server.exe" --version
& "$bin\llama-cli.exe" --version
7z a -snl "beellama-bin-win-cpu-x64.zip" "$bin\*"
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
path: beellama-bin-win-cpu-x64.zip
name: beellama-bin-win-cpu-x64.zip
windows-sycl:
name: Windows x64 SYCL
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: windows-2022
env:
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b60765d1-2b85-4e85-86b6-cb0e9563a699/intel-deep-learning-essentials-2025.3.3.18_offline.exe
WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
LEVEL_ZERO_SDK_URL: https://github.com/oneapi-src/level-zero/releases/download/v1.28.2/level-zero-win-sdk-1.28.2.zip
ONEAPI_ROOT: 'C:\Program Files (x86)\Intel\oneAPI'
ONEAPI_INSTALLER_VERSION: "2025.3.3"
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Cache oneAPI installation
id: cache-oneapi
uses: actions/cache@v5
with:
path: ${{ env.ONEAPI_ROOT }}
key: oneapi-windows-${{ env.ONEAPI_INSTALLER_VERSION }}-${{ runner.os }}
- name: Install oneAPI
if: steps.cache-oneapi.outputs.cache-hit != 'true'
shell: cmd
run: scripts\install-oneapi.bat "%WINDOWS_BASEKIT_URL%" "%WINDOWS_DPCPP_MKL%"
- name: Install Level Zero SDK
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$archive = Join-Path $env:RUNNER_TEMP "level-zero-win-sdk.zip"
$extractDir = Join-Path $env:RUNNER_TEMP "level-zero-sdk"
Invoke-WebRequest -Uri "${{ env.LEVEL_ZERO_SDK_URL }}" -OutFile $archive
Expand-Archive -Path $archive -DestinationPath $extractDir -Force
$sdkRoot = Get-ChildItem -Path $extractDir -Directory | Select-Object -First 1
if (-not $sdkRoot) {
$sdkRoot = Get-Item $extractDir
}
"LEVEL_ZERO_V1_SDK_PATH=$($sdkRoot.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-windows-sycl-${{ env.ONEAPI_INSTALLER_VERSION }}-x64
variant: ccache
evict-old-files: 1d
- name: Install Ninja
run: choco install ninja -y
- name: Build
shell: cmd
run: |
call "%ONEAPI_ROOT%\setvars.bat" intel64 --force
icx --version
cmake -G "Ninja" -B build ^
-DCMAKE_C_COMPILER=cl ^
-DCMAKE_CXX_COMPILER=icx ^
-DCMAKE_BUILD_TYPE=Release ^
-DGGML_BACKEND_DL=ON ^
-DBUILD_SHARED_LIBS=ON ^
-DGGML_CPU=OFF ^
-DGGML_SYCL=ON ^
-DGGML_SYCL_F16=OFF ^
-DLLAMA_BUILD_EXAMPLES=OFF ^
-DLLAMA_BUILD_TESTS=OFF ^
-DLLAMA_BUILD_TOOLS=OFF ^
-DLLAMA_BUILD_SERVER=OFF ^
-DLLAMA_BUILD_BORINGSSL=ON
cmake --build build --config Release -j %NUMBER_OF_PROCESSORS% --target ggml-sycl
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Pack SYCL backend
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$bin = ".\build\bin"
Copy-Item ".\LICENSE" $bin -Force
$runtimeFiles = @(
"$env:ONEAPI_ROOT\mkl\latest\bin\mkl_sycl_blas.5.dll",
"$env:ONEAPI_ROOT\mkl\latest\bin\mkl_core.2.dll",
"$env:ONEAPI_ROOT\mkl\latest\bin\mkl_tbb_thread.2.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\ur_adapter_level_zero.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\ur_adapter_level_zero_v2.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\ur_adapter_opencl.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\ur_loader.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\ur_win_proxy_loader.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\sycl8.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\svml_dispmd.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\libmmd.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\libiomp5md.dll",
"$env:ONEAPI_ROOT\compiler\latest\bin\sycl-ls.exe",
"$env:ONEAPI_ROOT\compiler\latest\bin\libsycl-fallback-bfloat16.spv",
"$env:ONEAPI_ROOT\compiler\latest\bin\libsycl-native-bfloat16.spv",
"$env:ONEAPI_ROOT\dnnl\latest\bin\dnnl.dll",
"$env:ONEAPI_ROOT\tbb\latest\bin\tbb12.dll",
"$env:ONEAPI_ROOT\tcm\latest\bin\tcm.dll",
"$env:ONEAPI_ROOT\tcm\latest\bin\libhwloc-15.dll",
"$env:ONEAPI_ROOT\umf\latest\bin\umf.dll"
)
foreach ($file in $runtimeFiles) {
Copy-Item -LiteralPath $file -Destination $bin -Force
}
$zeLoader = Get-ChildItem -Path @($env:ONEAPI_ROOT, $env:LEVEL_ZERO_V1_SDK_PATH) -Recurse -Filter "ze_loader.dll" -ErrorAction SilentlyContinue | Select-Object -First 1
if ($zeLoader) {
Copy-Item -LiteralPath $zeLoader.FullName -Destination $bin -Force
} else {
Write-Warning "ze_loader.dll was not found in oneAPI or the Level Zero SDK; relying on the system driver runtime"
}
python scripts\verify-windows-package.py $bin
7z a -snl "beellama-bin-win-sycl-x64.zip" "$bin\*"
- name: Upload SYCL backend
uses: actions/upload-artifact@v6
with:
path: beellama-bin-win-sycl-x64.zip
name: beellama-bin-win-sycl-x64.zip
windows-cuda:
name: Windows x64 CUDA ${{ matrix.cuda }}
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: windows-2022
env:
CCACHE_MAXSIZE: 5G
CCACHE_SLOPPINESS: time_macros
strategy:
fail-fast: false
matrix:
cuda: ["12.4", "13.1"]
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: Install ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-windows-cuda-${{ matrix.cuda }}
variant: ccache
evict-old-files: 1d
- name: Cache CUDA Toolkit
id: cache-cuda
uses: actions/cache@v5
with:
path: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ matrix.cuda }}
key: cuda-windows-${{ matrix.cuda }}-${{ hashFiles('.github/actions/windows-setup-cuda/action.yml') }}
- name: Install CUDA Toolkit
if: steps.cache-cuda.outputs.cache-hit != 'true'
uses: ./.github/actions/windows-setup-cuda
with:
cuda_version: ${{ matrix.cuda }}
- name: Configure CUDA environment
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$cudaPath = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${{ matrix.cuda }}"
$nvcc = Join-Path $cudaPath "bin\nvcc.exe"
if (-not (Test-Path $nvcc)) {
throw "CUDA Toolkit not found at $cudaPath"
}
Join-Path $cudaPath "bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
$libNvvp = Join-Path $cudaPath "libnvvp"
if (Test-Path $libNvvp) {
$libNvvp | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}
"CUDA_PATH=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$versionEnv = "CUDA_PATH_V${{ matrix.cuda }}".Replace(".", "_")
"$versionEnv=$cudaPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Ninja
run: choco install ninja -y
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build -G "Ninja Multi-Config" ^
-DGGML_BACKEND_DL=ON ^
-DGGML_NATIVE=OFF ^
-DGGML_CPU=OFF ^
-DGGML_CUDA=ON ^
-DGGML_CUDA_FA=ON ^
-DGGML_CUDA_FA_ALL_QUANTS=ON ^
-DLLAMA_BUILD_BORINGSSL=ON ^
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache ^
-DGGML_CUDA_CUB_3DOT2=ON
set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
cmake --build build --config Release -j %NINJA_JOBS% --target ggml-cuda
- name: ccache stats
if: always()
run: ccache --show-stats
- name: Pack CUDA backend
run: 7z a -snl "beellama-bin-win-cuda-${{ matrix.cuda }}-x64.zip" .\build\bin\Release\ggml-cuda.dll
- name: Upload CUDA backend
uses: actions/upload-artifact@v6
with:
path: beellama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
name: beellama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
- name: Pack CUDA runtime
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$dst = ".\build\bin\cudart"
New-Item -ItemType Directory -Force -Path $dst | Out-Null
$roots = @("${{ env.CUDA_PATH }}\bin", "${{ env.CUDA_PATH }}\lib", "${{ env.CUDA_PATH }}\bin\x64")
foreach ($root in $roots) {
if (Test-Path $root) {
Get-ChildItem -Path (Join-Path $root "*") -File -ErrorAction SilentlyContinue |
Where-Object { $_.Name -like "cudart64_*.dll" -or $_.Name -like "cublas64_*.dll" -or $_.Name -like "cublasLt64_*.dll" } |
Copy-Item -Destination $dst -Force
}
}
7z a "cudart-beellama-bin-win-cuda-${{ matrix.cuda }}-x64.zip" "$dst\*"
- name: Upload CUDA runtime
uses: actions/upload-artifact@v6
with:
path: cudart-beellama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
name: cudart-beellama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
windows-hip:
name: Windows x64 HIP/Radeon
needs: release-meta
if: ${{ needs.release-meta.outputs.build_packages == 'true' }}
runs-on: windows-2022
env:
HIPSDK_INSTALLER_VERSION: "26.Q1"
GPU_TARGETS: "gfx1150;gfx1151;gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
steps:
- name: Clone
uses: actions/checkout@v6
with:
ref: ${{ needs.release-meta.outputs.source_sha }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
- name: Grab rocWMMA package
run: |
curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/7.2.1/pool/main/r/rocwmma-dev/rocwmma-dev_2.2.0.70201-81~24.04_amd64.deb"
7z x rocwmma.deb
7z x data.tar
- name: Cache ROCm installation
id: cache-rocm
uses: actions/cache@v5
with:
path: C:\Program Files\AMD\ROCm
key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: release-windows-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-x64
evict-old-files: 1d
- name: Install ROCm
if: steps.cache-rocm.outputs.cache-hit != 'true'
run: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win11-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
$installTimeoutSeconds = 1800
$proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -WindowStyle Hidden -PassThru
$completed = $proc.WaitForExit($installTimeoutSeconds * 1000)
if (-not $completed) {
$proc.Kill()