Make it possible to read MeshTags/MeshFunction from DOLFIN-Legacy with h5py and adios2 backend #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| 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 |