@@ -37,46 +37,58 @@ jobs:
3737 unzip xz zstd gcc gcc-c++ gcc-gfortran
3838
3939 - name : Checkout Spack
40- uses : actions/checkout@v5
40+ uses : actions/checkout@v6
4141 with :
4242 repository : spack/spack
4343 path : spack-src
4444
45+ - name : Get Spack packages (custom)
46+ uses : actions/checkout@v6
47+ with :
48+ repository : fenics/spack-packages
49+ ref : fenics-testing
50+ path : spack-packages
51+ - name : Add Spack packages repo
52+ run : |
53+ . $GITHUB_WORKSPACE/spack-src/share/spack/setup-env.sh
54+ spack repo add --name builtin $GITHUB_WORKSPACE/spack-packages/repos/spack_repo/builtin
55+ spack config get repos
56+
4557 - name : Checkout DOLFINx
46- uses : actions/checkout@v5
58+ uses : actions/checkout@v6
4759 with :
4860 path : dolfinx-src
4961
5062 - name : Create Spack environment
5163 run : |
5264 . ./spack-src/share/spack/setup-env.sh
53- spack env create . dolfinx-src/.github/workflows/spack-config/gh-actions-rh.yml
65+ spack env create py dolfinx-src/.github/workflows/spack-config/gh-actions-rh.yml
5466
5567 - name : Add dependencies to environment
5668 run : |
5769 . ./spack-src/share/spack/setup-env.sh
58- spack -e . add mpi petsc+mpi+shared+mumps slepc parmetis pkgconfig python hdf5+mpi boost pugixml spdlog
59- spack -e . add python py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py py-scikit-build-core+pyproject py-setuptools py-cffi
60- spack -e . add py-pip cmake catch2 py-pytest py-pytest-xdist ninja
70+ spack -e py add mpi petsc+mpi+shared+mumps slepc parmetis pkgconfig python hdf5+mpi boost pugixml spdlog
71+ spack -e py add python py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py py-scikit-build-core+pyproject py-setuptools py-cffi
72+ spack -e py add py-pip cmake catch2 py-pytest py-pytest-xdist ninja
6173
6274 - if : matrix.compiler == 'oneapi'
6375 name : Add oneAPI compilers to environment
6476 run : |
6577 . ./spack-src/share/spack/setup-env.sh
66- spack -e . add intel-oneapi-compilers
78+ spack -e py add intel-oneapi-compilers
6779
6880 - name : Install Spack packages
6981 run : |
7082 . ./spack-src/share/spack/setup-env.sh
71- spack -e . install -j4 -p2 --use-buildcache auto
83+ spack -e py install -j4 -p2 --use-buildcache auto
7284
7385 - name : Push packages to Spack cache and update index
7486 env :
7587 GITHUB_USER : ${{ github.actor }}
7688 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7789 run : |
7890 . ./spack-src/share/spack/setup-env.sh
79- spack -e . buildcache push --base-image ghcr.io/almalinux/almalinux:10 --update-index local-buildcache
91+ spack -e py buildcache push --base-image ghcr.io/almalinux/almalinux:10 --update-index local-buildcache
8092 if : ${{ !cancelled() }}
8193
8294 - name : Load FEniCS testing environment variables
@@ -85,36 +97,36 @@ jobs:
8597 - name : Install FEniCS Python components
8698 run : |
8799 . ./spack-src/share/spack/setup-env.sh
88- spack env activate .
100+ spack env activate py
89101 pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
90102 pip install git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
91103 pip install git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
92104
93105 - name : Configure and build C++
94106 run : |
95107 . ./spack-src/share/spack/setup-env.sh
96- spack env activate .
97- cmake -Werror=dev --warn-uninitialized -G Ninja -DBUILD_TESTING=true -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx-src/cpp/
108+ spack env activate py
109+ cmake -Werror=dev --warn-uninitialized -G Ninja -DBUILD_TESTING=true -DCMAKE_BUILD_TYPE=Developer -DDOLFINX_ENABLE_PETSC=on -DDOLFINX_ENABLE_SLEPC=true -DDOLFINX_ENABLE_PARMETIS=true - B build -S dolfinx-src/cpp/
98110 cmake --build build
99111
100112 - name : Run tests without install (C++, serial and MPI np=2)
101113 run : |
102114 . ./spack-src/share/spack/setup-env.sh
103- spack env activate .
115+ spack env activate py
104116 cd build
105- mpirun -np 1 ctest -V --output-on-failure -R unittests
106- mpirun -np 2 ctest -V --output-on-failure -R unittests
117+ ctest -V --output-on-failure -R unittests_np_1
118+ ctest -V --output-on-failure -R unittests_np_2
107119
108120 - name : Install C++
109121 run : |
110122 . ./spack-src/share/spack/setup-env.sh
111- spack env activate .
123+ spack env activate py
112124 cmake --build build --target install
113125
114126 - name : Build and run C++ regression tests (serial and MPI (np=2))
115127 run : |
116128 . ./spack-src/share/spack/setup-env.sh
117- spack env activate .
129+ spack env activate py
118130 cmake -Werror=dev --warn-uninitialized -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S dolfinx-src/cpp/demo/
119131 cmake --build build/demo
120132 cd build/demo
@@ -125,13 +137,13 @@ jobs:
125137 run : |
126138 dnf install -y mesa-libGLU libX11 libXrender mesa-libEGL libglvnd-glx libXcursor libXft libXinerama
127139 . ./spack-src/share/spack/setup-env.sh
128- spack env activate .
140+ spack env activate py
129141 pip install gmsh pyvista
130142
131143 - name : Build Python interface (editable install)
132144 run : |
133145 . ./spack-src/share/spack/setup-env.sh
134- spack env activate .
146+ spack env activate py
135147 pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type=Debug --config-settings=build-dir="build" -e 'dolfinx-src/python/[test]'
136148
137149 - name : Set default DOLFINx JIT options
@@ -142,13 +154,13 @@ jobs:
142154 - name : Run demos (Python, serial and MPI)
143155 run : |
144156 . ./spack-src/share/spack/setup-env.sh
145- spack env activate .
157+ spack env activate py
146158 python -m pytest -n auto -m serial --durations=10 dolfinx-src/python/demo/test.py
147159 python -m pytest -m mpi --num-proc=2 dolfinx-src/python/demo/test.py
148160
149161 - name : Run Python unit tests (serial and MPI)
150162 run : |
151163 . ./spack-src/share/spack/setup-env.sh
152- spack env activate .
164+ spack env activate py
153165 python -m pytest -n auto -m "not adios2" --durations=50 dolfinx-src/python/test/unit/
154166 mpirun -np 2 python -m pytest -m "not adios2" dolfinx-src/python/test/unit/
0 commit comments