Add CI to build the code #1
This file contains 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: 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/[email protected] | |
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 |