-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathci
executable file
·38 lines (29 loc) · 1019 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
33
34
35
36
37
#!/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
# also test if compiles when installed as the system version
# not sure if rerunning tests again in here makes much sense, so not doing that for now
# might revisit this decision later
make install
make test -j${core_number} -l${core_number}