1818 os : [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15]
1919 compiler : [gfortran-12, gfortran-13, gfortran-14, gfortran-15]
2020 # gfortran-10 and -11 are only on ubuntu-22.04
21- # gfortran-13 and -14 and -15 are not on ubuntu-22.04
21+ # gfortran-13, -14, and -15 are not on ubuntu-22.04
2222 # gfortran-15 is only on macos
2323 include :
2424 - os : ubuntu-22.04
6060 cmake --version
6161
6262 - name : Checkout
63- uses : actions/checkout@v4
63+ uses : actions/checkout@v5
6464 with :
6565 fetch-depth : 1
6666 submodules : true
@@ -126,7 +126,7 @@ jobs:
126126 name : Intel Fortran
127127 steps :
128128 - name : Checkout
129- uses : actions/checkout@v4
129+ uses : actions/checkout@v5
130130 with :
131131 fetch-depth : 1
132132 submodules : true
@@ -187,52 +187,92 @@ jobs:
187187 path : |
188188 build/**/*.log
189189
190- Nvidia :
191- runs-on : ubuntu-22.04
192- container : nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04
190+ # NOTE: This is weird because the NVHPC image is so large (~8GB) that
191+ # we have to do some tricks to get it to run in GitHub Actions.
192+ Nvidia-Build-Only :
193+ runs-on : ubuntu-24.04
193194 env :
194195 FC : nvfortran
196+ NVHPC_IMAGE : nvcr.io/nvidia/nvhpc:25.7-devel-cuda12.9-ubuntu24.04
195197
196- name : Nvidia HPC
197198 steps :
198- - name : Versions
199+ # Reclaim lots of space
200+ - name : Free disk space
201+ uses : jlumbroso/free-disk-space@v1.3.1
202+ with :
203+ tool-cache : true
204+ android : true
205+ dotnet : true
206+ haskell : true
207+ large-packages : true
208+ swap-storage : true
209+
210+ # Move /var/lib/docker onto the larger ephemeral disk (do this before any docker pulls)
211+ - name : Maximize build space (move Docker storage)
212+ uses : easimon/maximize-build-space@v10
213+ with :
214+ root-reserve-mb : 4096
215+ remove-dotnet : ' true'
216+ remove-android : ' true'
217+ remove-haskell : ' true'
218+ remove-codeql : ' true'
219+ build-mount-path : ' /var/lib/docker'
220+
221+ - name : Reset Docker daemon & prune
199222 run : |
200- ${FC} --version
201- cmake --version
223+ sudo systemctl restart docker
224+ docker system prune -af || true
202225
203226 - name : Checkout
204- uses : actions/checkout@v4
227+ uses : actions/checkout@v5
205228 with :
206229 fetch-depth : 1
207230 submodules : true
208231
209- - name : Set all directories as git safe
210- run : |
211- git config --global --add safe.directory '*'
232+ - name : Pull NVHPC image
233+ run : docker pull "$NVHPC_IMAGE"
212234
213- - name : Add python-is-python3 package
235+ # Run everything inside the NVHPC container
236+ - name : Build (inside NVHPC)
214237 run : |
215- apt-get update
216- apt-get install -y python-is-python3
238+ docker run --rm \
239+ -v "$GITHUB_WORKSPACE:/workspace" \
240+ -w /workspace \
241+ -e FC="$FC" \
242+ "$NVHPC_IMAGE" \
243+ bash -lc '
244+ set -euo pipefail
217245
218- - name : Build and Install GFE
219- run : |
220- cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_ROBUST=YES
221- cmake --build build --parallel 4 --target install
222- cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_ROBUST=YES
223- cmake --build build --parallel 4 --target install
246+ echo "== Versions =="
247+ ${FC} --version || true
224248
225- - name : Build and Run Tests target
226- run : |
227- cmake --build build --parallel 4 --target build-tests
228- cmake --build build --parallel 4 --target tests || ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
249+ # Base NVHPC images are minimal; install what you need
250+ apt-get update
251+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
252+ cmake git python-is-python3 ca-certificates pkg-config make
229253
230- - name : Run Ctest
231- run : ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
254+ cmake --version
255+
256+ echo "== Git safe.directory =="
257+ git config --global --add safe.directory "*"
258+
259+ echo "== Build pFUnit =="
260+ cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_ROBUST=YES
261+ cmake --build build --parallel 4 --target install
262+ cmake -B build -DSKIP_OPENMP=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=../install -DSKIP_ROBUST=YES
263+ cmake --build build --parallel 4 --target install
264+
265+ echo "== Build Tests (CURRENTLY TURNED OFF DUE TO PFUNIT ISSUES) =="
266+ #cmake --build build --parallel 4 --target build-tests
267+ #cmake --build build --parallel 4 --target tests || ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
268+
269+ echo "== Run Tests (CURRENTLY TURNED OFF DUE TO PFUNIT ISSUES) =="
270+ #ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
271+ '
232272
233273 - name : Archive log files on failure
234- uses : actions/upload-artifact@v4
235274 if : failure()
275+ uses : actions/upload-artifact@v4
236276 with :
237277 name : logfiles-Nvidia
238278 path : |
@@ -259,7 +299,7 @@ jobs:
259299 cmake --version
260300
261301 - name : Checkout
262- uses : actions/checkout@v4
302+ uses : actions/checkout@v5
263303 with :
264304 fetch-depth : 1
265305 submodules : true
0 commit comments