@@ -242,7 +242,65 @@ jobs:
242242 with :
243243 path : llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.zip
244244 name : llama-bin-ubuntu-vulkan-x64.zip
245-
245+
246+ ubuntu-22-cuda :
247+ runs-on : ubuntu-22.04
248+ strategy :
249+ matrix :
250+ cuda : ['12.4']
251+ steps :
252+ - name : Clone
253+ id : checkout
254+ uses : actions/checkout@v4
255+ with :
256+ fetch-depth : 0
257+
258+ - name : ccache
259+ 260+ with :
261+ key : ubuntu-22-cmake-cuda-${{ matrix.cuda }}
262+ evict-old-files : 1d
263+
264+ - name : Dependencies
265+ id : depends
266+ run : |
267+ wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
268+ sudo dpkg -i cuda-keyring_1.0-1_all.deb
269+ sudo apt-get update -y
270+ sudo apt-get install -y cuda-toolkit-${{ matrix.cuda }} build-essential libcurl4-openssl-dev
271+
272+ - name : Build
273+ id : cmake_build
274+ run : |
275+ export PATH=/usr/local/cuda-${{ matrix.cuda }}/bin:$PATH
276+ export LD_LIBRARY_PATH=/usr/local/cuda-${{ matrix.cuda }}/lib64:$LD_LIBRARY_PATH
277+ cmake -B build \
278+ -DCMAKE_INSTALL_RPATH='$ORIGIN' \
279+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
280+ -DGGML_BACKEND_DL=ON \
281+ -DGGML_NATIVE=OFF \
282+ -DGGML_CPU_ALL_VARIANTS=ON \
283+ -DGGML_CUDA=ON \
284+ -DCMAKE_CUDA_ARCHITECTURES="60;61;70;75;80;86;89;90" \
285+ ${{ env.CMAKE_ARGS }}
286+ cmake --build build --config Release -j $(nproc)
287+
288+ - name : Determine tag name
289+ id : tag
290+ uses : ./.github/actions/get-tag-name
291+
292+ - name : Pack artifacts
293+ id : pack_artifacts
294+ run : |
295+ cp LICENSE ./build/bin/
296+ zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip ./build/bin/*
297+
298+ - name : Upload artifacts
299+ uses : actions/upload-artifact@v4
300+ with :
301+ path : llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
302+ name : llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
303+
246304 windows-cpu :
247305 runs-on : windows-2025
248306
0 commit comments