Skip to content

Commit 0b3a27c

Browse files
authored
Merge pull request #70 from Chaste/23-add-vtk-tests
#23 add vtk-test workflow
2 parents 27f9c30 + 6e34e3b commit 0b3a27c

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed

.github/test-vtk.yml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: test-vtk
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- "**"
8+
9+
jobs:
10+
test-conda:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
vtk-version: ["8.2", "9.2"]
17+
18+
defaults:
19+
run:
20+
shell: bash -el {0}
21+
22+
steps:
23+
- name: checkout chaste
24+
uses: actions/checkout@v4
25+
with:
26+
repository: Chaste/Chaste
27+
ref: develop
28+
path: Chaste
29+
submodules: recursive
30+
31+
- name: checkout pychaste
32+
uses: actions/checkout@v4
33+
with:
34+
path: Chaste/projects/PyChaste
35+
submodules: recursive
36+
37+
- name: install system dependencies
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y cmake g++ xvfb
41+
42+
- name: setup conda
43+
uses: conda-incubator/setup-miniconda@v3
44+
with:
45+
auto-update-conda: true
46+
use-mamba: true
47+
miniforge-variant: Mambaforge
48+
miniforge-version: latest
49+
channels: pychaste,conda-forge
50+
51+
- name: install pychaste conda dependencies
52+
run: |
53+
mamba install -n test \
54+
boost-cpp \
55+
hdf5="*=*mpi_mpich*" \
56+
metis \
57+
mpich \
58+
notebook \
59+
parmetis \
60+
petsc \
61+
petsc4py \
62+
six \
63+
sundials \
64+
vtk=${{ matrix.vtk-version }} \
65+
tbb-devel \
66+
xerces-c \
67+
xsd \
68+
xvfbwrapper \
69+
xorg-libxext
70+
71+
- name: make build directory
72+
run: |
73+
mkdir -p build
74+
75+
- name: configure pychaste
76+
run: |
77+
export PETSC_DIR=$CONDA_PREFIX
78+
export HDF5_ROOT=$CONDA_PREFIX
79+
80+
cmake \
81+
-DCMAKE_BUILD_TYPE=Release \
82+
-DPython3_EXECUTABLE=$(which python) \
83+
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib" \
84+
-DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
85+
-DCMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \
86+
-DBUILD_SHARED_LIBS=ON \
87+
-DBOOST_ROOT="${CONDA_PREFIX}" \
88+
-DHDF5_C_COMPILER_EXECUTABLE="${CONDA_PREFIX}/bin/h5pcc" \
89+
-DVTK_DIR=${CONDA_PREFIX} \
90+
-DXERCESC_INCLUDE="${CONDA_PREFIX}/include" \
91+
-DXERCESC_LIBRARY="${CONDA_PREFIX}/lib/libxerces-c.so" \
92+
-DXSD_EXECUTABLE="${CONDA_PREFIX}/bin/xsd" \
93+
../Chaste/
94+
working-directory: build
95+
96+
- name: build pychaste
97+
run: |
98+
cmake --build . --parallel $(nproc) --target project_PyChaste
99+
working-directory: build
100+
101+
- name: build pychaste python module
102+
run: |
103+
cmake --build . --parallel $(nproc) --target project_PyChaste_Python
104+
working-directory: build
105+
106+
- name: install pychaste
107+
run: |
108+
pip install .
109+
working-directory: build/projects/PyChaste/python
110+
111+
- name: run tests
112+
run: |
113+
xvfb-run \
114+
--server-args="-screen 0 1024x768x24" \
115+
ctest -j $(nproc) -L PyChaste --output-on-failure
116+
working-directory: build

0 commit comments

Comments
 (0)