@@ -243,6 +243,10 @@ jobs:
243243 ubuntu-22-cuda :
244244 runs-on : ubuntu-22.04
245245
246+ strategy :
247+ matrix :
248+ cuda : ['12.1.1']
249+
246250 steps :
247251 - name : Clone
248252 id : checkout
@@ -253,27 +257,14 @@ jobs:
253257 - name : ccache
254258 uses :
hendrikmuhs/[email protected] 255259 with :
256- key : ubuntu-22-cmake-cuda
260+ key : ubuntu-22-cmake-cuda-${{ matrix.cuda }}
257261 evict-old-files : 1d
258262
259263 - name : Free up disk space
260- if : ${{ runner.os == 'Linux' }}
261- run : |
262- echo "Listing 100 largest packages"
263- dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n 100
264- df -h
265- echo "Removing large packages"
266- sudo apt-get remove -y '^ghc-8.*' || true
267- sudo apt-get remove -y '^dotnet-.*' || true
268- sudo apt-get remove -y '^llvm-.*' || true
269- sudo apt-get remove -y 'php.*' || true
270- sudo apt-get remove -y azure-cli google-cloud-sdk hhvm google-chrome-stable firefox powershell mono-devel || true
271- sudo apt-get autoremove -y || true
272- sudo apt-get clean || true
273- df -h
274- echo "Removing large directories"
275- rm -rf /usr/share/dotnet/
276- df -h
264+ uses : jlumbroso/free-disk-space@main
265+ with :
266+ android : true
267+ dotnet : true
277268
278269 - name : Dependencies
279270 id : depends
@@ -284,7 +275,7 @@ jobs:
284275 - name : Install CUDA Toolkit
285276286277 with :
287- cuda : ' 12.1.1 '
278+ cuda : ${{ matrix.cuda }}
288279
289280 - name : Build
290281 id : cmake_build
@@ -299,7 +290,6 @@ jobs:
299290 ${{ env.CMAKE_ARGS }}
300291 cmake --build build --config Release -j $(nproc)
301292
302-
303293 - name : Determine tag name
304294 id : tag
305295 uses : ./.github/actions/get-tag-name
@@ -308,13 +298,28 @@ jobs:
308298 id : pack_artifacts
309299 run : |
310300 cp LICENSE ./build/bin/
311- zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-x64.zip ./build/bin/*
301+ zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}- x64.zip ./build/bin/*
312302
313303 - name : Upload artifacts
314304 uses : actions/upload-artifact@v4
315305 with :
316- path : llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-x64.zip
317- name : llama-bin-ubuntu-cuda-x64.zip
306+ path : llama-${{ steps.tag.outputs.name }}-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
307+ name : llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
308+
309+ - name : Pack CUDA runtime
310+ id : pack_cuda_runtime
311+ run : |
312+ mkdir -p build/cuda-runtime
313+ cp /usr/local/cuda/lib64/libcudart.so* build/cuda-runtime
314+ cp /usr/local/cuda/lib64/libcublas.so* build/cuda-runtime
315+ cp /usr/local/cuda/lib64/libcublasLt.so* build/cuda-runtime
316+ zip -r cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip build/cuda-runtime/*
317+
318+ - name : Upload CUDA runtime
319+ uses : actions/upload-artifact@v4
320+ with :
321+ path : cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
322+ name : cudart-llama-bin-ubuntu-cuda-${{ matrix.cuda }}-x64.zip
318323
319324 windows-cpu :
320325 runs-on : windows-2025
0 commit comments