Skip to content

Commit f4bd073

Browse files
committed
Merge branch 'master' into indiamai/new_def_integration
2 parents 82965b9 + c2500aa commit f4bd073

File tree

86 files changed

+2648
-914
lines changed

Some content is hidden

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

86 files changed

+2648
-914
lines changed

.github/workflows/build-mac.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,16 @@ jobs:
4646
--venv-name firedrake_venv \
4747
--disable-ssh \
4848
|| (cat firedrake-install.log && /bin/false)
49+
- name: Install test dependencies
50+
run: |
51+
. ../firedrake_venv/bin/activate
52+
python -m pip install pytest-timeout
53+
4954
- name: Run smoke tests
5055
run: |
5156
. ../firedrake_venv/bin/activate
52-
python -m pytest -v tests/firedrake/regression/ -k "poisson_strong or stokes_mini or dg_advection"
53-
# also test for 'problem libraries' (spatialindex and libsupermesh)
54-
python -m pytest -v tests/firedrake/regression/test_locate_cell.py
55-
python -m pytest -v tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py
56-
timeout-minutes: 30
57+
make check CHECK_PYTEST_ARGS="--timeout 60"
58+
timeout-minutes: 10
5759
- name: Post-run cleanup
5860
if: ${{ always() }}
5961
run: |

.github/workflows/build.yml

Lines changed: 79 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ env:
2121
RELEASE_TAG: latest
2222

