Skip to content

Commit

Permalink
Add github workflow to build the code
Browse files Browse the repository at this point in the history
  • Loading branch information
csbnw committed Sep 20, 2023
1 parent 23603ac commit aeb0c2f
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build

on:
push:
workflow_dispatch:

jobs:
linting:
name: run
runs-on: ubuntu-latest
env:
# set tools versions to latest supported by the CI runner,
# ubuntu 22.04 at the time of writing
gcc-version: "12" # = 12.1.0
# cuda version to install with separate action
cuda-version: "12.2.0"
steps:

- name: Check out a copy of the repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Show some relevant env vars
run: |
echo "GITHUB_BASE_REF = $GITHUB_BASE_REF"
echo "GITHUB_HEAD_REF = $GITHUB_HEAD_REF"
echo "GITHUB_REF_NAME = $GITHUB_REF_NAME"
- name: Install cuda
uses: Jimver/[email protected]
with:
cuda: ${{ env.cuda-version }}
method: "network"
sub-packages: '["nvcc", "nvrtc-dev", "nvtx"]'
non-cuda-sub-packages: '["libcufft-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 }} -DCUDAWRAPPERS_BUILD_TESTING=True -S . -B build
- name: Build the code
shell: bash -el {0}
run: |
cd build && make -j

0 comments on commit aeb0c2f

Please sign in to comment.