@@ -38,35 +38,59 @@ jobs:
3838 name : run Ubuntu
3939 needs : retag-continuous
4040 runs-on : ubuntu-20.04
41+ strategy :
42+ matrix :
43+ cuda_arch : [35, all]
44+ include :
45+ - cuda_arch : 35
46+ tar_name : GPUJPEG-Linux.tar.xz
47+ name : Linux build
48+ - cuda_arch : all
49+ tar_name : GPUJPEG-Linux-all.tar.xz
50+ name : Linux build (all CUDA architetures)
4151
4252 steps :
4353 - uses : actions/checkout@main
4454 - name : Install
4555 run : |
4656 sudo apt update
47- sudo apt install cmake jq nvidia-cuda-toolkit
57+ sudo apt install cmake jq
58+ - name : Install disro CUDA
59+ if : matrix.cuda_arch == 35
60+ run : |
61+ sudo apt install nvidia-cuda-toolkit
62+ id : install-distro-cuda
63+ - name : Install NVIDIA-distributed CUDA
64+ if : steps.install-distro-cuda.conclusion == 'skipped'
65+ run : |
66+ wget https://developer.download.nvidia.com/compute/cuda/repos/\
67+ ubuntu2004/x86_64/cuda-keyring_1.1-1_all.deb
68+ sudo dpkg -i cuda-keyring_1.1-1_all.deb
69+ sudo apt-get update
70+ sudo apt-get -y install cuda-toolkit
71+ echo CUDACXX=/usr/local/cuda/bin/nvcc >> "$GITHUB_ENV"
4872 - name : Build
4973 run : |
5074 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH='$ORIGIN/../lib' \
51- -DCMAKE_CUDA_ARCHITECTURES=35 -Bbuild .
75+ -DCMAKE_CUDA_ARCHITECTURES=${{ matrix.cuda_arch }} -Bbuild .
5276 cmake --build build --parallel
5377 ctest -R unittests
5478 cmake --install build --prefix GPUJPEG
55- tar caf GPUJPEG-Linux.tar.xz GPUJPEG
79+ tar caf ${{ matrix.tar_name }} GPUJPEG
5680
5781 - name : Upload Archive
5882 if : github.repository != 'CESNET/GPUJPEG' || github.ref != 'refs/heads/master'
5983 uses : actions/upload-artifact@main
6084 with :
61- name : GPUJPEG CI Linux build
85+ name : GPUJPEG CI ${{ matrix.name }}
6286 path : GPUJPEG
6387
6488 - name : Upload Release Build Asset
6589 if : github.repository == 'CESNET/GPUJPEG' && github.ref == 'refs/heads/master'
6690 env :
6791 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68- run : |
69- .github/scripts/replace-asset.sh continuous GPUJPEG-Linux.tar.xz application/x-gtar Linux%20build
92+ run : .github/scripts/replace-asset.sh continuous ${{ matrix.tar_name }}
93+ application/x-gtar "${{ matrix.name }}"
7094
7195 Windows :
7296 name : run Windows
0 commit comments