99 branches : [ master ]
1010 workflow_dispatch :
1111
12- env :
13- build_dir : " build"
14- config : " Release"
15- artifact : " cubool-ubuntu-build.tar.xz"
16-
1712jobs :
1813 build :
1914 name : Build ${{ matrix.os }} GCC ${{ matrix.gcc }} CUDA ${{ matrix.cuda }}
2217 fail-fast : false
2318 matrix :
2419 include :
25- - os : ubuntu-24.04
26- cuda : " 12.8"
27- gcc : 13
20+ - os : [ubuntu-18.04, ubuntu-24.04]
21+ cuda : ["10.1", "12.8"]
22+ gcc : [8, 13]
23+ env :
24+ build_dir : " build"
25+ config : " Release"
26+ artifact : " cubool-${{ matrix.os }}-build.tar.xz"
2827
2928 steps :
3029 - uses : actions/checkout@v4
@@ -36,12 +35,18 @@ jobs:
3635 python-version : ' 3.12'
3736
3837 - name : Install CUDA
39- env :
40- cuda : ${{ matrix.cuda }}
41- run : source ./scripts/install_cuda_ubuntu.sh
38+ run : |
39+ source ./scripts/install_cuda_ubuntu.sh
40+ if [[ $? -eq 0 ]]; then
41+ # Set paths for subsequent steps, using ${CUDA_PATH}
42+ echo "Adding CUDA to CUDA_PATH, PATH and LD_LIBRARY_PATH"
43+ echo "CUDA_PATH=${CUDA_PATH}" >> $GITHUB_ENV
44+ echo "${CUDA_PATH}/bin" >> $GITHUB_PATH
45+ echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
46+ fi
4247 shell : bash
4348
44- - name : Export gcc and g++ variables
49+ - name : Install and configure GCC and GXX
4550 run : |
4651 sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
4752 echo "СС=/usr/bin/gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
5257 - name : Configure CMake build
5358 run : cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCUBOOL_BUILD_TESTS=ON
5459
55- - name : Build librarnamey sources
60+ - name : Build library sources
5661 working-directory : ${{ env.build_dir }}
5762 run : cmake --build . --target all --verbose -j `nproc`
5863
6570 with :
6671 name : ${{ env.artifact }}
6772 path : ${{ env.artifact }}
68-
69-
70- test :
71- name : Test ${{ matrix.os }} GCC ${{ matrix.gcc }} CUDA ${{ matrix.cuda }}
72- needs : build
73- runs-on : self-hosted
74- strategy :
75- fail-fast : false
76- matrix :
77- include :
78- - os : ubuntu-24.04
79- cuda : " 12.8"
80- gcc : 13
81-
82- steps :
83- - name : Download binary artifact
84- uses : actions/download-artifact@v4
85- with :
86- name : ${{ env.artifact }}
87-
88- - name : Unarchive artifact
89- run : |
90- tar xzf ${{ env.artifact }}
91- rm ${{ env.artifact }}
92-
93- - name : Run unit-tests
94- working-directory : ${{ env.build_dir }}
95- run : bash scripts/run_tests_fallback.sh
96- shell : bash
97-
98- - name : Run regression-tests
99- working-directory : ${{ env.build_dir }}/python
100- run : bash run_tests.sh
101- shell : bash
0 commit comments