Skip to content

Commit 100c21c

Browse files
authored
Merge branch 'FEniCS:main' into main
2 parents b5f17c2 + 320519d commit 100c21c

50 files changed

Lines changed: 582 additions & 322 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-wheels.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Checkout Basix
8181
if: ${{ github.event.inputs.build_fenicsx_stack == 'true' }}
82-
uses: actions/checkout@v5
82+
uses: actions/checkout@v6
8383
with:
8484
repository: FEniCS/basix
8585
path: basix
@@ -93,7 +93,7 @@ jobs:
9393
9494
- name: Checkout UFL
9595
if: ${{ github.event.inputs.build_fenicsx_stack == 'true' }}
96-
uses: actions/checkout@v5
96+
uses: actions/checkout@v6
9797
with:
9898
repository: FEniCS/ufl
9999
path: ufl
@@ -105,7 +105,7 @@ jobs:
105105

106106
- name: Checkout FFCx
107107
if: ${{ github.event.inputs.build_fenicsx_stack == 'true' }}
108-
uses: actions/checkout@v5
108+
uses: actions/checkout@v6
109109
with:
110110
repository: FEniCS/ffcx
111111
path: ffcx
@@ -147,7 +147,7 @@ jobs:
147147
python -m simple503 --base-url file:///project/simple simple
148148
149149
- name: Checkout DOLFINx
150-
uses: actions/checkout@v5
150+
uses: actions/checkout@v6
151151
with:
152152
path: dolfinx
153153
ref: ${{ github.event.inputs.dolfinx_ref }}
@@ -168,13 +168,13 @@ jobs:
168168
# Artifact can be unzipped into $(pwd) and tested with e.g.:
169169
# docker run -ti -v $(pwd):/shared --env PIP_EXTRA_INDEX_URL=file:///shared python:3.9 /bin/bash -l
170170
- name: Upload simple503-test artifact
171-
uses: actions/upload-artifact@v4
171+
uses: actions/upload-artifact@v6
172172
with:
173173
name: "simple503-test"
174174
path: simple/*
175175

176176
- name: Upload wheelhouse artifact
177-
uses: actions/upload-artifact@v4
177+
uses: actions/upload-artifact@v6
178178
with:
179179
name: wheelhouse
180180
path: wheelhouse/*
@@ -185,7 +185,7 @@ jobs:
185185
186186
# For manual upload.
187187
- name: Upload simple503 artifact
188-
uses: actions/upload-artifact@v4
188+
uses: actions/upload-artifact@v6
189189
with:
190190
name: "simple503"
191191
path: simple/*
@@ -198,7 +198,7 @@ jobs:
198198
docker rm ${CONTAINER_ID}
199199
200200
- name: Upload mpiexec artifact
201-
uses: actions/upload-artifact@v4
201+
uses: actions/upload-artifact@v6
202202
with:
203203
name: "mpiexec.hydra"
204204
path: mpiexec.hydra

.github/workflows/ccpp.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
name: Lint
2222
steps:
2323
- name: Checkout DOLFINx
24-
uses: actions/checkout@v5
24+
uses: actions/checkout@v6
2525

2626
- name: Set up Python
2727
uses: actions/setup-python@v6
@@ -76,7 +76,7 @@ jobs:
7676

7777
name: Build and test
7878
steps:
79-
- uses: actions/checkout@v5
79+
- uses: actions/checkout@v6
8080

8181
- name: Load environment variables
8282
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
@@ -121,12 +121,9 @@ jobs:
121121
cmake --build .
122122
sudo cmake --install .
123123
124-
- name: Run tests via target (C++, serial)
124+
- name: Run tests via target (C++, serial and parallel)
125125
working-directory: cpp/build
126-
run: mpirun -np 1 cmake --build . --target test
127-
- name: Run tests via target (C++, MPI, np=3)
128-
working-directory: cpp/build
129-
run: mpirun -np 3 cmake --build . --target test
126+
run: cmake --build . --target test
130127

131128
- name: Build Python interface
132129
run: |
@@ -183,7 +180,7 @@ jobs:
183180

184181
name: Build and test (${{ matrix.petsc_arch }}, ${{ matrix.docker_image }})
185182
steps:
186-
- uses: actions/checkout@v5
183+
- uses: actions/checkout@v6
187184

188185
- name: Load environment variables
189186
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
@@ -222,15 +219,15 @@ jobs:
222219
- name: Build tests (C++, standalone)
223220
working-directory: cpp/test
224221
run: |
225-
cmake -B build -S .
222+
cmake -B build -S . -DCMAKE_BUILD_TYPE=Developer
226223
cmake --build build
227224
228225
- name: Run tests (C++, serial)
229226
working-directory: cpp/test/build
230-
run: mpiexec -np 1 ctest -V --output-on-failure -R unittests
227+
run: ctest -V --output-on-failure -R unittests_np_1
231228
- name: Run tests (C++, MPI, np=3)
232229
working-directory: cpp/test/build
233-
run: mpiexec -np 3 ctest -V --output-on-failure -R unittests
230+
run: ctest -V --output-on-failure -R unittests_np_3
234231

235232
- name: Build and run C++ regression tests (serial and MPI (np=2))
236233
run: |
@@ -292,7 +289,7 @@ jobs:
292289

293290
name: Build and publish docs
294291
steps:
295-
- uses: actions/checkout@v5
292+
- uses: actions/checkout@v6
296293

297294
- name: Load environment variables
298295
run: cat .github/workflows/fenicsx-refs.env >> $GITHUB_ENV
@@ -327,13 +324,13 @@ jobs:
327324
doxygen Doxyfile
328325
make html
329326
- name: Upload C++ Doxygen documentation artifact
330-
uses: actions/upload-artifact@v4
327+
uses: actions/upload-artifact@v6
331328
with:
332329
name: docs-cpp-doxygen
333330
path: cpp/doc/html
334331
retention-days: 2
335332
- name: Upload C++ Sphinx documentation artifact
336-
uses: actions/upload-artifact@v4
333+
uses: actions/upload-artifact@v6
337334
with:
338335
name: docs-cpp-sphinx
339336
path: cpp/doc/build/html
@@ -344,15 +341,15 @@ jobs:
344341
cd python/doc
345342
python -m sphinx -W -b html source/ build/html/
346343
- name: Upload Python documentation artifact
347-
uses: actions/upload-artifact@v4
344+
uses: actions/upload-artifact@v6
348345
with:
349346
name: docs-python
350347
path: python/doc/build/html
351348
retention-days: 2
352349

353350
- name: Checkout FEniCS/docs
354351
if: ${{ github.repository == 'FEniCS/dolfinx' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') ) }}
355-
uses: actions/checkout@v5
352+
uses: actions/checkout@v6
356353
with:
357354
repository: "FEniCS/docs"
358355
path: "docs"

.github/workflows/ci-spack.yml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)