-
-
Notifications
You must be signed in to change notification settings - Fork 41
85 lines (81 loc) · 3.2 KB
/
dolfinx-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This workflow will install Basix, FFCx, DOLFINx and run the DOLFINx unit tests.
name: DOLFINx integration
on:
pull_request:
branches:
- main
workflow_dispatch:
inputs:
dolfinx_ref:
description: "DOLFINx branch or tag"
default: "main"
type: string
basix_ref:
description: "Basix branch or tag"
default: "main"
type: string
ufl_ref:
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 UFL and Basix (default branches/tags)
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/basix.git
- name: Install UFL and Basix (specified branches/tags)
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_ref }}
python3 -m pip install --break-system-packages git+https://github.com/FEniCS/basix.git@${{ github.event.inputs.basix_ref }}
- name: Install FFCx
run: |
pip3 install --break-system-packages .
- name: Get DOLFINx source (default branch/tag)
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v4
with:
path: ./dolfinx
repository: FEniCS/dolfinx
ref: main
- name: Get DOLFINx source (specified branch/tag)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
path: ./dolfinx
repository: FEniCS/dolfinx
ref: ${{ github.event.inputs.dolfinx_ref }}
- 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 -v install --break-system-packages nanobind scikit-build-core[pyproject]
python3 -m pip -v install --break-system-packages --check-build-dependencies --no-build-isolation dolfinx/python/
- 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: python3 -m pytest -n auto dolfinx/python/test/unit
- name: Run DOLFINx Python demos
run: python3 -m pytest -n=2 -m serial dolfinx/python/demo/test.py