-
-
Notifications
You must be signed in to change notification settings - Fork 185
90 lines (77 loc) · 3.05 KB
/
redhat.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
name: Red Hat clone
on:
pull_request:
branches:
- main
push:
branches:
- "main"
tags:
- "v*"
merge_group:
branches:
- main
workflow_dispatch:
jobs:
fenicsx-refs:
uses: ./.github/workflows/fenicsx-refs.yml
build:
runs-on: ubuntu-latest
needs: fenicsx-refs
container: fenicsproject/test-env:current-redhat
name: Rocky build and test
steps:
- uses: actions/checkout@v4
- name: Install Python build dependencies
run: |
python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel
- name: Install FEniCS Python components
run: |
python3 -m pip install git+https://github.com/fenics/ufl.git@${{ needs.fenicsx-refs.outputs.ufl_ref }}
python3 -m pip install git+https://github.com/fenics/basix.git@${{ needs.fenicsx-refs.outputs.basix_ref }}
python3 -m pip install git+https://github.com/fenics/ffcx.git@${{ needs.fenicsx-refs.outputs.ffcx_ref }}
- name: Configure C++
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build -S cpp/
- name: Build and install C++ library
run: |
cmake --build build
cmake --install build
- name: Build C++ unit tests
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/test/ -S cpp/test/
cmake --build build/test
- name: Run C++ unit tests (serial)
run: |
cd build/test
ctest -V --output-on-failure -R unittests
- name: Run C++ unit tests (MPI)
run: |
cd build/test
mpiexec -np 2 ctest -V --output-on-failure -R unittests
- name: Build and run C++ regression tests (serial and MPI (np=2))
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Developer -B build/demo/ -S cpp/demo/
cmake --build build/demo
cd build/demo
ctest -V -R demo -R serial
ctest -V -R demo -R mpi_2
- name: Install Python dependencies
run: |
- name: Build Python interface (editable install)
run: |
python3 -m pip install --upgrade -r python/build-requirements.txt
python3 -m pip install --check-build-dependencies --no-build-isolation --config-settings=cmake.build-type=Debug --config-settings=build-dir="build" -e 'python/[test]'
- name: Set default DOLFINx JIT options
run: |
mkdir -p ~/.config/dolfinx
echo '{ "cffi_extra_compile_args": ["-g0", "-O0" ] }' > ~/.config/dolfinx/dolfinx_jit_options.json
- name: Run demos (Python, serial)
run: |
python3 -m pip install pytest-xdist
python3 -m pytest -n auto -m serial --durations=10 python/demo/test.py
- name: Run demos (Python, MPI (np=2))
run: python3 -m pytest -m mpi --num-proc=2 python/demo/test.py
- name: Run Python unit tests (serial)
run: python3 -m pytest -n auto -m "not adios2" --durations=50 python/test/unit/
- name: Run Python unit tests (MPI, np=2)
run: mpirun -np 2 python3 -m pytest -m "not adios2" python/test/unit/