From 064deb7a7e83fdfe978c3d59069837fb76c31bac Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 13:43:09 +0100 Subject: [PATCH 01/12] Do not run tests as part of deploy pages --- .github/workflows/deploy_pages.yml | 7 +------ .github/workflows/test_package.yml | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy_pages.yml b/.github/workflows/deploy_pages.yml index c4b559c..5ab0c71 100644 --- a/.github/workflows/deploy_pages.yml +++ b/.github/workflows/deploy_pages.yml @@ -22,13 +22,8 @@ jobs: with: tag: "stable" - run-coverage: - uses: ./.github/workflows/test_package.yml - with: - tag: "stable" - deploy: - needs: [run-coverage, build-docs] + needs: [build-docs] environment: name: github-pages diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml index 851a80b..49df4b5 100644 --- a/.github/workflows/test_package.yml +++ b/.github/workflows/test_package.yml @@ -86,7 +86,7 @@ jobs: - name: Run tests run: | - pytest -xvs ./tests/ + coverage run --rcfile=.coveragerc -m pytest -xvs ./tests/ - name: Run tests in parallel run: | From 041130b5addce9a72a51d745af65624dc59e8beb Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 13:54:17 +0100 Subject: [PATCH 02/12] Restructure workflows --- .github/workflows/build_docs.yml | 15 +++++++++++---- .github/workflows/deploy_pages.yml | 6 ------ .github/workflows/test_package.yml | 5 ----- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index b4f658d..f3478b2 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -15,9 +15,6 @@ on: default: "nightly" required: true type: string - push: - branches: - - main pull_request: branches: - main @@ -40,8 +37,11 @@ jobs: - id: docker_tag run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT + test-code: + uses: ./.github/workflows/test_package.yml + build-docs: - needs: get_image_tag + needs: [get_image_tag, test-code] runs-on: ubuntu-latest container: ghcr.io/fenics/dolfinx/dolfinx:${{ needs.get_image_tag.outputs.image }} @@ -58,6 +58,13 @@ jobs: - name: Build docs run: jupyter book build . + - name: Download docs artifact + # docs artifact is uploaded by build-docs job + uses: actions/download-artifact@v7 + with: + name: code-coverage-report + path: "./_build/html/code-coverage-report" + - name: Upload documentation as artifact uses: actions/upload-artifact@v6 if: always() diff --git a/.github/workflows/deploy_pages.yml b/.github/workflows/deploy_pages.yml index 5ab0c71..66817a5 100644 --- a/.github/workflows/deploy_pages.yml +++ b/.github/workflows/deploy_pages.yml @@ -39,12 +39,6 @@ jobs: name: docs path: "./public" - - name: Download docs artifact - # docs artifact is uploaded by build-docs job - uses: actions/download-artifact@v7 - with: - name: code-coverage-report - path: "./public/code-coverage-report" - name: Upload artifact uses: actions/upload-pages-artifact@v4 diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml index 49df4b5..84e2574 100644 --- a/.github/workflows/test_package.yml +++ b/.github/workflows/test_package.yml @@ -16,11 +16,6 @@ on: required: true type: string - pull_request: - branches: - - main - schedule: - - cron: "0 8 * * *" env: DEB_PYTHON_INSTALL_LAYOUT: deb_system From 9c1218ec737a79e0f1005bd87ba5107d15254c34 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:01:42 +0100 Subject: [PATCH 03/12] Add tag --- .github/workflows/build_docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index f3478b2..6edfb2f 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -39,6 +39,8 @@ jobs: test-code: uses: ./.github/workflows/test_package.yml + with: + tag: ${{ needs.get_image_tag.outputs.image }} build-docs: needs: [get_image_tag, test-code] From cd520e30dd35b3e426d9f3a308c8a15afdfb8e49 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:22:21 +0100 Subject: [PATCH 04/12] Add test-code on nightly and use stable tag for build-docs --- .github/workflows/build_docs.yml | 6 +++--- .github/workflows/test_package.yml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 6edfb2f..3d4ebd4 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -5,14 +5,14 @@ on: inputs: tag: description: "Tag of DOLFINx docker image" - default: "nightly" + default: "stable" required: true type: string workflow_dispatch: inputs: tag: description: "Tag of DOLFINx docker image" - default: "nightly" + default: "stable" required: true type: string pull_request: @@ -23,7 +23,7 @@ on: env: DEB_PYTHON_INSTALL_LAYOUT: deb_system - DEFAULT_TAG: nightly + DEFAULT_TAG: stable ARTIFACT_NAME: docs PUBLISH_DIR: ./_build/html PIP_NO_BINARY: h5py diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml index 84e2574..49df4b5 100644 --- a/.github/workflows/test_package.yml +++ b/.github/workflows/test_package.yml @@ -16,6 +16,11 @@ on: required: true type: string + pull_request: + branches: + - main + schedule: + - cron: "0 8 * * *" env: DEB_PYTHON_INSTALL_LAYOUT: deb_system From dc25b9110bf94694d16891001e5c3dac381ab9b9 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:25:56 +0100 Subject: [PATCH 05/12] Also run tests when pushing to the main branch --- .github/workflows/test_package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml index 49df4b5..42efe3e 100644 --- a/.github/workflows/test_package.yml +++ b/.github/workflows/test_package.yml @@ -17,8 +17,10 @@ on: type: string pull_request: - branches: - - main + branches: [main] + push: + branches: [main] + schedule: - cron: "0 8 * * *" From 8fc51b0a7660ad53804f9e0fea199cc3d871c8c3 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:52:24 +0100 Subject: [PATCH 06/12] Try making a matrix to test different dolfinx versions --- .github/workflows/build_docs.yml | 9 +- .github/workflows/deploy_pages.yml | 14 ++- .github/workflows/test_dolfinx_versions.yml | 32 ++++++ .github/workflows/test_package.yml | 108 -------------------- .github/workflows/test_workflow.yml | 61 +++++++++++ 5 files changed, 107 insertions(+), 117 deletions(-) create mode 100644 .github/workflows/test_dolfinx_versions.yml delete mode 100644 .github/workflows/test_package.yml create mode 100644 .github/workflows/test_workflow.yml diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 3d4ebd4..dc09aa1 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -43,7 +43,7 @@ jobs: tag: ${{ needs.get_image_tag.outputs.image }} build-docs: - needs: [get_image_tag, test-code] + needs: get_image_tag runs-on: ubuntu-latest container: ghcr.io/fenics/dolfinx/dolfinx:${{ needs.get_image_tag.outputs.image }} @@ -60,13 +60,6 @@ jobs: - name: Build docs run: jupyter book build . - - name: Download docs artifact - # docs artifact is uploaded by build-docs job - uses: actions/download-artifact@v7 - with: - name: code-coverage-report - path: "./_build/html/code-coverage-report" - - name: Upload documentation as artifact uses: actions/upload-artifact@v6 if: always() diff --git a/.github/workflows/deploy_pages.yml b/.github/workflows/deploy_pages.yml index 66817a5..b92f41b 100644 --- a/.github/workflows/deploy_pages.yml +++ b/.github/workflows/deploy_pages.yml @@ -22,8 +22,13 @@ jobs: with: tag: "stable" + test-code: + uses: ./.github/workflows/test_workflow.yml + with: + tag: "stable" + deploy: - needs: [build-docs] + needs: [build-docs, test-code] environment: name: github-pages @@ -39,6 +44,13 @@ jobs: name: docs path: "./public" + - name: Download docs artifact + # docs artifact is uploaded by build-docs job + uses: actions/download-artifact@v7 + with: + name: code-coverage-report-stable + path: "./public/code-coverage-report" + - name: Upload artifact uses: actions/upload-pages-artifact@v4 diff --git a/.github/workflows/test_dolfinx_versions.yml b/.github/workflows/test_dolfinx_versions.yml new file mode 100644 index 0000000..e7fe7b2 --- /dev/null +++ b/.github/workflows/test_dolfinx_versions.yml @@ -0,0 +1,32 @@ +# .github/workflows/test-matrix.yml +name: Test Matrix (All Versions) + +on: + push: + branches: [main] + pull_request: + +jobs: + # 1. Prerequisite jobs (Data creation) + create-datasets: + uses: ./.github/workflows/create_legacy_data.yml + with: + artifact_name: "legacy_mpich" + + create-legacy-datasets: + uses: ./.github/workflows/create_legacy_checkpoint.yml + with: + artifact_name: "legacy_checkpoint_mpich" + + # 2. The Matrix Job + run-tests: + needs: [create-datasets, create-legacy-datasets] + strategy: + fail-fast: false + matrix: + tag: ["nightly", "stable", "v0.9"] + + # Call the reusable workflow + uses: ./.github/workflows/test_workflow.yml + with: + dolfinx_tag: ${{ matrix.tag }} \ No newline at end of file diff --git a/.github/workflows/test_package.yml b/.github/workflows/test_package.yml deleted file mode 100644 index 42efe3e..0000000 --- a/.github/workflows/test_package.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Test package - -on: - workflow_call: - inputs: - tag: - description: "Tag of DOLFINx docker image" - default: "nightly" - required: true - type: string - workflow_dispatch: - inputs: - tag: - description: "Tag of DOLFINx docker image" - default: "nightly" - required: true - type: string - - pull_request: - branches: [main] - push: - branches: [main] - - schedule: - - cron: "0 8 * * *" - -env: - DEB_PYTHON_INSTALL_LAYOUT: deb_system - DEFAULT_TAG: nightly - PIP_NO_BINARY: h5py - -jobs: - get_image_tag: - runs-on: ubuntu-latest - outputs: - image: ${{ steps.docker_tag.outputs.image }} - steps: - - id: docker_tag - run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT - - check-formatting: - needs: get_image_tag - uses: ./.github/workflows/check_formatting.yml - with: - tag: ${{ needs.get_image_tag.outputs.image }} - - create-datasets: - uses: ./.github/workflows/create_legacy_data.yml - with: - artifact_name: "legacy_mpich" - - create-legacy-datasets: - uses: ./.github/workflows/create_legacy_checkpoint.yml - with: - artifact_name: "legacy_checkpoint_mpich" - - test-code: - runs-on: ubuntu-24.04 - needs: - [create-datasets, create-legacy-datasets, check-formatting, get_image_tag] - container: ghcr.io/fenics/dolfinx/dolfinx:${{ needs.get_image_tag.outputs.image }} - - steps: - - uses: actions/checkout@v6 - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Install build requirements - run: python3 -m pip install -r build-requirements.txt - - - name: Download legacy data - uses: actions/download-artifact@v7 - with: - name: legacy_mpich - path: ./legacy - - - name: Download legacy data - uses: actions/download-artifact@v7 - with: - name: legacy_checkpoint_mpich - path: ./legacy_checkpoint - - - name: Install package - run: | - HDF5_MPI=ON HDF5_PKGCONFIG_NAME="hdf5" python3 -m pip install h5py --no-build-isolation --no-binary=h5py - python3 -m pip install .[test] - - - name: Run tests - run: | - coverage run --rcfile=.coveragerc -m pytest -xvs ./tests/ - - - name: Run tests in parallel - run: | - mpirun -n 4 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/ - - - name: Combine coverage reports - run: | - coverage combine - coverage report -m - coverage html - - - name: Upload coverage report as artifact - uses: actions/upload-artifact@v6 - with: - name: code-coverage-report - path: htmlcov - if-no-files-found: error diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml new file mode 100644 index 0000000..0197cb4 --- /dev/null +++ b/.github/workflows/test_workflow.yml @@ -0,0 +1,61 @@ +name: Single test run + +on: + workflow_call: + inputs: + dolfinx_tag: + required: true + type: string + +jobs: + test-code: + runs-on: ubuntu-24.04 + # The container tag is now dynamic based on the input passed by the caller + container: ghcr.io/fenics/dolfinx/dolfinx:${{ inputs.dolfinx_tag }} + + steps: + - uses: actions/checkout@v6 + + - name: Update pip + run: python3 -m pip install --upgrade pip + + - name: Install build requirements + run: python3 -m pip install -r build-requirements.txt + + # Note: We assume the caller workflow has already uploaded these artifacts + - name: Download legacy data + uses: actions/download-artifact@v7 + with: + name: legacy_mpich + path: ./legacy + + - name: Download legacy data + uses: actions/download-artifact@v7 + with: + name: legacy_checkpoint_mpich + path: ./legacy_checkpoint + + - name: Install package + run: | + HDF5_MPI=ON HDF5_PKGCONFIG_NAME="hdf5" python3 -m pip install h5py --no-build-isolation --no-binary=h5py + python3 -m pip install .[test] + + - name: Run tests + run: coverage run --rcfile=.coveragerc -m pytest -xvs ./tests/ + + - name: Run tests in parallel + run: mpirun -n 4 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/ + + - name: Combine coverage reports + run: | + coverage combine + coverage report -m + coverage html + + # Use the tag in the artifact name so parallel runs don't overwrite each other + - name: Upload coverage report + uses: actions/upload-artifact@v6 + with: + name: code-coverage-report-${{ inputs.dolfinx_tag }} + path: htmlcov + if-no-files-found: error \ No newline at end of file From adff9d4751ccefd77e41da8bfe875fc2c524127d Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:54:27 +0100 Subject: [PATCH 07/12] Remove test-code from build docs --- .github/workflows/build_docs.yml | 5 ----- .github/workflows/test_dolfinx_versions.yml | 3 +-- .github/workflows/test_workflow.yml | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index dc09aa1..5680d27 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -37,11 +37,6 @@ jobs: - id: docker_tag run: echo "image=${{ inputs.tag || env.DEFAULT_TAG }}" >> $GITHUB_OUTPUT - test-code: - uses: ./.github/workflows/test_package.yml - with: - tag: ${{ needs.get_image_tag.outputs.image }} - build-docs: needs: get_image_tag runs-on: ubuntu-latest diff --git a/.github/workflows/test_dolfinx_versions.yml b/.github/workflows/test_dolfinx_versions.yml index e7fe7b2..8d4c055 100644 --- a/.github/workflows/test_dolfinx_versions.yml +++ b/.github/workflows/test_dolfinx_versions.yml @@ -1,5 +1,4 @@ -# .github/workflows/test-matrix.yml -name: Test Matrix (All Versions) +name: Test dolfinx versions on: push: diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index 0197cb4..aede807 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -1,4 +1,4 @@ -name: Single test run +name: Test on: workflow_call: From ebbeee5d177458f2edca5dc91d3529cdbd73a6dc Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:57:04 +0100 Subject: [PATCH 08/12] Add correct tag to v0.9 --- .github/workflows/test_dolfinx_versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_dolfinx_versions.yml b/.github/workflows/test_dolfinx_versions.yml index 8d4c055..0950d56 100644 --- a/.github/workflows/test_dolfinx_versions.yml +++ b/.github/workflows/test_dolfinx_versions.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - tag: ["nightly", "stable", "v0.9"] + tag: ["nightly", "stable", "v0.9.0"] # Call the reusable workflow uses: ./.github/workflows/test_workflow.yml From b173d0c1861070e07b14998675939898b44d4ae3 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 14:58:21 +0100 Subject: [PATCH 09/12] Better names --- .github/workflows/test_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index aede807..1b8ac4f 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -23,13 +23,13 @@ jobs: run: python3 -m pip install -r build-requirements.txt # Note: We assume the caller workflow has already uploaded these artifacts - - name: Download legacy data + - name: Download legacy mpich data uses: actions/download-artifact@v7 with: name: legacy_mpich path: ./legacy - - name: Download legacy data + - name: Download legacy checkpoint mpich data uses: actions/download-artifact@v7 with: name: legacy_checkpoint_mpich From 01c4b32982867b723023fab31a55e84d27a9e0f6 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 15:05:37 +0100 Subject: [PATCH 10/12] Do not test on dolfinx v0.9 --- .github/workflows/test_dolfinx_versions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_dolfinx_versions.yml b/.github/workflows/test_dolfinx_versions.yml index 0950d56..11f8050 100644 --- a/.github/workflows/test_dolfinx_versions.yml +++ b/.github/workflows/test_dolfinx_versions.yml @@ -23,7 +23,7 @@ jobs: strategy: fail-fast: false matrix: - tag: ["nightly", "stable", "v0.9.0"] + tag: ["nightly", "stable"] # Call the reusable workflow uses: ./.github/workflows/test_workflow.yml From 086b601dc314ddc58d549ace3ba181a443a0316b Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 15:11:36 +0100 Subject: [PATCH 11/12] Display adios2 version --- .github/workflows/test_workflow.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index 1b8ac4f..6bbba1e 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -40,6 +40,12 @@ jobs: HDF5_MPI=ON HDF5_PKGCONFIG_NAME="hdf5" python3 -m pip install h5py --no-build-isolation --no-binary=h5py python3 -m pip install .[test] + - name: Show adios2 version + run: python3 -c "import adios2; print(adios2.__version__)" + + - name: Show h5py version + run: python3 -c "import h5py; print(h5py.__version__)" + - name: Run tests run: coverage run --rcfile=.coveragerc -m pytest -xvs ./tests/ From 85de7e760fde042f1aa57957d1fd9c2820848b2d Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Fri, 13 Feb 2026 15:15:06 +0100 Subject: [PATCH 12/12] Show hdf5 version --- .github/workflows/test_workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test_workflow.yml b/.github/workflows/test_workflow.yml index 6bbba1e..7f0ee4e 100644 --- a/.github/workflows/test_workflow.yml +++ b/.github/workflows/test_workflow.yml @@ -46,6 +46,9 @@ jobs: - name: Show h5py version run: python3 -c "import h5py; print(h5py.__version__)" + - name: Show hdf5 version + run: python3 -c "import h5py; print(h5py.version.hdf5_version)" + - name: Run tests run: coverage run --rcfile=.coveragerc -m pytest -xvs ./tests/