33on :
44 push :
55 branches :
6+ - main
67 - release
78 tags :
89 - " v*"
1718jobs :
1819
1920 lint :
20- runs-on : ubuntu-latest
21+ runs-on : ubuntu-26.04
2122 name : Lint
2223 steps :
2324 - name : Checkout DOLFINx
24- uses : actions/checkout@v6
25+ uses : actions/checkout@v7
2526
2627 - name : Set up Python
27- uses : actions/setup-python@v6
28+ uses : actions/setup-python@v7
2829 with :
29- python-version : ' 3.12 '
30+ python-version : ' 3.14 '
3031
3132 - name : Load environment variables
3233 run : cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
3334
3435 - name : Install linting tools
35- run : pip install clang-format cmake-format[YAML] mypy ruff
36+ run : pip install clang-format gersemi mypy ruff
3637 - name : ruff .py files in C++ code
3738 run : |
3839 cd cpp/
4344 cd python/
4445 ruff check .
4546 ruff format --check .
46- - name : mypy checks
47- run : |
48- cd python/
49- mypy dolfinx
50- mypy demo
51- mypy test
5247 - name : clang-format C++ checks
5348 run : |
5449 cd cpp
@@ -59,10 +54,16 @@ jobs:
5954 cd python/dolfinx/wrappers
6055 clang-format --version
6156 find . -type f \( -name "*.cpp" -o -name "*.h" \) | xargs clang-format --dry-run --Werror
62- - name : cmake-format (non-blocking)
63- continue-on-error : true
57+ - name : gersemi
58+ run : gersemi --check .
59+ - name : mypy checks (no installed)
6460 run : |
65- find . -type f \( -name "*.cmake" -o -name "*.cmake.in" -o -name "CMakeLists.txt" \) | xargs cmake-format --check
61+ cd python/
62+ MYPY_FLAGS="--ignore-missing-imports --disable-error-code no-any-unimported --disable-error-code unused-ignore --disable-error-code attr-defined --disable-error-code name-defined --disable-error-code no-any-return"
63+ mypy $MYPY_FLAGS dolfinx
64+ mypy $MYPY_FLAGS demo
65+ mypy $MYPY_FLAGS test
66+
6667
6768 ccpp-build :
6869 runs-on : ubuntu-24.04
7677
7778 name : Build and test
7879 steps :
79- - uses : actions/checkout@v6
80+ - uses : actions/checkout@v7
8081
8182 - name : Load environment variables
8283 run : cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
8889 libhdf5-mpi-dev liblapack-dev libparmetis-dev libpugixml-dev \
8990 libspdlog-dev libsuperlu-dist-dev mpi-default-dev ninja-build pkg-config
9091 - name : Set up Python
91- uses : actions/setup-python@v6
92+ uses : actions/setup-python@v7
9293 with :
9394 python-version : " 3.12"
9495
@@ -98,13 +99,26 @@ jobs:
9899 pip install scikit-build-core setuptools
99100 python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
100101
101- - name : Install FEniCS Python components
102+ - name : Install UFL
102103 run : |
103104 pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
104- pip install -Ccmake.build-type="Developer" --no-build-isolation git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
105- pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
106105
107- - name : Configure (C++)
106+ # Split install ensures that basix.pc ends up in PKG_CONFIG_PATH for later pkg-config test
107+ - name : Install Basix (C++)
108+ run : |
109+ git clone --branch ${{ env.basix_ref }} --single-branch https://github.com/${{ env.basix_repository }}.git
110+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build-basix -S basix/cpp
111+ cmake --build build-basix
112+ sudo cmake --install build-basix
113+ sudo ldconfig
114+
115+ - name : Install Basix (Python)
116+ run : pip install --no-build-isolation ./basix/python
117+
118+ - name : Install FFCx
119+ run : pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
120+
121+ - name : Configure, no rpath (C++)
108122 working-directory : cpp
109123 run : >
110124 cmake -B build -S .
@@ -116,44 +130,50 @@ jobs:
116130 -DDOLFINX_ENABLE_PETSC=false
117131 -DDOLFINX_ENABLE_SUPERLU_DIST=true
118132 -DDOLFINX_ENABLE_PARMETIS=true
133+ -DDOLFINX_INSTALL_RPATH_USE_LINK_PATH=false
119134
120135 - name : Build and install (C++)
121136 working-directory : cpp/build
122137 run : |
123138 cmake --build .
124139 sudo cmake --install .
140+ sudo ldconfig
141+
142+ - name : Run pkg-config test (C++)
143+ working-directory : cpp/test/pkgconfig
144+ run : |
145+ make
146+ make run
125147
126148 - name : Run tests via target (C++, serial and parallel)
127149 working-directory : cpp/build
128150 run : cmake --build . --target test
129151
130152 - name : Build Python interface
131- run : |
132- pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" 'python/[test]'
133- python -c "from mpi4py import MPI; import dolfinx; assert not dolfinx.has_petsc; assert not dolfinx.has_petsc4py; assert dolfinx.has_superlu_dist"
134-
135- - name : Run mypy
136- working-directory : python
137- run : |
138- pip install mypy types-cffi scipy-stubs
139- mypy -p dolfinx
153+ run : >
154+ pip install 'python/[test,mypy]'
155+ --check-build-dependencies
156+ --no-build-isolation
157+ --config-settings=cmake.build-type="Developer"
140158
141- - name : Run mypy # Use a venv to avoid NumPy upgrades that are incompatible with numba
142- working-directory : python
143- run : |
144- python -m venv mypy-env
145- . ./mypy-env/bin/activate
146- pip install mypy types-cffi scipy-stubs
147- mypy -p dolfinx
148- mypy test
149- mypy demo
159+ - name : Check Python configuration
160+ run : python -c "from mpi4py import MPI; import dolfinx; assert not dolfinx.has_petsc; assert not dolfinx.has_petsc4py; assert dolfinx.has_superlu_dist"
150161
151162 - name : Install gmsh and pyvista (and dependencies)
152163 run : |
153164 sudo apt-get install libglu1-mesa libgl1 libxrender1 libxcursor1 libxft2 libxinerama1
154165 sudo apt-get install libegl1
155166 pip install gmsh pyvista
156167
168+ - name : mypy checks (no petsc4py)
169+ run : |
170+ DISABLE_FLAGS="--disable-error-code import-not-found --disable-error-code no-any-unimported"
171+ mypy --config-file python/pyproject.toml -p dolfinx --exclude 'petsc\.py|io/utils\.py' $DISABLE_FLAGS
172+ cd python/
173+ DISABLE_FLAGS="$DISABLE_FLAGS --disable-error-code attr-defined --disable-error-code name-defined --disable-error-code unused-ignore"
174+ mypy demo $DISABLE_FLAGS
175+ mypy test $DISABLE_FLAGS
176+
157177 - name : Run demos (Python, serial)
158178 run : |
159179 pip install pytest-xdist
@@ -167,7 +187,7 @@ jobs:
167187 run : mpirun -np 3 python -m pytest -m "not petsc4py and not adios2" python/test/unit
168188
169189 ccpp-build-with-petsc :
170- runs-on : ubuntu-latest
190+ runs-on : ubuntu-26.04
171191 needs : [lint]
172192 strategy :
173193 matrix :
@@ -188,7 +208,7 @@ jobs:
188208
189209 name : Build and test (${{ matrix.petsc_arch }}, ${{ matrix.docker_image }})
190210 steps :
191- - uses : actions/checkout@v6
211+ - uses : actions/checkout@v7
192212
193213 - name : Load environment variables
194214 run : cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
@@ -199,11 +219,23 @@ jobs:
199219 pip install scikit-build-core
200220 python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
201221
202- - name : Install FEniCS Python components
222+ - name : Install UFL
203223 run : |
204224 pip install git+https://github.com/${{ env.ufl_repository }}.git@${{ env.ufl_ref }}
205- pip install -Ccmake.build-type="Developer" --no-build-isolation git+https://github.com/${{ env.basix_repository }}.git@${{ env.basix_ref }}
206- pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
225+
226+ # Split install ensures that basix.pc ends up in PKG_CONFIG_PATH for later pkg-config test
227+ - name : Install Basix (C++)
228+ run : |
229+ git clone --branch ${{ env.basix_ref }} --single-branch https://github.com/${{ env.basix_repository }}.git
230+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build-basix -S basix/cpp
231+ cmake --build build-basix
232+ cmake --install build-basix
233+
234+ - name : Install Basix (Python)
235+ run : pip install --no-build-isolation ./basix/python
236+
237+ - name : Install FFCx
238+ run : pip install --no-build-isolation git+https://github.com/${{ env.ffcx_repository }}.git@${{ env.ffcx_ref }}
207239
208240 - name : Configure (C++)
209241 working-directory : cpp
@@ -213,6 +245,8 @@ jobs:
213245 --warn-uninitialized
214246 -G Ninja
215247 -DCMAKE_BUILD_TYPE=Developer
248+ -DBUILD_TESTING=true
249+ -DDOLFINX_BUILD_DEMOS=true
216250 -DDOLFINX_ENABLE_ADIOS2=true
217251 -DDOLFINX_ENABLE_KAHIP=true
218252 -DDOLFINX_ENABLE_PETSC=true
@@ -224,41 +258,28 @@ jobs:
224258 working-directory : cpp/build
225259 run : cmake --build . --target install
226260
227- - name : Build tests (C++, standalone )
228- working-directory : cpp/test
261+ - name : Run pkg-config test (C++)
262+ working-directory : cpp/test/pkgconfig
229263 run : |
230- cmake -B build -S . -DCMAKE_BUILD_TYPE=Developer -GNinja
231- cmake --build build
264+ export PKG_CONFIG_PATH=$PETSC_DIR/$PETSC_ARCH/lib/pkgconfig:$SLEPC_DIR/$PETSC_ARCH/lib/pkgconfig:$PKG_CONFIG_PATH
265+ make
266+ make run
232267
233- - name : Run tests (C++, serial)
234- working-directory : cpp/test/build
235- run : ctest -V --output-on-failure -R unittests_np_1
236- - name : Run tests (C++, MPI, np=3)
237- working-directory : cpp/test/build
238- run : ctest -V --output-on-failure -R unittests_np_3
239-
240- - name : Build and run C++ regression tests (serial and MPI (np=2))
241- run : |
242- cmake -Werror=dev --warn-uninitialized -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S cpp/demo/
243- cmake --build build/demo
244- cd build/demo
245- ctest -V -R demo -R serial
246- ctest --output-on-failure -V -R demo -R mpi_2
268+ - name : Run unit tests and demos via target (C++, serial and parallel)
269+ working-directory : cpp/build
270+ env :
271+ CTEST_OUTPUT_ON_FAILURE : 1
272+ run : cmake --build . --target test
247273
248274 - name : Build Python interface
249- run : |
250- pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" 'python/[test]'
251- python -c "from mpi4py import MPI; import dolfinx; assert dolfinx.has_adios2; assert dolfinx.has_kahip; assert not dolfinx.has_parmetis; assert dolfinx.has_petsc; assert dolfinx.has_petsc4py; assert dolfinx.has_ptscotch; assert dolfinx.has_slepc; assert dolfinx.has_complex_ufcx_kernels"
275+ run : >
276+ pip install 'python/[test,mypy]'
277+ --check-build-dependencies
278+ --no-build-isolation
279+ --config-settings=cmake.build-type="Developer"
252280
253- - name : Run mypy # Use a venv to avoid NumPy upgrades that are incompatible with numba
254- working-directory : python
255- run : |
256- python -m venv mypy-env
257- . ./mypy-env/bin/activate
258- pip install mypy types-cffi scipy-stubs
259- mypy -p dolfinx
260- # mypy test
261- # mypy demo
281+ - name : Check Python configuration
282+ run : python -c "from mpi4py import MPI; import dolfinx; assert dolfinx.has_adios2; assert dolfinx.has_kahip; assert not dolfinx.has_parmetis; assert dolfinx.has_petsc; assert dolfinx.has_petsc4py; assert dolfinx.has_ptscotch; assert dolfinx.has_slepc; assert dolfinx.has_complex_ufcx_kernels"
262283
263284 - name : Numpy version
264285 run : python -c "import numpy; print(numpy.__version__)"
@@ -273,6 +294,13 @@ jobs:
273294 apt-get install libegl1 libxrender1
274295 pip install pyvista
275296
297+ - name : mypy checks (with petsc4py)
298+ run : |
299+ mypy --config-file python/pyproject.toml -p dolfinx --exclude superlu_dist.py
300+ cd python/
301+ mypy demo
302+ mypy test
303+
276304 - name : Run demos (Python, serial)
277305 run : |
278306 pip install pytest-xdist
@@ -286,7 +314,7 @@ jobs:
286314 run : mpirun -np 3 python -m pytest -m "petsc4py or adios2" python/test/unit/
287315
288316 build-and-publish-docs :
289- runs-on : ubuntu-latest
317+ runs-on : ubuntu-26.04
290318 needs : [lint]
291319 container : " ghcr.io/fenics/test-env:current-openmpi"
292320 env :
@@ -297,7 +325,7 @@ jobs:
297325
298326 name : Build and publish docs
299327 steps :
300- - uses : actions/checkout@v6
328+ - uses : actions/checkout@v7
301329
302330 - name : Load environment variables
303331 run : cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
@@ -321,16 +349,18 @@ jobs:
321349 cmake --install build
322350
323351 - name : Build Python interface
324- run : |
325- pip install --check-build-dependencies --no-build-isolation 'python/[docs]'
352+ run : >
353+ pip install 'python/[docs]'
354+ --check-build-dependencies
355+ --no-build-isolation
326356
327357 - name : Build C++ interface documentation
328358 run : |
329359 export DOLFINX_VERSION=`cmake -L build | grep DOXYGEN_DOLFINX_VERSION | cut -f2 -d "="`
330360 echo $DOLFINX_VERSION
331361 cd cpp/doc
332362 doxygen Doxyfile
333- make html
363+ python -m sphinx -b html source/ build/ html
334364 - name : Upload C++ Doxygen documentation artifact
335365 uses : actions/upload-artifact@v7
336366 with :
@@ -357,7 +387,7 @@ jobs:
357387
358388 - name : Checkout FEniCS/docs
359389 if : ${{ github.repository == 'FEniCS/dolfinx' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') ) }}
360- uses : actions/checkout@v6
390+ uses : actions/checkout@v7
361391 with :
362392 repository : " FEniCS/docs"
363393 path : " docs"
0 commit comments