-
-
Notifications
You must be signed in to change notification settings - Fork 33
104 lines (93 loc) · 3.26 KB
/
dolfin-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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: DOLFINx integration
# This workflow will install Basix, FFCx, DOLFINx and run the DOLFINx
# unit tests.
on:
pull_request:
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-22.04
container: fenicsproject/test-env:nightly-openmpi
env:
PETSC_ARCH: linux-gnu-complex-32
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_rmaps_base_oversubscribe: 1
OMPI_MCA_plm: isolated
OMPI_MCA_btl_vader_single_copy_mechanism: none
OMPI_MCA_mpi_yield_when_idle: 1
OMPI_MCA_hwloc_base_binding_policy: none
steps:
- uses: actions/checkout@v3
- 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 ./python
- name: Install FEniCS Python components
if: github.event_name != 'workflow_dispatch'
run: |
python3 -m pip install git+https://github.com/FEniCS/ufl.git
python3 -m pip install git+https://github.com/FEniCS/ffcx.git@mscroggs/make_quadrature
- name: Install FEniCS Python components
if: github.event_name == 'workflow_dispatch'
run: |
python3 -m pip install git+https://github.com/FEniCS/ufl.git@${{ github.event.inputs.ufl_branch }}
python3 -m pip install git+https://github.com/FEniCS/ffcx.git@${{ github.event.inputs.ffcx_branch }}
- name: Get DOLFINx
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v3
with:
path: ./dolfinx
repository: FEniCS/dolfinx
ref: mscroggs/make_quadrature
- name: Get DOLFINx
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v3
with:
path: ./dolfinx
repository: FEniCS/dolfinx
ref: ${{ github.event.inputs.dolfinx_branch }}
- name: Install DOLFINx
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S dolfinx/cpp/
cmake --build build
cmake --install build
python3 -m pip -v install --global-option build --global-option --debug dolfinx/python/
- name: Run mypy checks
run: |
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 build/test/
cmake --build build/test
- name: Run DOLFINx C++ unit tests
run: |
cd build/test
ctest -V --output-on-failure -R unittests
- 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