-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (98 loc) · 2.92 KB
/
build-and-test.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
name: build-and-test
on:
workflow_dispatch:
pull_request:
branches:
- '**'
# Limit concurrent deployments to one per branch
concurrency:
group: build-and-test-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:off') }}
runs-on: ubuntu-22.04
env:
CHASTE_TEST_OUTPUT: ${{ github.workspace }}/chaste-test-dir
steps:
- name: checkout Chaste repository
uses: actions/checkout@v4
with:
repository: Chaste/Chaste
ref: develop
path: Chaste
submodules: recursive
- name: checkout PyChaste repository
uses: actions/checkout@v4
with:
path: Chaste/projects/PyChaste
submodules: recursive
- name: install Chaste dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
cmake \
cmake-curses-gui \
doxygen \
g++ \
git \
gnuplot \
graphviz \
hdf5-tools \
lcov \
libboost-serialization-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libfltk1.1 \
libhdf5-openmpi-dev \
libmetis-dev \
libopenmpi-dev \
libparmetis-dev \
libpetsc-real3.15-dbg \
libsundials-dev \
libvtk7-dev \
libxerces-c-dev \
mencoder \
paraview \
petsc-dev \
python3 \
python3-dev \
python3-pip \
python3-venv \
valgrind \
xsdcxx
- name: install PyChaste dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
castxml \
python3-matplotlib \
python3-notebook \
python3-numpy \
python3-petsc4py \
python3-pytest \
python3-six \
python3-vtk7 \
python3-xvfbwrapper \
xvfb
sudo python3 -m pip install --upgrade pip
sudo pip install pygccxml pyyaml
- name: make build and test directories
run: |
mkdir -p Chaste/build
mkdir -p ${CHASTE_TEST_OUTPUT}
- name: cmake configure
run: cmake -DCMAKE_BUILD_TYPE=Release ..
working-directory: Chaste/build
- name: build project_PyChaste
run: cmake --build . --parallel $(nproc) --target project_PyChaste
working-directory: Chaste/build
- name: build project_PyChaste_Python
run: cmake --build . --parallel $(nproc) --target project_PyChaste_Python
working-directory: Chaste/build
- name: install PyChaste
run: pip install --user .
working-directory: Chaste/build/projects/PyChaste/python
- name: run tests
run: xvfb-run --server-args="-screen 0 1024x768x24" ctest -j $(nproc) -L PyChaste --output-on-failure
working-directory: Chaste/build