Skip to content

Commit 9e078df

Browse files
authored
add spack setup commands to each step
1 parent d9eaf00 commit 9e078df

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/github_cmake_nvhpc.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,30 @@ jobs:
2121
uses: actions/checkout@v4.2.2
2222
- name: Set up spack and build cache
2323
run: |
24+
source /opt/spack/share/spack/setup-env.sh
2425
spack mirror add rem-gh-cache oci://ghcr.io/rem1776/ci-cache-rocky9
2526
spack compiler find
26-
- name: Install compilers
27-
run: spack install nvhpc@26.1
27+
- name: Install NVHPC
28+
run: |
29+
source /opt/spack/share/spack/setup-env.sh
30+
spack install nvhpc@26.1
2831
- name: Install dependencies
29-
run: spack install netcdf-fortran %%nvhpc mpich %%nvhpc libyaml %%nvhpc
32+
run: |
33+
source /opt/spack/share/spack/setup-env.sh
34+
spack install netcdf-fortran %%nvhpc mpich %%nvhpc libyaml %%nvhpc
3035
- name: Configure
3136
run: |
37+
source /opt/spack/share/spack/setup-env.sh
3238
spack load nvhpc netcdf-fortran libyaml mpich
3339
autoreconf -if ./configure.ac
3440
./configure --with-yaml
3541
- name: Compile
36-
run: make -j || make
42+
run: |
43+
source /opt/spack/share/spack/setup-env.sh
44+
spack load nvhpc netcdf-fortran libyaml mpich
45+
make -j || make
3746
- name: Run test suite
38-
run: make check TEST_VERBOSE=1
47+
run: |
48+
source /opt/spack/share/spack/setup-env.sh
49+
spack load nvhpc netcdf-fortran libyaml mpich
50+
make check TEST_VERBOSE=1

0 commit comments

Comments
 (0)