2323
jobs:
24-
build:
25-
name: "Build Firedrake"
26-
# Run on our self-hosted machines
24+
test:
25+
name: "Run Firedrake tests (Linux)"
2726
runs-on: [self-hosted, Linux]
2827
container:
2928
image: firedrakeproject/firedrake-env:latest
3029
strategy:
31-
# Don't immediately kill real if complex fails and vice versa.
30+
# We want to know all of the tests which fail, so don't kill real if
31+
# complex fails and vice-versa
3232
fail-fast: false
3333
matrix:
3434
include:
@@ -47,13 +47,16 @@ jobs:
4747
OPENBLAS_NUM_THREADS: 1
4848
COMPLEX: ${{ matrix.complex }}
4949
RDMAV_FORK_SAFE: 1
50+
EXTRA_PYTEST_ARGS: --splitting-algorithm least_duration --timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 tests/firedrake
5051
steps:
5152
- uses: actions/checkout@v4
53+
5254
- name: Cleanup
5355
if: ${{ always() }}
5456
run: |
5557
cd ..
5658
rm -rf firedrake_venv
59+
5760
- name: Build Firedrake
5861
run: |
5962
cd ..
@@ -87,56 +90,108 @@ jobs:
8790
--package-branch fiat indiamai/integrate_fuse \
8891
--package-branch fuse main \
8992
|| (cat firedrake-install.log && /bin/false)
93+
9094
- name: Install test dependencies
95+
id: build
9196
run: |
97+
sudo apt update
98+
sudo apt -y install parallel
9299
. ../firedrake_venv/bin/activate
93100
python "$(which firedrake-clean)"
94-
python -m pip install \
95-
pytest-xdist pytest-timeout ipympl
101+
python -m pip install pytest-timeout ipympl pytest-split pytest-xdist
96102
python -m pip list
97-
- name: Test Firedrake
103+
104+
- name: Run tests (nprocs = 1)
98105
run: |
106+
: # Use pytest-xdist here so we can have a single collated output (not possible
107+
: # for parallel tests)
99108
. ../firedrake_venv/bin/activate
100-
echo OMP_NUM_THREADS is "$OMP_NUM_THREADS"
101-
echo OPENBLAS_NUM_THREADS is "$OPENBLAS_NUM_THREADS"
102-
python -m pytest -v tests/firedrake/test_0init.py
103-
python -m pytest \
104-
--durations=200 \
105-
--timeout=1800 \
106-
--timeout-method=thread \
107-
-o faulthandler_timeout=1860 \
108-
-n 12 --dist worksteal \
109-
--junit-xml=firedrake.xml \
110-
-sv tests/firedrake
111-
timeout-minutes: 120
109+
firedrake-run-split-tests 1 1 "-n 12 $EXTRA_PYTEST_ARGS --junit-xml=firedrake1_{#}.xml"
110+
111+
- name: Run tests (nprocs = 2)
112+
# Run even if earlier tests failed
113+
if: ${{ success() || steps.build.conclusion == 'success' }}
114+
run: |
115+
. ../firedrake_venv/bin/activate
116+
firedrake-run-split-tests 2 6 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake2_{#}.xml"
117+
118+
- name: Run tests (nprocs = 3)
119+
if: ${{ success() || steps.build.conclusion == 'success' }}
120+
run: |
121+
. ../firedrake_venv/bin/activate
122+
firedrake-run-split-tests 3 4 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake3_{#}.xml"
123+
124+
- name: Run tests (nprocs = 4)
125+
if: ${{ success() || steps.build.conclusion == 'success' }}
126+
run: |
127+
. ../firedrake_venv/bin/activate
128+
firedrake-run-split-tests 4 3 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake4_{#}.xml"
129+
130+
- name: Run tests (nprocs = 5)
131+
if: ${{ success() || steps.build.conclusion == 'success' }}
132+
run: |
133+
. ../firedrake_venv/bin/activate
134+
firedrake-run-split-tests 5 2 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake5_{#}.xml"
135+
136+
- name: Run tests (nprocs = 6)
137+
if: ${{ success() || steps.build.conclusion == 'success' }}
138+
run: |
139+
. ../firedrake_venv/bin/activate
140+
firedrake-run-split-tests 6 2 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake6_{#}.xml"
141+
142+
- name: Run tests (nprocs = 7)
143+
if: ${{ success() || steps.build.conclusion == 'success' }}
144+
run: |
145+
. ../firedrake_venv/bin/activate
146+
firedrake-run-split-tests 7 1 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake7_{#}.xml"
147+
148+
- name: Run tests (nprocs = 8)
149+
if: ${{ success() || steps.build.conclusion == 'success' }}
150+
run: |
151+
. ../firedrake_venv/bin/activate
152+
firedrake-run-split-tests 8 1 "$EXTRA_PYTEST_ARGS --junit-xml=firedrake8_{#}.xml"
153+
112154
- name: Publish Test Report
113155
uses: mikepenz/action-junit-report@v5.0.0-a02
114-
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
156+
# To avoid permissions issues do not run with forked repos
157+
# (see https://github.com/mikepenz/action-junit-report/issues/23)
158+
if: ${{ always() && (github.ref != 'refs/heads/master') && (github.event.pull_request.head.repo.full_name == github.repository) }}
115159
with:
116-
report_paths: '/__w/firedrake/firedrake/firedrake.xml'
160+
report_paths: 'firedrake*.xml'
117161
comment: true
118162
check_name: "Firedrake ${{ matrix.scalar-type }}"
119163
updateComment: true
120164
flaky_summary: true
165+
166+
- name: Upload log files
167+
uses: actions/upload-artifact@v4
168+
if: always()
169+
with:
170+
name: firedrake-logs-${{ matrix.scalar-type }}
171+
path: pytest_*.log
172+
121173
- name: Test pyadjoint
122174
if: ${{ matrix.scalar-type == 'real' }}
123175
run: |
124176
. ../firedrake_venv/bin/activate
125177
cd ../firedrake_venv/src/pyadjoint
126178
python -m pytest \
179+
--strict-markers \
127180
--durations=200 \
128181
--timeout=600 \
129182
--timeout-method=thread \
130183
-o faulthandler_timeout=660 \
131184
-n 12 --dist worksteal \
132185
-sv tests/firedrake_adjoint
133186
timeout-minutes: 30
187+
134188
- name: Cleanup
135189
# Belt and braces: clean up before and after the run.
136190
if: ${{ always() }}
137191
run: |
138192
cd ..
139193
rm -rf firedrake_venv
194+
140195
docker_tag:
141196
name: "Set the Docker release tag"
142197
runs-on: [self-hosted, Linux]
@@ -153,14 +208,15 @@ jobs:
153208
echo The release tag is "$RELEASE_TAG"
154209
outputs:
155210
tag: ${{ env.RELEASE_TAG }}
211+
156212
docker:
157213
name: "Build Docker containers"
158214
# Only run on master, but always generate firedrake-env image,
159215
# even if build fails (see docker.yml)
160216
if: ${{ (github.ref == 'refs/heads/master') && always() }}
161-
needs: [build, docker_tag]
217+
needs: [test, docker_tag]
162218
uses: ./.github/workflows/docker.yml
163219
with:
164220
tag: ${{ needs.docker_tag.outputs.tag }}
165-
status: ${{ needs.build.result }}
221+
status: ${{ needs.test.result }}
166222
secrets: inherit

.github/workflows/pip-mac.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
# Only run this action if we are pushing to master or the PR is labelled "macOS"
2424
if: ${{ (github.ref == 'refs/heads/master') || contains(github.event.pull_request.labels.*.name, 'macOS') }}
2525
env:
26+
FIREDRAKE_CI_TESTS: 1
2627
OMP_NUM_THREADS: 1
2728
OPENBLAS_NUM_THREADS: 1
2829
steps:
@@ -53,6 +54,7 @@ jobs:
5354
--with-shared-libraries=1 \
5455
--with-mpi-dir=/opt/homebrew \
5556
--with-zlib \
57+
--with-strict-petscerrorcode \
5658
--download-bison \
5759
--download-hdf5 \
5860
--download-hwloc \
@@ -97,12 +99,8 @@ jobs:
9799
run: |
98100
source pip_venv/bin/activate
99101
cd pip_venv/src/firedrake
100-
python -m pytest --timeout=1800 -v tests/firedrake/regression \
101-
-k "poisson_strong or stokes_mini or dg_advection"
102-
# also test for 'problem libraries' (spatialindex and libsupermesh)
103-
python -m pytest -v tests/firedrake/regression/test_locate_cell.py
104-
python -m pytest -v tests/firedrake/supermesh/test_assemble_mixed_mass_matrix.py
105-
timeout-minutes: 30
102+
make check CHECK_PYTEST_ARGS="--timeout 60"
103+
timeout-minutes: 10
106104

107105
- name: Cleanup (post)
108106
if: ${{ always() }}

.github/workflows/pip.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,14 @@ jobs:
8383
run: |
8484
source pip_venv/bin/activate
8585
cd pip_venv/src/firedrake
86-
pytest -v tests/firedrake/test_0init.py
87-
pytest \
88-
--durations=200 \
89-
--timeout=1800 \
90-
--timeout-method=thread \
91-
-o faulthandler_timeout=1860 \
92-
-n 12 --dist worksteal \
93-
--junit-xml=firedrake.xml \
94-
-sv tests/firedrake/regression -k "poisson_strong or stokes_mini or dg_advection"
95-
timeout-minutes: 120
86+
make check CHECK_PYTEST_ARGS="--timeout 60"
87+
timeout-minutes: 10
9688

9789
- name: Publish Test Report
9890
uses: mikepenz/action-junit-report@v5.0.0-a02
99-
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
91+
# To avoid permissions issues do not run with forked repos
92+
# (see https://github.com/mikepenz/action-junit-report/issues/23)
93+
if: ${{ always() && (github.ref != 'refs/heads/master') && (github.event.pull_request.head.repo.full_name == github.repository) }}
10094
with:
10195
report_paths: '/home/firedrake/pip_venv/src/firedrake/firedrake.xml'
10296
comment: true

.github/workflows/pyop2.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
--with-debugging=1 \
5252
--with-shared-libraries=1 \
5353
--with-c2html=0 \
54+
--with-strict-petscerrorcode \
5455
--with-fortran-bindings=0
5556
make
5657

0 commit comments

Comments
 (0)