From c04b773edf7b0905b8afffe95582f93d84493a05 Mon Sep 17 00:00:00 2001 From: Leon Oostrum Date: Thu, 18 Jul 2024 14:13:30 +0200 Subject: [PATCH] Add CI to build the code --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..badf9c6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: build + +on: + push: + workflow_dispatch: + +jobs: + linting: + name: run + runs-on: ubuntu-latest + env: + gcc-version: "12" + cuda-version: "12.2.0" + steps: + + - name: Check out a copy of the repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install cuda + uses: Jimver/cuda-toolkit@v0.2.11 + with: + cuda: ${{ env.cuda-version }} + method: "network" + sub-packages: '["runtime", "nvcc", "nvrtc-dev"]' + linux-local-args: '["--toolkit"]' + + - name: Show tool versions + run: | + echo "nvcc: $(nvcc --version)" + echo "g++: $(g++-${{ env.gcc-version}} --version)" + + - name: Run CMake + shell: bash -el {0} + run: | + cmake -DCMAKE_CXX_COMPILER=g++-${{ env.gcc-version }} -S . -B build + + - name: Build the code + shell: bash -el {0} + run: | + cd build && make -j