11name : " CI (RHEL clone: gcc, oneAPI)"
2+
23on :
34 push :
45 branches :
2021 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM : 1
2122 PRTE_MCA_rmaps_default_mapping_policy : :oversubscribe
2223 PYTEST_ADDOPTS : " -W error"
24+ # Spack environment activation does not add the view's library
25+ # directories to the runtime linker search path, so packages that are
26+ # only present in the environment (not linked via RPATH into a
27+ # consuming package, e.g. mesa-glu's libGLU.so.1 for gmsh) are not
28+ # found at runtime without this.
29+ LD_LIBRARY_PATH : /opt/view/lib:/opt/view/lib64
2330
2431jobs :
2532 ci-spack-build :
2633 name : AlmaLinux build and test
27- runs-on : ubuntu-latest
34+ runs-on : ubuntu-26.04
2835 container : ghcr.io/almalinux/almalinux:10
2936 strategy :
3037 matrix :
@@ -36,123 +43,111 @@ jobs:
3643 dnf -y install file bzip2 ca-certificates git gzip patch python3 tar \
3744 unzip xz zstd gcc gcc-c++ gcc-gfortran
3845
39- - name : Get Spack
40- uses : actions/checkout@v7
46+ - name : Set up Spack
47+ uses : spack/setup-spack@16b756799ede8b28951287f89bcd3fdb32ec1ca3 # v3.0.0
4148 with :
42- repository : spack/spack
43- ref : v1.1.1
44- path : spack-src
45-
46- - name : Get upstream Spack packages
47- uses : actions/checkout@v7
48- with :
49- repository : spack/spack-packages
50- ref : develop
51- path : spack-packages
52-
53- - name : Add Spack packages repo
54- run : |
55- . $GITHUB_WORKSPACE/spack-src/share/spack/setup-env.sh
56- spack repo add --name builtin $GITHUB_WORKSPACE/spack-packages/repos/spack_repo/builtin
57- spack config get repos
58- spack repo list
49+ spack_ref : v1.2.1
50+ packages_ref : v2026.06.0
5951
6052 - name : Checkout DOLFINx
6153 uses : actions/checkout@v7
6254 with :
6355 path : dolfinx-src
6456
6557 - name : Create Spack environment
66- run : |
67- . ./spack-src/share/spack/setup-env.sh
68- spack env create py dolfinx-src/.github/workflows/spack-config/gh-actions-rh.yml
58+ run : spack env create py dolfinx-src/.github/workflows/spack-config/gh-actions-rh.yml
6959
7060 - name : Add dependencies to environment
7161 run : |
72- . ./spack-src/share/spack/setup-env.sh
73- spack -e py add mpi petsc+mpi+shared+mumps+superlu-dist slepc parmetis pkgconfig hdf5+mpi boost pugixml spdlog
74- spack -e py add python@3.14 py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py py-scikit-build-core+pyproject py-setuptools py-cffi
62+ spack -e py add mpi petsc+mpi+shared+mumps+superlu-dist slepc parmetis pkgconfig \
63+ hdf5+mpi boost pugixml spdlog
64+ spack -e py add python py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py \
65+ py-scikit-build-core+pyproject py-setuptools py-cffi
7566 spack -e py add py-pip cmake catch2 py-pytest py-pytest-xdist ninja
67+ # NOTE: freetype@2.13.3 works around a raster overflow bug in
68+ # freetype@2.14.2 (2026-07). Re-check and drop once a fixed
69+ # freetype (2.14.3+) lands in the spack-packages recipe.
7670 spack -e py add openblas
71+ spack -e py add py-gmsh ^gmsh~fltk~med~mmg+external ^opencascade~draw py-pyvista ^mesa~llvm ^freetype@2.13.3 \
72+ py-networkx py-matplotlib py-pyamg py-numba ^llvm~clang~lldb~lld~offload~libomptarget~polly targets=x86 \
73+ py-scipy
74+ # gmsh's compiled library dlopens libGLU.so.1 and several X11
75+ # libraries unconditionally at runtime (its native file-chooser
76+ # and OpenGL-based drawing code are always built in), but the
77+ # gmsh Spack recipe only declares depends_on("glu"/"gl") when
78+ # +fltk is set. We build gmsh ~fltk, so Spack's dependency graph
79+ # never gets these libraries, and none of them are RPATH-linked
80+ # in by any package either — hence they must be added explicitly
81+ # here and put on LD_LIBRARY_PATH (see env above) so gmsh can
82+ # find them at runtime.
83+ spack -e py add mesa-glu libx11 libxcursor libxft libxinerama libxrender
7784
7885 - if : matrix.compiler == 'oneapi'
7986 name : Add oneAPI compilers to environment
80- run : |
81- . ./spack-src/share/spack/setup-env.sh
82- spack -e py add intel-oneapi-compilers
87+ run : spack -e py add intel-oneapi-compilers
8388
8489 - name : Install Spack packages
85- run : |
86- . ./spack-src/share/spack/setup-env.sh
87- spack -e py install -j4 -p2 --use-buildcache auto
90+ run : spack -e py install -j 4 --use-buildcache auto
8891
8992 - name : Push packages to Spack cache and update index
9093 env :
9194 GITHUB_USER : ${{ github.actor }}
9295 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9396 run : |
94- . ./spack-src/share/spack/setup-env.sh
9597 spack debug report
96- spack -d -e py buildcache push --base-image ghcr.io/almalinux/almalinux:10 --update-index local-buildcache
98+ spack -d -e py buildcache push --base-image ghcr.io/almalinux/almalinux:10 --allow-missing -- update-index local-buildcache
9799 if : ${{ !cancelled() }}
98100
99101 - name : Load FEniCS testing environment variables
100102 run : cat dolfinx-src/.github/workflows/fenicsx-refs.env >> $GITHUB_ENV
101103
102104 - name : Install FEniCS Python components
103105 run : |
104- . ./spack-src/share/spack/setup-env.sh
105106 spack env activate py
106107 pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
107108 pip install git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
108109 pip install git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
109110 python -c "import basix, os, sys; sys.stdout.write(os.path.dirname(basix.__file__))"
111+ shell : spack-bash {0}
110112
111113 - name : Configure and build C++
112114 run : |
113- . ./spack-src/share/spack/setup-env.sh
114115 spack env activate py
115116 cmake -Werror=dev --warn-uninitialized -G Ninja -DBUILD_TESTING=true -DCMAKE_BUILD_TYPE=Developer \
116117 -DDOLFINX_ENABLE_PETSC=on -DDOLFINX_ENABLE_SLEPC=true \
117118 -DDOLFINX_ENABLE_PARMETIS=true -DDOLFINX_ENABLE_SUPERLU_DIST=true -B build -S dolfinx-src/cpp/
118119 cmake --build build
120+ shell : spack-bash {0}
119121
120122 - name : Run tests without install (C++, serial and MPI np=2)
121123 run : |
122- . ./spack-src/share/spack/setup-env.sh
123124 spack env activate py
124125 cd build
125126 ctest -V --output-on-failure -R unittests_np_1
126127 ctest -V --output-on-failure -R unittests_np_2
128+ shell : spack-bash {0}
127129
128130 - name : Install C++
129131 run : |
130- . ./spack-src/share/spack/setup-env.sh
131132 spack env activate py
132133 cmake --build build --target install
134+ shell : spack-bash {0}
133135
134136 - name : Build and run C++ regression tests (serial and MPI (np=2))
135137 run : |
136- . ./spack-src/share/spack/setup-env.sh
137138 spack env activate py
138139 cmake -Werror=dev --warn-uninitialized -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S dolfinx-src/cpp/demo/
139140 cmake --build build/demo
140141 cd build/demo
141142 ctest -V -R demo -R serial
142143 ctest -V -R demo -R mpi_2
143-
144- - name : Install gmsh and pyvista (and via package manager install dependencies)
145- run : |
146- dnf install -y mesa-libGLU libX11 libXrender mesa-libEGL libglvnd-glx libXcursor libXft libXinerama
147- . ./spack-src/share/spack/setup-env.sh
148- spack env activate py
149- pip install gmsh pyvista
144+ shell : spack-bash {0}
150145
151146 - name : Build Python interface (editable install)
152147 run : |
153- . ./spack-src/share/spack/setup-env.sh
154148 spack env activate py
155- pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type=Developer --config-settings=build-dir="build" -e 'dolfinx-src/python/[test]'
149+ pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type=Developer --config-settings=build-dir="build" -e 'dolfinx-src/python/'
150+ shell : spack-bash {0}
156151
157152 - name : Set default DOLFINx JIT options
158153 run : |
@@ -161,14 +156,14 @@ jobs:
161156
162157 - name : Run demos (Python, serial and MPI)
163158 run : |
164- . ./spack-src/share/spack/setup-env.sh
165159 spack env activate py
166160 python -m pytest -n auto -m serial --durations=10 dolfinx-src/python/demo/test.py
167161 python -m pytest -m mpi --num-proc=2 dolfinx-src/python/demo/test.py
162+ shell : spack-bash {0}
168163
169164 - name : Run Python unit tests (serial and MPI)
170165 run : |
171- . ./spack-src/share/spack/setup-env.sh
172166 spack env activate py
173167 python -m pytest -n auto -m "not adios2" --durations=50 dolfinx-src/python/test/unit/
174168 mpirun -np 2 python -m pytest -m "not adios2" dolfinx-src/python/test/unit/
169+ shell : spack-bash {0}
0 commit comments