-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (118 loc) · 3.5 KB
/
test-vtk.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
name: test-vtk
on:
workflow_dispatch:
pull_request:
branches:
- "**"
jobs:
test-conda:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
vtk-version: ["7.1", "8.2", "9.2"]
steps:
- name: checkout chaste
uses: actions/checkout@v4
with:
repository: Chaste/Chaste
ref: develop
path: Chaste
submodules: recursive
- name: checkout pychaste
uses: actions/checkout@v4
with:
path: Chaste/projects/PyChaste
submodules: recursive
- name: install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ xvfb
- name: setup conda environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: latest
generate-run-shell: false
init-shell: bash
condarc: |
channels:
- conda-forge
- pychaste
environment-name: test-env
create-args: >-
boost-cpp
fftw
hdf5=[build=*mpi_mpich*]
matplotlib
metis
mpich
notebook
numpy
parmetis
petsc<3.19
petsc4py<3.19
pip
setuptools
six
sundials<7.0
tbb-devel
vtk=${{ matrix.vtk-version }}
wheel
xerces-c
xsd
xvfbwrapper
xorg-libxext
cache-environment: true
post-cleanup: 'all'
- name: fix cmake paths
run: |
find $CONDA_PREFIX \
-type f \
-name '*.cmake' \
-exec sed -i.bak 's|/usr/lib64/libXext.so|libXext.so|g' {} \;
shell: bash -el {0}
- name: make build directory
run: |
mkdir -p build
- name: configure pychaste
run: |
export PETSC_DIR=$CONDA_PREFIX
export HDF5_ROOT=$CONDA_PREFIX
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DPython3_EXECUTABLE=$(which python3) \
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib" \
-DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
-DCMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \
-DBUILD_SHARED_LIBS=ON \
-DBOOST_ROOT="${CONDA_PREFIX}" \
-DHDF5_C_COMPILER_EXECUTABLE="${CONDA_PREFIX}/bin/h5pcc" \
-DVTK_DIR=${CONDA_PREFIX} \
-DXERCESC_INCLUDE="${CONDA_PREFIX}/include" \
-DXERCESC_LIBRARY="${CONDA_PREFIX}/lib/libxerces-c.so" \
-DXSD_EXECUTABLE="${CONDA_PREFIX}/bin/xsd" \
../Chaste/
working-directory: build
shell: bash -el {0}
- name: build pychaste
run: |
cmake --build . --parallel $(nproc) --target project_PyChaste
working-directory: build
shell: bash -el {0}
- name: build pychaste python module
run: |
cmake --build . --parallel $(nproc) --target project_PyChaste_Python
working-directory: build
shell: bash -el {0}
- name: install pychaste
run: |
pip install .
working-directory: build/projects/PyChaste/python
shell: bash -el {0}
- name: run tests
run: |
xvfb-run \
--server-args="-screen 0 1024x768x24" \
ctest -j $(nproc) -L PyChaste --output-on-failure
working-directory: build
shell: bash -el {0}