-
Notifications
You must be signed in to change notification settings - Fork 47
108 lines (96 loc) · 3.28 KB
/
centos-ci.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
name: CentOS CI
on:
push:
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container:
image: centos:7
steps:
- name: Install dependencies
run: |
yum -y update
yum -y install centos-release-scl epel-release
yum -y install man wget environment-modules libXt-devel libXext-devel ninja-build make \
devtoolset-10-gcc* numactl-devel openmpi3-devel freeglut-devel \
scl-utils which xorg-x11-server-Xvfb fontconfig mesa-dri-drivers
yum -y install @development zlib-devel bzip2 bzip2-devel readline-devel sqlite \
sqlite-devel openssl-devel xz xz-devel libffi-devel findutils lapack-devel blas-devel
yum -y remove git*
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo-1.10-1.x86_64.rpm
yum -y install git
curl -L -O https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh
chmod +x cmake-3.19.3-Linux-x86_64.sh
./cmake-3.19.3-Linux-x86_64.sh --skip-license --prefix=/usr/local
- name: Start Xvfb
run: |
set -e
yum -y install xorg-x11-server-Xvfb
XVFBARGS=":99 -ac -screen 0 2560x1440x24"
/usr/bin/Xvfb $XVFBARGS >> /tmp/Xvfb.out 2>&1 &
disown -ar
sleep 3
- name: Set OSVERS
run: |
ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
VERSION=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
echo "OSVERS=$ID-$VERSION" >> $GITHUB_ENV
- name: Cache pyenv
uses: actions/cache@v2
id: pyenv-cache
with:
path: ~/.pyenv
key: ${{ env.OSVERS }}-pyenv-3.9.1
- name: Install pyenv dependency
if: steps.pyenv-cache.outputs.cache-hit != 'true'
run: |
if [ ! -f "$HOME/.pyenv/bin/pyenv" ]; then
curl https://pyenv.run | bash
fi
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.1
pyenv shell 3.9.1
- name: Checkout BioDynaMo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Third Party Packages
uses: actions/cache@v2
with:
path: build/third_party
key: ${{ env.OSVERS }}-third-party-${{ hashFiles('cmake/external/SHA256Digests.cmake') }}
- name: Build BioDynaMo
shell: bash
run: |
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
pyenv shell 3.9.1
. scl_source enable devtoolset-10 || true
. /etc/profile.d/modules.sh || true
module load mpi
cmake -G Ninja \
-Dparaview=ON \
-Dbenchmark=ON \
-Dlibgit2=ON \
-Dnuma=OFF \
-DCMAKE_BUILD_TYPE=Release \
-B build
cmake --build build --parallel --config Release
- name: Unit tests BioDynaMo
shell: bash
working-directory: build
run: |
. bin/thisbdm.sh
bdm config
export DISPLAY=:99.0
sleep 3
ninja run-unit-tests