-
-
Notifications
You must be signed in to change notification settings - Fork 172
/
config.yml
157 lines (135 loc) · 4.33 KB
/
config.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: 2.1
install-python-components: &install-python-components
name: Install FEniCS Python components
command: |
git clone https://github.com/FEniCS/basix.git --branch main --single-branch
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build-dir -S ./basix/cpp
cmake --build build-dir --parallel 3
cmake --install build-dir
pip3 install ./basix/python
pip3 install git+https://github.com/FEniCS/ufl.git
pip3 install git+https://github.com/FEniCS/ffcx.git@sarah/replace-parameters-options
flake8-python-code: &flake8-python-code
name: Flake8 checks on Python code
command: |
cd python/
python3 -m flake8 dolfinx
python3 -m flake8 demo
python3 -m flake8 test
configure-cpp: &configure-cpp
name: Configure (C++)
command: mkdir -p build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer ../cpp/
build-install-cpp: &build-install-cpp
name: Build and install (C++)
command: cd build && ninja -j3 install
unit-tests-cpp: &unit-tests-cpp
name: Build and run C++ unit tests (serial and MPI)
command: |
cd build/test/
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer .
ninja -j3
ctest --output-on-failure -R unittests
mpirun -np 3 ctest --output-on-failure -R unittests
regression-tests-cpp: ®ression-tests-cpp
name: Build and run C++ regressions tests (serial)
command: |
cd build/demo
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer .
ninja -j3
ctest -j3 -R demo -R serial
regression-tests-cpp-mpi: ®ression-tests-cpp-mpi
name: Run C++ regression tests (MPI)
command: |
cd build/demo
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer .
ninja -j3
ctest --verbose -R demo -R mpi_3
build-python-interface: &build-python-interface
name: Build Python/pybind11 interface
command: |
cd python
pip3 -v install --global-option build --global-option --debug . --user
demos-python: &demos-python
name: Run demos (Python, serial)
command: |
mkdir -p ~/junit
cd python/demo
python3 -m pytest -n=4 -v -m serial --durations=10 --junitxml=~/junit/demo-results.xml test.py
demos-python-mpi: &demos-python-mpi
name: Run demos (Python, MPI)
command: |
cd python/demo
python3 -m pytest -n=2 -v -m mpi test.py --num-proc=3
set-jit-defaults: &set-jit-defaults
name: Set default DOLFINx JIT options
command: |
mkdir -p ~/.config/dolfinx
echo '{ "cffi_extra_compile_args" : ["-g0", "-O0" ] }' > ~/.config/dolfinx/dolfinx_jit_options.json
unit-tests-python: &unit-tests-python
name: Run unit tests (Python, serial)
command: |
mkdir -p ~/junit
cd python/test/unit
python3 -m pytest -n=4 --durations=50 --junitxml=~/junit/test-results.xml .
unit-tests-python-mpi: &unit-tests-python-mpi
name: Run unit tests (Python, MPI)
command: |
cd python/test/unit
mpirun -np 3 python3 -m pytest .
jobs:
build-real:
docker:
- image: fenicsproject/test-env:nightly-mpich
environment:
DEBIAN_FRONTEND: "noninteractive"
PETSC_ARCH: "linux-gnu-real-32"
steps:
- checkout
- run: *install-python-components
- run: *flake8-python-code
- run: *configure-cpp
- run: *build-install-cpp
- run: *unit-tests-cpp
- run: *regression-tests-cpp
- run: *regression-tests-cpp-mpi
- run: *build-python-interface
- run: *demos-python
- run: *demos-python-mpi
- run: *set-jit-defaults
- run: *unit-tests-python
- run: *unit-tests-python-mpi
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit
build-complex:
docker:
- image: fenicsproject/test-env:nightly-mpich
environment:
DEBIAN_FRONTEND: "noninteractive"
PETSC_ARCH: "linux-gnu-complex-32"
steps:
- checkout
- run: *install-python-components
- run: *flake8-python-code
- run: *configure-cpp
- run: *build-install-cpp
- run: *unit-tests-cpp
- run: *regression-tests-cpp
- run: *regression-tests-cpp-mpi
- run: *build-python-interface
- run: *demos-python
- run: *demos-python-mpi
- run: *set-jit-defaults
- run: *unit-tests-python
- run: *unit-tests-python-mpi
- store_test_results:
path: ~/junit
- store_artifacts:
path: ~/junit
workflows:
version: 2
build:
jobs:
- build-real
- build-complex