Add dependabot #627
Workflow file for this run
This file contains 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: DOLFINx integration | |
# This workflow will install Basix, FFCx, DOLFINx and run the DOLFINx | |
# unit tests. | |
on: | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
dolfinx_branch: | |
description: "DOLFINx branch or tag" | |
default: "main" | |
type: string | |
ffcx_branch: | |
description: "FFCx branch or tag" | |
default: "main" | |
type: string | |
ufl_branch: | |
description: "UFL branch or tag" | |
default: "main" | |
type: string | |
jobs: | |
build: | |
name: Run DOLFINx tests | |
runs-on: ubuntu-latest | |
container: ghcr.io/fenics/test-env:current-openmpi | |
env: | |
PETSC_ARCH: linux-gnu-complex64-32 | |
OMPI_ALLOW_RUN_AS_ROOT: 1 | |
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Basix | |
run: | | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build-dir -S ./cpp | |
cmake --build build-dir | |
cmake --install build-dir | |
python3 -m pip install --break-system-packages ./python | |
- name: Install FEniCS Python components | |
if: github.event_name != 'workflow_dispatch' | |
run: | | |
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ufl.git | |
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ffcx.git | |
- name: Install FEniCS Python components | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_branch }} | |
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/ffcx.git@${{ github.event.inputs.ffcx_branch }} | |
- name: Get DOLFINx | |
if: github.event_name != 'workflow_dispatch' | |
uses: actions/checkout@v4 | |
with: | |
path: ./dolfinx | |
repository: FEniCS/dolfinx | |
ref: main | |
- name: Get DOLFINx | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v4 | |
with: | |
path: ./dolfinx | |
repository: FEniCS/dolfinx | |
ref: ${{ github.event.inputs.dolfinx_branch }} | |
- name: Install DOLFINx (C++) | |
run: | | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx/cpp/ | |
cmake --build build | |
cmake --install build | |
- name: Install DOLFINx (Python) | |
run: | | |
python3 -m pip install --break-system-packages -r dolfinx/python/build-requirements.txt # TO REMOVE | |
python3 -m pip -v install --break-system-packages --check-build-dependencies --no-build-isolation dolfinx/python/ | |
- name: Run mypy checks | |
run: | | |
python3 -m pip install --break-system-packages mypy | |
cd dolfinx/python | |
python3 -m mypy dolfinx | |
- name: Build DOLFINx C++ unit tests | |
run: | | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S dolfinx/cpp/test/ | |
cmake --build build/test | |
- name: Run DOLFINx C++ unit tests | |
run: | | |
cd build/test | |
ctest -V --output-on-failure -R unittests | |
- name: Install Python demo/test dependencies | |
run: python3 -m pip install --break-system-packages matplotlib numba pyamg pytest pytest-xdist scipy | |
- name: Run DOLFINx Python unit tests | |
run: | | |
cd dolfinx | |
python3 -m pytest -n auto python/test/unit | |
- name: Run DOLFINx Python demos | |
run: | | |
cd dolfinx/ | |
python3 -m pytest -n auto -m serial --durations=10 python/demo/test.py |