fix: add correct github actions runner #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Self-Hosted | |
| on: | |
| push: | |
| branches: [ master, self-hosted-runner ] | |
| pull_request: | |
| branches: [ master, self-hosted-runner ] | |
| workflow_dispatch: | |
| env: | |
| build_dir: "build" | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.os }} GCC ${{ matrix.gcc }} CUDA ${{ matrix.cuda }} | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| cuda: "12.8" | |
| gcc: 13 | |
| env: | |
| config: "Release" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set environment variables | |
| run: | | |
| echo "CUDA_PATH=/usr/local/cuda-12.8" >> $GITHUB_ENV | |
| echo "${CUDA_PATH}/bin" >> $GITHUB_PATH | |
| echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV | |
| echo "CC=/usr/bin/gcc-${{ matrix.gcc }}" >> $GITHUB_ENV | |
| echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV | |
| echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV | |
| echo "CUDACXX=/usr/local/cuda-${{ matrix.cuda }}/bin/nvcc" >> $GITHUB_ENV | |
| - name: Configure CMake build | |
| run: | | |
| cmake -B ${{ env.build_dir }} -S . \ | |
| -DCMAKE_CXX_COMPILER=g++-${{ matrix.gcc }} \ | |
| -DCMAKE_C_COMPILER=gcc-${{ matrix.gcc }} \ | |
| -DCMAKE_BUILD_TYPE=${{ env.config }} \ | |
| -DCUBOOL_BUILD_TESTS=ON \ | |
| -DCUBOOL_GRAPH_ENABLE_TESTING=ON | |
| - name: Build library sources | |
| run: | | |
| cmake --build ${{ env.build_dir }} \ | |
| --verbose \ | |
| -j10 | |
| test: | |
| name: Test GPU ${{ matrix.gpu }} CUDA ${{ matrix.cuda }} | |
| needs: build | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - gpu: NVIDIA-GeForce-GT-1030 | |
| cuda: "12.9" | |
| env: | |
| test-file: gpu_test.log | |
| steps: | |
| - name: Run tests | |
| working-directory: ${{ env.build_dir }}/tests | |
| run: | | |
| ./cuboolgraph_tests | tee ${{ env.test-file }} | |
| - name: Upload tests resutls | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.test-file }} | |
| path: ${{ env.build_dir }}/tests/${{ env.test-file }} | |
| - name: Check for unit tests results | |
| working-directory: ${{ env.build_dir }}/tests | |
| run: | | |
| ! grep -q "FAILED" ${{ env.test-file }} | |
| clean: | |
| name: Cleanup workspace | |
| needs: test | |
| if: always() | |
| runs-on: self-hosted | |
| steps: | |
| - name: Cleanup workspace | |
| run: | | |
| rm -rf ${{ github.workspace }}/* | |
| rm -rf ${{ github.workspace }}/.* |