Skip to content

Commit 5f9a2c0

Browse files
committed
Merge branch 'main' into release
2 parents 829854a + 52598a1 commit 5f9a2c0

File tree

108 files changed

+5289
-3153
lines changed

Some content is hidden

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

108 files changed

+5289
-3153
lines changed

.github/workflows/build-wheels.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,40 +40,34 @@ jobs:
4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout FFCx
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444
with:
4545
ref: ${{ github.event.inputs.ffcx_ref }}
46-
4746
- name: Upgrade pip and setuptools
4847
run: python -m pip install setuptools pip build --upgrade
49-
5048
- name: Build sdist and wheel
5149
run: python -m build .
52-
53-
- uses: actions/upload-artifact@v2
50+
- uses: actions/upload-artifact@v4
5451
with:
5552
path: dist/*
56-
5753
upload_pypi:
5854
name: Upload to PyPI (optional)
5955
needs: [build]
6056
runs-on: ubuntu-latest
6157
steps:
62-
- uses: actions/download-artifact@v3
58+
- uses: actions/download-artifact@v4
6359
with:
6460
name: artifact
6561
path: dist
66-
6762
- name: Publish to PyPI
68-
uses: pypa/gh-action-pypi-publish@v1.5.1
63+
uses: pypa/gh-action-pypi-publish@release/v1
6964
if: ${{ github.event.inputs.pypi_publish == 'true' }}
7065
with:
7166
user: __token__
7267
password: ${{ secrets.PYPI_TOKEN }}
7368
repository_url: https://upload.pypi.org/legacy/
74-
7569
- name: Publish to Test PyPI
76-
uses: pypa/gh-action-pypi-publish@v1.5.1
70+
uses: pypa/gh-action-pypi-publish@release/v1
7771
if: ${{ github.event.inputs.test_pypi_publish == 'true' }}
7872
with:
7973
user: __token__

.github/workflows/dolfin-tests.yml renamed to .github/workflows/dolfinx-tests.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,13 @@ jobs:
2525
build:
2626
name: Run DOLFINx tests
2727
runs-on: ubuntu-latest
28-
container: fenicsproject/test-env:nightly-openmpi
29-
28+
container: ghcr.io/fenics/test-env:current-openmpi
3029
env:
31-
PETSC_ARCH: linux-gnu-complex-32
30+
PETSC_ARCH: linux-gnu-complex64-32
3231
OMPI_ALLOW_RUN_AS_ROOT: 1
3332
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
34-
OMPI_MCA_rmaps_base_oversubscribe: 1
35-
OMPI_MCA_plm: isolated
36-
OMPI_MCA_btl_vader_single_copy_mechanism: none
37-
OMPI_MCA_mpi_yield_when_idle: 1
38-
OMPI_MCA_hwloc_base_binding_policy: none
39-
4033
steps:
41-
- uses: actions/checkout@v3
42-
- name: Install dependencies (Python)
43-
run: |
44-
python3 -m pip install --upgrade pip
45-
34+
- uses: actions/checkout@v4
4635
- name: Install UFL and Basix (default branches/tags)
4736
if: github.event_name != 'workflow_dispatch'
4837
run: |
@@ -53,33 +42,30 @@ jobs:
5342
run: |
5443
python3 -m pip install git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_ref }}
5544
python3 -m pip install git+https://github.com/FEniCS/basix.git@${{ github.event.inputs.basix_ref }}
56-
5745
- name: Install FFCx
5846
run: |
5947
pip3 install .
60-
6148
- name: Get DOLFINx source (default branch/tag)
6249
if: github.event_name != 'workflow_dispatch'
63-
uses: actions/checkout@v3
50+
uses: actions/checkout@v4
6451
with:
6552
path: ./dolfinx
6653
repository: FEniCS/dolfinx
6754
ref: main
6855
- name: Get DOLFINx source (specified branch/tag)
6956
if: github.event_name == 'workflow_dispatch'
70-
uses: actions/checkout@v3
57+
uses: actions/checkout@v4
7158
with:
7259
path: ./dolfinx
7360
repository: FEniCS/dolfinx
7461
ref: ${{ github.event.inputs.dolfinx_ref }}
75-
76-
- name: Install DOLFINx
62+
- name: Install DOLFINx (C++)
7763
run: |
7864
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx/cpp/
7965
cmake --build build
8066
cmake --install build
81-
pip3 -v install --global-option build --global-option --debug dolfinx/python/
82-
67+
- name: Install DOLFINx (Python)
68+
run: python3 -m pip -v install --check-build-dependencies --no-build-isolation dolfinx/python/
8369
- name: Build DOLFINx C++ unit tests
8470
run: |
8571
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S dolfinx/cpp/test/
@@ -88,7 +74,6 @@ jobs:
8874
run: |
8975
cd build/test
9076
ctest -V --output-on-failure -R unittests
91-
9277
- name: Run DOLFINx Python unit tests
9378
run: python3 -m pytest -n auto dolfinx/python/test/unit
9479
- name: Run DOLFINx Python demos

.github/workflows/pythonapp.yml

Lines changed: 17 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
pull_request:
1414
branches:
1515
- main
16-
1716
workflow_dispatch:
1817

1918
jobs:
@@ -22,107 +21,68 @@ jobs:
2221
strategy:
2322
matrix:
2423
os: [ubuntu-latest]
25-
python-version: ['3.8', '3.9', '3.10', "3.11"]
26-
27-
env:
28-
CC: gcc-10
29-
CXX: g++-10
30-
24+
python-version: ['3.9', '3.10', '3.11', '3.12']
3125
steps:
3226
- name: Checkout FFCx
33-
uses: actions/checkout@v3
34-
27+
uses: actions/checkout@v4
3528
- name: Set up Python
36-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v5
3730
with:
3831
python-version: ${{ matrix.python-version }}
39-
4032
- name: Install dependencies (non-Python, Linux)
4133
if: runner.os == 'Linux'
4234
run: |
4335
sudo apt-get install -y graphviz libgraphviz-dev ninja-build pkg-config
44-
4536
- name: Install dependencies (non-Python, macOS)
4637
if: runner.os == 'macOS'
4738
run: brew install graphviz ninja pkg-config
48-
4939
- name: Install FEniCS dependencies (Python)
5040
run: |
51-
python -m pip install git+https://github.com/FEniCS/ufl.git@release
52-
python -m pip install git+https://github.com/FEniCS/basix.git@release
53-
41+
pip install git+https://github.com/FEniCS/ufl.git
42+
pip install git+https://github.com/FEniCS/basix.git
5443
- name: Install FFCx
55-
run: |
56-
python -m pip install .[ci]
57-
58-
- name: Lint with flake8
59-
run: |
60-
python -m flake8 --statistics ffcx/ test/
61-
44+
run: pip install .[ci]
6245
- name: Static check with mypy
46+
run: mypy ffcx/
47+
if: matrix.python-version != '3.12'
48+
- name: ruff checks
6349
run: |
64-
python -m mypy ffcx/
65-
if: matrix.python-version != '3.11'
66-
67-
- name: isort checks (non-blocking)
68-
continue-on-error: true
69-
run: |
70-
python3 -m isort --check .
71-
72-
- name: Check documentation style
73-
run: |
74-
python -m pydocstyle .
75-
50+
ruff check .
51+
ruff format --check .
7652
- name: Run units tests
77-
run: |
78-
python -m pytest -n auto --cov=ffcx/ --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml test/
79-
53+
run: python -m pytest -n auto --cov=ffcx/ --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml test/
8054
- name: Upload to Coveralls
8155
if: ${{ github.repository == 'FEniCS/ffcx' && github.head_ref == '' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' }}
8256
env:
8357
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
84-
run: |
85-
python -m coveralls
58+
run: coveralls
8659
continue-on-error: true
87-
8860
- name: Upload pytest results
89-
uses: actions/upload-artifact@v3
61+
uses: actions/upload-artifact@v4
9062
with:
9163
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
9264
path: junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml
9365
# Use always() to always run this step to publish test results
9466
# when there are test failures
9567
if: always()
96-
97-
- name: Get UFL
98-
uses: actions/checkout@v3
99-
with:
100-
path: ./ufl
101-
repository: FEniCS/ufl
102-
ref: main
103-
104-
- name: Run FFCx and UFL demos
68+
- name: Run FFCx demos
10569
run: |
106-
mv ufl/demo/* demo/
10770
pytest demo/test_demos.py
10871
rm -Rf ufl/
109-
11072
- name: Build documentation
11173
run: |
11274
cd doc
11375
make html
114-
11576
- name: Upload documentation artifact
116-
uses: actions/upload-artifact@v3
77+
uses: actions/upload-artifact@v4
11778
with:
11879
name: doc-${{ matrix.os }}-${{ matrix.python-version }}
11980
path: doc/build/html/
12081
retention-days: 2
12182
if-no-files-found: error
122-
12383
- name: Checkout FEniCS/docs
12484
if: ${{ github.repository == 'FEniCS/ffcx' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }}
125-
uses: actions/checkout@v3
85+
uses: actions/checkout@v4
12686
with:
12787
repository: "FEniCS/docs"
12888
path: "docs"

.github/workflows/spack.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Spack install
2+
3+
on:
4+
# Uncomment the below 'push' to trigger on push
5+
# push:
6+
# branches:
7+
# - "**"
8+
schedule:
9+
# '*' is a special character in YAML, so string must be quoted
10+
- cron: "0 2 * * SUN"
11+
workflow_dispatch:
12+
inputs:
13+
spack_repo:
14+
description: "Spack repository to test"
15+
default: "spack/spack"
16+
type: string
17+
spack_ref:
18+
description: "Spack repository branch/tag to test"
19+
default: "develop"
20+
type: string
21+
ffcx_version:
22+
description: "Spack build tag"
23+
default: "main"
24+
type: string
25+
26+
jobs:
27+
build:
28+
runs-on: ubuntu-latest
29+
container: ubuntu:latest
30+
steps:
31+
- name: Install Spack requirements
32+
run: |
33+
apt-get -y update
34+
apt-get install -y bzip2 curl file git gzip make patch python3-minimal tar xz-utils
35+
apt-get install -y g++ gfortran # compilers
36+
37+
- name: Get Spack
38+
if: github.event_name != 'workflow_dispatch'
39+
uses: actions/checkout@v4
40+
with:
41+
path: ./spack
42+
repository: spack/spack
43+
- name: Get Spack
44+
if: github.event_name == 'workflow_dispatch'
45+
uses: actions/checkout@v4
46+
with:
47+
path: ./spack
48+
repository: ${{ github.event.inputs.spack_repo }}
49+
ref: ${{ github.event.inputs.spack_ref }}
50+
51+
- name: Install FFCx and run tests
52+
if: github.event_name != 'workflow_dispatch'
53+
run: |
54+
. ./spack/share/spack/setup-env.sh
55+
spack env create ffcx-main
56+
spack env activate ffcx-main
57+
spack add py-fenics-ffcx@main
58+
spack install --test=root
59+
60+
- name: Install FFCx and run tests
61+
if: github.event_name == 'workflow_dispatch'
62+
run: |
63+
. ./spack/share/spack/setup-env.sh
64+
spack env create ffcx-testing
65+
spack env activate ffcx-testing
66+
spack add py-fenics-ffcx@${{ github.event.inputs.ffcx_version }}
67+
spack install --test=root

.isort.cfg

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

AUTHORS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ Contributors:
6060
Ivan Yashchuk
6161
6262

63+
Matthew Scroggs
64+
65+
www: https://mscroggs.co.uk
6366

6467
Credits for UFC
6568
===============

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
The header file ufcx.h is released into the public domain.
1+
The header file ufcx.h is released using the UNLICENSE. See UNLICENSE for the
2+
license text.
23

34
------------------------------------------------------------------------------
45

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# FFCx: The FEniCSx Form Compiler
22

33
[![FFCx CI](https://github.com/FEniCS/ffcx/actions/workflows/pythonapp.yml/badge.svg)](https://github.com/FEniCS/ffcx/actions/workflows/pythonapp.yml)
4+
[![Spack install](https://github.com/FEniCS/ffcx/actions/workflows/spack.yml/badge.svg)](https://github.com/FEniCS/ffcx/actions/workflows/spack.yml)
45
[![Coverage Status](https://coveralls.io/repos/github/FEniCS/ffcx/badge.svg?branch=main)](https://coveralls.io/github/FEniCS/ffcx?branch=main)
56

67
FFCx is a new version of the FEniCS Form Compiler. It is being actively

UNLICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The software in the file ufcx.h is free and unencumbered software released into
2+
the public domain.
3+
4+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
5+
software, either in source code form or as a compiled binary, for any purpose,
6+
commercial or non-commercial, and by any means.
7+
8+
In jurisdictions that recognize copyright laws, the author or authors of this
9+
software dedicate any and all copyright interest in the software to the public
10+
domain. We make this dedication for the benefit of the public at large and to
11+
the detriment of our heirs and successors. We intend this dedication to be an
12+
overt act of relinquishment in perpetuity of all present and future rights to
13+
this software under copyright law.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21+
22+
For more information, please refer to <https://unlicense.org>

0 commit comments

Comments
 (0)