-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathci
executable file
·33 lines (25 loc) · 886 Bytes
/
ci
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
#!/usr/bin/env bash
set -xe
if [[ -f /proc/cpuinfo ]]
then
core_number=$(cat /proc/cpuinfo | grep -c ^processor)
else
core_number=2
fi
# this section to be made smarter in the future
# will kinda get automatically smarter once reaverlib itself uses develop and master for stable
function install_package() {
local package=$1
local branch=$2
wget https://github.com/reaver-project/${package}/archive/${branch}.zip
unzip ${branch}.zip
cd ${package}-${branch}
make install # no sudo needed; to be executed in docker as sudo
cd ..
rm -rf ${package}-${branch} ${branch}.zip
}
install_package reaverlib master
install_package mayfly develop
make test -j${core_number} -l${core_number}
./tests/test -j ${core_number} -l 3 -r teamcity
CC=cc CXX=c++ LD=c++ ./build-multistage || echo "##teamcity[message text='Bootstrap failed.' status='ERROR']"