Skip to content

Commit

Permalink
Re-enable all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjward committed Jan 16, 2025
1 parent 8b82c4d commit 2a6c83a
Showing 1 changed file with 66 additions and 41 deletions.
107 changes: 66 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ jobs:
OPENBLAS_NUM_THREADS: 1
COMPLEX: ${{ matrix.complex }}
RDMAV_FORK_SAFE: 1
PYTEST_ARGS:
outputs:
scalar-type: ${{ matrix.scalar-type }}
steps:
- uses: actions/checkout@v4

- name: Cleanup
if: ${{ always() }}
run: |
cd ..
rm -rf firedrake_venv
- name: Build Firedrake
run: |
cd ..
Expand Down Expand Up @@ -86,18 +87,17 @@ jobs:
--install gadopt \
--install asQ \
|| (cat firedrake-install.log && /bin/false)
- name: Install test dependencies
id: build
run: |
sudo apt update
sudo apt -y install parallel
. ../firedrake_venv/bin/activate
python "$(which firedrake-clean)"
python -m pip install \
pytest-timeout \
ipympl \
pytest-split
python -m pip install pytest-timeout ipympl pytest-split
python -m pip list
- name: Run tests (nprocs = 1)
run: |
. ../firedrake_venv/bin/activate
Expand All @@ -107,6 +107,7 @@ jobs:
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake1_{#}.xml \
-m "parallel[1] or not parallel" tests/firedrake ::: $(seq 12)
- name: Run tests (nprocs = 2)
# Run even if earlier tests failed
if: ${{ success() || steps.build.conclusion == 'success' }}
Expand All @@ -118,42 +119,64 @@ jobs:
--junit-xml=firedrake2_{#}.xml \
-m parallel[2] tests/firedrake ::: $(seq 6)
# - name: Run tests (nprocs = 3)
# if: ${{ success() || steps.build.conclusion == 'success' }}
# run: |
# . ../firedrake_venv/bin/activate
# mpispawn -nU 12 -nW 3 --propagate-errcodes \
# pytest "$PYTEST_ARGS" --junit-xml=firedrake3_\$MPISPAWN_TASK_ID1.xml -m parallel[3] -v tests/firedrake
# - name: Run tests (nprocs = 4)
# if: ${{ success() || steps.build.conclusion == 'success' }}
# run: |
# . ../firedrake_venv/bin/activate
# mpispawn -nU 12 -nW 4 --propagate-errcodes \
# pytest "$PYTEST_ARGS" --junit-xml=firedrake4_\$MPISPAWN_TASK_ID1.xml -m parallel[4] -v tests/firedrake
# - name: Run tests (nprocs = 5)
# if: ${{ success() || steps.build.conclusion == 'success' }}
# run: |
# . ../firedrake_venv/bin/activate
# mpispawn -nU 12 -nW 5 --propagate-errcodes \
# pytest "$PYTEST_ARGS" --junit-xml=firedrake5_\$MPISPAWN_TASK_ID1.xml -m parallel[5] -v tests/firedrake
# - name: Run tests (nprocs = 6)
# if: ${{ success() || steps.build.conclusion == 'success' }}
# run: |
# . ../firedrake_venv/bin/activate
# mpispawn -nU 12 -nW 6 --propagate-errcodes \
# pytest "$PYTEST_ARGS" --junit-xml=firedrake6_\$MPISPAWN_TASK_ID1.xml -m parallel[6] -v tests/firedrake
# - name: Run tests (nprocs = 7)
# if: ${{ success() || steps.build.conclusion == 'success' }}
# run: |
# . ../firedrake_venv/bin/activate
# mpispawn -nU 12 -nW 7 --propagate-errcodes \
# pytest "$PYTEST_ARGS" --junit-xml=firedrake7_\$MPISPAWN_TASK_ID1.xml -m parallel[7] -v tests/firedrake
# - name: Run tests (nprocs = 8)
# if: ${{ success() || steps.build.conclusion == 'success' }}
# run: |
# . ../firedrake_venv/bin/activate
# mpispawn -nU 12 -nW 8 --propagate-errcodes \
# pytest "$PYTEST_ARGS" --junit-xml=firedrake8_\$MPISPAWN_TASK_ID1.xml -m parallel[8] -v tests/firedrake
- name: Run tests (nprocs = 3)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
parallel --line-buffer --tag --quote \
mpiexec -n 3 pytest -v --splits 4 --group {#} --splitting-algorithm least_duration \
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake3_{#}.xml \
-m parallel[3] tests/firedrake ::: $(seq 4)
- name: Run tests (nprocs = 4)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
parallel --line-buffer --tag --quote \
mpiexec -n 4 pytest -v --splits 3 --group {#} --splitting-algorithm least_duration \
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake4_{#}.xml \
-m parallel[4] tests/firedrake ::: $(seq 3)
- name: Run tests (nprocs = 5)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
parallel --line-buffer --tag --quote \
mpiexec -n 5 pytest -v --splits 2 --group {#} --splitting-algorithm least_duration \
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake5_{#}.xml \
-m parallel[5] tests/firedrake ::: $(seq 2)
- name: Run tests (nprocs = 6)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
parallel --line-buffer --tag --quote \
mpiexec -n 6 pytest -v --splits 2 --group {#} --splitting-algorithm least_duration \
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake6_{#}.xml \
-m parallel[6] tests/firedrake ::: $(seq 2)
- name: Run tests (nprocs = 7)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
mpiexec -n 7 pytest -v \
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake7.xml \
-m parallel[7] tests/firedrake
- name: Run tests (nprocs = 8)
if: ${{ success() || steps.build.conclusion == 'success' }}
run: |
. ../firedrake_venv/bin/activate
mpiexec -n 8 pytest -v \
--timeout=1800 --timeout-method=thread -o faulthandler_timeout=1860 \
--junit-xml=firedrake8.xml \
-m parallel[8] tests/firedrake
- name: Publish Test Report
uses: mikepenz/[email protected]
if: ${{ always() && ( github.ref != 'refs/heads/master') }}
Expand All @@ -163,6 +186,7 @@ jobs:
check_name: "Firedrake ${{ matrix.scalar-type }}"
updateComment: true
flaky_summary: true

- name: Test pyadjoint
if: ${{ matrix.scalar-type == 'real' }}
run: |
Expand All @@ -177,6 +201,7 @@ jobs:
-n 12 --dist worksteal \
-sv tests/firedrake_adjoint
timeout-minutes: 30

- name: Cleanup
# Belt and braces: clean up before and after the run.
if: ${{ always() }}
Expand Down

0 comments on commit 2a6c83a

Please sign in to comment.