Skip to content

Commit 8457268

Browse files
authored
Merge branch 'main' into garth/mesh-optimise-2
2 parents 24b678b + 8d913e9 commit 8457268

25 files changed

Lines changed: 185 additions & 288 deletions

.github/workflows/build-wheels.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ jobs:
271271
wheel pack {dest_dir}/unpacked/* -d {dest_dir} &&
272272
pipx run abi3audit --verbose --strict --report {wheel}
273273
CIBW_TEST_REQUIRES: pytest-xdist
274-
CIBW_TEST_EXTRAS: test
274+
CIBW_TEST_GROUPS: test
275275
CIBW_TEST_COMMAND_LINUX: >
276276
. /etc/profile &&
277277
module load mpi/mpich-$(arch) &&
@@ -313,7 +313,7 @@ jobs:
313313
sudo git clean -fdx && cd ../ &&
314314
docker run -v $(pwd)/dolfinx:/dolfinx -v $(pwd)/simple:/shared \
315315
--env PIP_INDEX_URL=file:///shared --env PIP_EXTRA_INDEX_URL=https://pypi.org/simple python:3.13 \
316-
/bin/bash -l -c "pip install mpich fenics-dolfinx[test] && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
316+
/bin/bash -l -c "pip install --group /dolfinx/python/pyproject.toml:test mpich fenics-dolfinx && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
317317
318318
- name: Test in clean python image with pypi Intel MPI (x86_64 only)
319319
if: runner.os == 'Linux' && runner.arch == 'X64'
@@ -322,15 +322,15 @@ jobs:
322322
sudo git clean -fdx && cd ../ &&
323323
docker run -v $(pwd)/dolfinx:/dolfinx -v $(pwd)/simple:/shared \
324324
--env PIP_INDEX_URL=file:///shared --env PIP_EXTRA_INDEX_URL=https://pypi.org/simple python:3.14 \
325-
/bin/bash -l -c "pip install impi-rt fenics-dolfinx[test] && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
325+
/bin/bash -l -c "pip install --group /dolfinx/python/pyproject.toml:test impi-rt fenics-dolfinx && mpiexec -n 2 python -m pytest -m 'not adios2 and not petsc4py' /dolfinx/python/test/unit"
326326
327327
- name: Test in clean virtual environment with pypi OpenMPI (macOS)
328328
if: runner.os == 'macOS'
329329
run: |
330330
cd dolfinx && git clean -fdx && cd ../
331331
python -m venv venv-test
332332
source venv-test/bin/activate
333-
PIP_EXTRA_INDEX_URL="file://${GITHUB_WORKSPACE}/simple" pip install openmpi fenics-dolfinx[test]
333+
PIP_EXTRA_INDEX_URL="file://${GITHUB_WORKSPACE}/simple" pip install --group dolfinx/python/pyproject.toml:test openmpi fenics-dolfinx
334334
which mpiexec
335335
mpiexec -n 2 python -m pytest -m "not adios2 and not petsc4py" dolfinx/python/test/unit
336336

.github/workflows/ccpp.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
4141

4242
- name: Install linting tools
43-
run: pip install clang-format gersemi ruff
43+
run: pip install --group python/pyproject.toml:lint
4444
- name: ruff .py files in C++ code
4545
run: |
4646
cd cpp/
@@ -96,8 +96,7 @@ jobs:
9696
- name: Install Python build dependencies
9797
working-directory: python
9898
run: |
99-
pip install scikit-build-core setuptools
100-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
99+
pip install --group pyproject.toml:build setuptools
101100
102101
- name: Install UFL
103102
run: |
@@ -151,19 +150,18 @@ jobs:
151150

152151
- name: Build Python interface
153152
run: >
154-
pip install 'python/[test]'
153+
pip install --group python/pyproject.toml:test 'python/[demo]'
155154
--check-build-dependencies
156155
--no-build-isolation
157156
--config-settings=cmake.build-type="Developer"
158157
159158
- name: Check Python configuration
160159
run: python -c "from mpi4py import MPI; import dolfinx; assert not dolfinx.has_petsc; assert not dolfinx.has_petsc4py; assert dolfinx.has_superlu_dist"
161160

162-
- name: Install gmsh and pyvista (and dependencies)
161+
- name: Install system dependencies for gmsh and pyvista
163162
run: |
164163
sudo apt-get install libglu1-mesa libgl1 libxrender1 libxcursor1 libxft2 libxinerama1
165164
sudo apt-get install libegl1
166-
pip install gmsh pyvista
167165
168166
169167
- name: Run demos (Python, serial)
@@ -208,8 +206,7 @@ jobs:
208206
- name: Install Python build dependencies
209207
working-directory: python
210208
run: |
211-
pip install scikit-build-core
212-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
209+
pip install --group pyproject.toml:build
213210
214211
- name: Install UFL
215212
run: |
@@ -265,7 +262,7 @@ jobs:
265262

266263
- name: Build Python interface
267264
run: >
268-
pip install 'python/[test]'
265+
pip install --group python/pyproject.toml:test 'python/'
269266
--check-build-dependencies
270267
--no-build-isolation
271268
--config-settings=cmake.build-type="Developer"
@@ -319,8 +316,7 @@ jobs:
319316
- name: Install Python build dependencies
320317
working-directory: python
321318
run: |
322-
pip install scikit-build-core setuptools
323-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
319+
pip install --group pyproject.toml:build setuptools
324320
325321
- name: Install FEniCS Python components
326322
run: |
@@ -336,7 +332,7 @@ jobs:
336332
337333
- name: Build Python interface
338334
run: >
339-
pip install 'python/[docs]'
335+
pip install --group python/pyproject.toml:docs 'python/'
340336
--check-build-dependencies
341337
--no-build-isolation
342338

.github/workflows/ci-spack.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
runs-on: ubuntu-26.04
4242
container: ghcr.io/almalinux/almalinux:10
4343
strategy:
44+
# One compiler failing must not cancel the other: the legs share a
45+
# build cache, so a cancelled leg loses its diagnostics and its
46+
# pushed binaries.
47+
fail-fast: false
4448
matrix:
4549
compiler: ["gcc", "oneapi"]
4650

@@ -54,8 +58,9 @@ jobs:
5458
uses: spack/setup-spack@16b756799ede8b28951287f89bcd3fdb32ec1ca3 # v3.0.0
5559
with:
5660
spack_ref: v1.2.2
57-
packages_ref: d342cee94fb90fb020776c8bd8500b54a19c63cf
58-
# packages_ref: v2026.06.0
61+
# spack-packages 'develop' at 2026-08-17. Bumping re-solves the
62+
# graph and can invalidate cached binaries; warm the cache first.
63+
packages_ref: 1ccf95574922e2a7f7ef0351bd67758ad4634b7a
5964

6065
- name: Checkout DOLFINx
6166
uses: actions/checkout@v7
@@ -72,11 +77,8 @@ jobs:
7277
spack -e py add python py-nanobind py-numpy py-mpi4py py-petsc4py py-slepc4py \
7378
py-scikit-build-core@1+pyproject py-setuptools py-cffi
7479
spack -e py add py-pip cmake catch2 py-pytest py-pytest-xdist ninja
75-
# NOTE: freetype@2.13.3 works around a raster overflow bug in
76-
# freetype@2.14.2 (2026-07). Re-check and drop once a fixed
77-
# freetype (2.14.3+) lands in the spack-packages recipe.
7880
spack -e py add openblas
79-
spack -e py add py-gmsh ^gmsh~fltk~med~mmg+external ^opencascade~draw py-pyvista ^mesa~llvm ^freetype@2.13.3 \
81+
spack -e py add py-gmsh ^gmsh~fltk~med~mmg+external ^opencascade~draw py-pyvista ^mesa~llvm \
8082
py-networkx py-matplotlib py-pyamg py-numba ^llvm~clang~lldb~lld~offload~libomptarget~polly targets=x86 \
8183
py-scipy
8284
# gmsh's compiled library dlopens libGLU.so.1 and several X11
@@ -95,7 +97,7 @@ jobs:
9597
run: spack -e py add intel-oneapi-compilers
9698

9799
- name: Install Spack packages
98-
run: spack -e py install -j 4 --use-buildcache auto
100+
run: spack -e py install -j $(nproc) --use-buildcache auto
99101

100102
- name: Push packages to Spack cache and update index
101103
env:
@@ -166,7 +168,10 @@ jobs:
166168
run: |
167169
spack env activate py
168170
python -m pytest -n auto -m serial --durations=10 dolfinx-src/python/demo/test.py
169-
python -m pytest -m mpi --num-proc=2 dolfinx-src/python/demo/test.py
171+
# demo_navier-stokes.py deadlocks at np=2 in its MUMPS direct solve
172+
# (singular-system ICNTLs); it passes in the serial run above.
173+
# Deselected by name, not node id, whose path index follows glob order.
174+
python -m pytest -m mpi --num-proc=2 -k "not navier-stokes" dolfinx-src/python/demo/test.py
170175
shell: spack-bash {0}
171176

172177
- name: Run Python unit tests (serial and MPI)

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080
uses: spack/setup-spack@16b756799ede8b28951287f89bcd3fdb32ec1ca3 # v3.0.0
8181
with:
8282
spack_ref: v1.2.2
83-
packages_ref: d342cee94fb90fb020776c8bd8500b54a19c63cf
84-
# packages_ref: v2026.06.0
83+
# spack-packages 'develop' at 2026-08-17. Bumping re-solves the
84+
# graph and can invalidate cached binaries; warm the cache first.
85+
packages_ref: 1ccf95574922e2a7f7ef0351bd67758ad4634b7a
8586

8687
# Pinned, like spack itself and its packages repo above: an unpinned
8788
# 'main' changes what CI builds with no commit here, which makes a
@@ -163,7 +164,7 @@ jobs:
163164
spack -e ci add py-fenics-dolfinx@main${{ matrix.petsc && '+petsc4py+slepc4py' || '~petsc4py~slepc4py' }} commit=${{ github.sha }} build_type=Developer
164165
spack -e ci add py-gmsh ^gmsh~med~fltk+external ^opencascade~draw py-pyamg py-matplotlib \
165166
py-networkx \
166-
py-numba ^llvm~clang~lldb~lld~offload~libomptarget~polly targets=x86 \
167+
py-numba ^llvm~clang~lldb~lld~offload~libomptarget~polly targets=x86 \
167168
py-pytest py-pytest-xdist py-scipy \
168169
"py-pyvista ^[virtuals=gl] osmesa"
169170
spack -e ci add catch2 ninja
@@ -236,7 +237,10 @@ jobs:
236237
# dolfinx, petsc4py and the rest.
237238
apt-get install -y --no-install-recommends python3-venv
238239
python3 -m venv /tmp/mypy-venv
239-
/tmp/mypy-venv/bin/pip install --quiet mypy
240+
# types-cffi, types-setuptools and scipy-stubs mirror the `typing`
241+
# extra in python/pyproject.toml; installed by name rather than via
242+
# '.[typing]' to avoid triggering a full DOLFINx build in this venv.
243+
/tmp/mypy-venv/bin/pip install --quiet mypy types-cffi types-setuptools scipy-stubs
240244
# Distinguishes a broken install from mypy reporting errors.
241245
/tmp/mypy-venv/bin/mypy --version
242246
ENV_PYTHON=$(command -v python)
@@ -282,4 +286,4 @@ jobs:
282286
|| github.event.pull_request.head.repo.full_name == github.repository) }}
283287
run: |
284288
spack -e ci buildcache push --base-image ubuntu:26.04 --allow-missing --update-index local-buildcache \
285-
py-gmsh py-matplotlib py-networkx py-numba py-pytest py-pytest-xdist py-scipy py-pyvista
289+
catch2 py-gmsh py-matplotlib py-networkx py-numba py-pyamg py-pytest py-pytest-xdist py-scipy py-pyvista

.github/workflows/macos.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,8 @@ jobs:
134134
working-directory: python
135135
run: |
136136
pip install pyamg
137-
pip install scikit-build-core
138-
python -m scikit_build_core.build requires | python -c "import sys, json; print(' '.join(json.load(sys.stdin)))" | xargs pip install
139-
pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" './[test]'
137+
pip install --group pyproject.toml:build
138+
pip install --group pyproject.toml:test --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type="Developer" '.'
140139
141140
- name: Basic test
142141
run: |

.github/workflows/spack-config/gh-actions-env-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spack:
3838

3939
mirrors:
4040
local-buildcache:
41-
url: oci://ghcr.io/fenics/dolfinx-spack-buildcache
41+
url: oci://ghcr.io/fenics/spack-buildcache
4242
binary: true
4343
signed: false
4444
access_pair:

.github/workflows/spack-config/gh-actions-env.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/spack-config/gh-actions-rh.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ spack:
55
root: /opt/spack
66
padded_length: 128
77

8+
concretizer:
9+
unify: true
10+
reuse: false
11+
812
packages:
913
all:
1014
require:
1115
- target=x86_64_v3
1216

1317
mirrors:
1418
local-buildcache:
15-
url: oci://ghcr.io/fenics/spack-rh-buildcache
19+
url: oci://ghcr.io/fenics/spack-buildcache
1620
binary: true
1721
signed: false
1822
access_pair:

0 commit comments

Comments
 (0)