Skip to content

Commit

Permalink
CI: set CUDA_PATH variable in cuda builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Puerling committed Sep 11, 2024
1 parent 08033e9 commit 93331b5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,15 @@ jobs:
if: matrix.parallelisation == 'cuda'
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_CUDA_COMPILER=clang++ -DSPIRIT_CUDA_ARCH=70 -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS -DSPIRIT_USE_CUDA=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.5/
run: >
CUDA_PATH=/usr/local/cuda
cmake $GITHUB_WORKSPACE
-DCMAKE_CUDA_COMPILER=clang++
-DSPIRIT_CUDA_ARCH=70
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
$CMAKE_FLAGS
-DSPIRIT_USE_CUDA=ON
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.5/
- name: ⚙ Configure with OpenMP
if: matrix.parallelisation == 'openmp'
Expand Down Expand Up @@ -533,14 +541,20 @@ jobs:
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install -y cuda-toolkit-12-4
echo "/usr/local/cuda-12.4/bin" >> $GITHUB_PATH
echo "/usr/local/cuda-12.4/lib64" >> $GITHUB_PATH
- name: 📁 Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

- name: ⚙ Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS
run: >
CUDA_PATH=/usr/local/cuda
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
$CMAKE_FLAGS
- name: 🛠 Build
shell: bash
Expand Down

0 comments on commit 93331b5

Please sign in to comment.