Skip to content

Commit 4d24ad8

Browse files
committed
ci: add TurboQuant+ release workflow
Builds Mac Metal (arm64) and Windows CUDA (12.4) on tag push. Creates GitHub release with prebuilt binaries.
1 parent 8ba9f12 commit 4d24ad8

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

.github/workflows/tqp-release.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: TurboQuant+ Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'tqp-v*'
7+
8+
env:
9+
CMAKE_ARGS: "-DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_TOOLS=ON -DLLAMA_BUILD_SERVER=ON"
10+
11+
jobs:
12+
macos-metal:
13+
runs-on: macos-14
14+
15+
steps:
16+
- name: Clone
17+
uses: actions/checkout@v6
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Build
22+
run: |
23+
cmake -B build \
24+
-DGGML_METAL_USE_BF16=ON \
25+
-DGGML_METAL_EMBED_LIBRARY=ON \
26+
-DCMAKE_INSTALL_RPATH='@loader_path' \
27+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
28+
${{ env.CMAKE_ARGS }}
29+
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
30+
31+
- name: Pack
32+
run: |
33+
cp LICENSE ./build/bin/
34+
tar -czvf turboquant-plus-${{ github.ref_name }}-macos-arm64-metal.tar.gz \
35+
-s ",./,turboquant-plus-${{ github.ref_name }}/," -C ./build/bin .
36+
37+
- name: Upload
38+
uses: actions/upload-artifact@v6
39+
with:
40+
name: macos-arm64-metal
41+
path: turboquant-plus-${{ github.ref_name }}-macos-arm64-metal.tar.gz
42+
43+
windows-cuda:
44+
runs-on: windows-2022
45+
46+
strategy:
47+
matrix:
48+
cuda: ['12.4']
49+
50+
steps:
51+
- name: Clone
52+
uses: actions/checkout@v6
53+
54+
- name: Install Cuda Toolkit
55+
uses: ./.github/actions/windows-setup-cuda
56+
with:
57+
cuda_version: ${{ matrix.cuda }}
58+
59+
- name: Install Ninja
60+
run: choco install ninja
61+
62+
- name: Build
63+
shell: cmd
64+
run: |
65+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
66+
cmake -S . -B build -G "Ninja Multi-Config" ^
67+
-DGGML_NATIVE=OFF ^
68+
-DGGML_CUDA=ON ^
69+
-DGGML_CUDA_FA_ALL_QUANTS=ON ^
70+
${{ env.CMAKE_ARGS }}
71+
set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
72+
cmake --build build --config Release -j %NINJA_JOBS%
73+
74+
- name: Pack
75+
run: |
76+
cp LICENSE ./build/bin/Release/
77+
$dst='.\build\bin\Release\'
78+
robocopy "${{env.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
79+
robocopy "${{env.CUDA_PATH}}\lib" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
80+
robocopy "${{env.CUDA_PATH}}\bin\x64" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
81+
7z a turboquant-plus-${{ github.ref_name }}-windows-x64-cuda${{ matrix.cuda }}.zip .\build\bin\Release\*
82+
83+
- name: Upload
84+
uses: actions/upload-artifact@v6
85+
with:
86+
name: windows-x64-cuda${{ matrix.cuda }}
87+
path: turboquant-plus-${{ github.ref_name }}-windows-x64-cuda${{ matrix.cuda }}.zip
88+
89+
release:
90+
needs: [macos-metal, windows-cuda]
91+
runs-on: ubuntu-latest
92+
permissions:
93+
contents: write
94+
95+
steps:
96+
- name: Download artifacts
97+
uses: actions/download-artifact@v7
98+
with:
99+
path: ./release
100+
merge-multiple: true
101+
102+
- name: Create Release
103+
uses: softprops/action-gh-release@v2
104+
with:
105+
tag_name: ${{ github.ref_name }}
106+
name: TurboQuant+ ${{ github.ref_name }}
107+
files: ./release/*
108+
draft: false
109+
prerelease: false

0 commit comments

Comments
 (0)