Skip to content

Commit 3a89ec6

Browse files
committed
workflow updates
1 parent 16de480 commit 3a89ec6

1 file changed

Lines changed: 22 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ jobs:
5656
fi
5757
nvcc --version
5858
nvidia-smi
59+
# Persist the spack-filtered PATH and any module-set library paths to
60+
# all subsequent steps. Without this each step reverts to the runner's
61+
# default PATH, which puts spack's CUDA 13.1 ahead of nvhpc 12.3.
62+
echo "PATH=$PATH" >> "$GITHUB_ENV"
63+
[[ -n "$LD_LIBRARY_PATH" ]] && echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> "$GITHUB_ENV" || true
5964
6065
- name: Show CUDA + driver info
6166
shell: bash
@@ -81,20 +86,34 @@ jobs:
8186
-DCMAKE_BUILD_TYPE=Release \
8287
-DBUILD_TESTING=ON \
8388
-DBUILD_EXAMPLES=ON \
84-
-DCMAKE_CUDA_ARCHITECTURES=native \
89+
-DCMAKE_CUDA_ARCHITECTURES=80 \
8590
-DCMAKE_INSTALL_PREFIX=./build/ci/install
8691
8792
- name: Build
88-
run: cmake --build build/ci --parallel
93+
shell: bash
94+
run: |
95+
if [[ -f /etc/profile.d/lmod.sh ]]; then source /etc/profile.d/lmod.sh; fi
96+
if command -v module >/dev/null 2>&1; then
97+
module purge
98+
module load nvhpc/23.11/nvhpc-hpcx-cuda12
99+
fi
100+
cmake --build build/ci --parallel
89101
90102
- name: Show linked CUDA runtime
91103
shell: bash
92104
run: |
93105
ldd build/ci/tests/test_cli | grep -E 'cudart|cuda' || true
94106
95107
- name: Run tests
108+
shell: bash
96109
working-directory: build/ci
97-
run: ctest --output-on-failure
110+
run: |
111+
if [[ -f /etc/profile.d/lmod.sh ]]; then source /etc/profile.d/lmod.sh; fi
112+
if command -v module >/dev/null 2>&1; then
113+
module purge
114+
module load nvhpc/23.11/nvhpc-hpcx-cuda12
115+
fi
116+
ctest --output-on-failure
98117
99118
- name: Upload test results
100119
if: failure()

0 commit comments

Comments
 (0)