Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ jobs:
# This action sets the current path to the root of your github repo
- uses: actions/checkout@v7

- name: Update pip
run: python3 -m pip install --upgrade pip setuptools
- name: Update pip and extra deps
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install --no-binary=h5py h5py
python3 -m pip install . --group docs

- name: Install dependencies
run: python3 -m pip install --no-binary=h5py -e ".[docs]"
run: python3 -m pip install -e . --no-build-isolation

- name: Build docs
run: jupyter book build .
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/check_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ jobs:
steps:
- uses: actions/checkout@v7

- name: Update pip
run: python3 -m pip install --upgrade pip setuptools
- name: Update pip and install build deps
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install . --group dev --no-build-isolation

- name: Install code
run: python3 -m pip install .[dev]
run: python3 -m pip install . --no-build-isolation

- name: Check code formatting with ruff
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_dolfinx_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
# Call the reusable workflow
uses: ./.github/workflows/test_workflow.yml
with:
dolfinx_tag: ${{ matrix.tag }}
tag: ${{ matrix.tag }}
88 changes: 0 additions & 88 deletions .github/workflows/test_package_openmpi.yml

This file was deleted.

93 changes: 0 additions & 93 deletions .github/workflows/test_redhat.yml

This file was deleted.

75 changes: 68 additions & 7 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
name: Test
name: Test package

on:
workflow_call:
inputs:
dolfinx_tag:
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
env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system
DEFAULT_TAG: nightly
HDF5_MPI: "ON"
HDF5_INCLUDEDIR: "/usr/include/hdf5/openmpi"
H5PY_SETUP_REQUIRES: 0
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe
CC: mpicc
CXX: mpicxx

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

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 }}
container: ghcr.io/fenics/test-env:current
needs:
[get_image_tag]
env:
working-directory: ./src

steps:
- uses: actions/checkout@v7
Expand All @@ -20,7 +52,8 @@ jobs:
run: python3 -m pip install --upgrade pip

- name: Install build requirements
run: python3 -m pip install -r build-requirements.txt
run: python3 -m pip install --group build --no-build-isolation


# Note: We assume the caller workflow has already uploaded these artifacts
- name: Download legacy mpich data
Expand All @@ -35,10 +68,38 @@ jobs:
name: legacy_checkpoint_mpich
path: ./legacy_checkpoint

- name: Install DOLFINx (stable)
if: needs.get_image_tag.outputs.image == 'stable'
uses: jorgensd/actions/install-dolfinx@main
with:
adios2: default
petsc_arch: linux-gnu-real64-32
dolfinx: release
basix: release
ufl: release
ffcx: release
working-directory: ${{ env.working-directory}}

- name: Install DOLFINx (nightly)
if: needs.get_image_tag.outputs.image == 'nightly'
uses: jorgensd/actions/install-dolfinx@v0.4
with:
adios2: default
petsc_arch: linux-gnu-real64-32
working-directory: ${{ env.working-directory}}

- name: Configure HDF5 MPI Environment
run: |
# Evaluate architecture dynamically and write to GITHUB_ENV
ARCH_TRIPLET=$(gcc -print-multiarch)
echo "HDF5_LIBDIR=/usr/lib/${ARCH_TRIPLET}/hdf5/openmpi" >> $GITHUB_ENV

- 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]
python3 -m pip install "Cython>=3.0.11" "pkgconfig>=1.5.5"
python3 -m pip install h5py --no-binary=h5py --no-build-isolation
python3 -m pip install --group dev --group test
python3 -m pip install . --no-build-isolation

- name: Show adios2 version
run: python3 -c "import adios2; print(adios2.__version__)"
Expand All @@ -65,6 +126,6 @@ jobs:
- name: Upload coverage report
uses: actions/upload-artifact@v7
with:
name: code-coverage-report-${{ inputs.dolfinx_tag }}
name: code-coverage-report-${{ inputs.tag }}
path: htmlcov
if-no-files-found: error
5 changes: 0 additions & 5 deletions build-requirements.txt

This file was deleted.

3 changes: 2 additions & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Install the library with the optional `test` dependencies to ensure you have
packages like `pytest`, `coverage`, and `ipyparallel`

```bash
python3 -m pip install ".[test]"
python3 -m pip install . --group test --no-build-isolation
python3 -m pip install -e . --no-build-isolation
```

### Running Tests
Expand Down
Loading