-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathci
executable file
·61 lines (51 loc) · 1.96 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/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
apt-get update
apt-get install -y python3 cmake pkg-config libsodium-dev
# this is a stupid hack and ideally I'd just rename the current "llvm" images to "clang"
# and have "llvm" images on top of boost, that'd just build specific versions of llvm
# for this purpose here, if necessary
#
# the main problem I have with all this is that clang also depends on llvm, so I'd need
# to have images with *two* llvm installs present if I want to test with mixed clang
# versions for the compiler itself and for the use in test later, but not sure if I want that
#
# the problem with the following solution is that the version of llc is not fixed here,
# and can change at virtually any point, which'd be bad. I'll just keep printing it for
# the moment and hope for the best, and invent a better solution later
#
# (maybe the llvm images should just be an "addon" that checks whether llc exists and builds
# llvm if it doesn't? but I don't know how to track llc versions there in the build process.
# this will take a while to figure out. could just also drop gcc support, but that seems bad.)
if ! which llc
then
apt-get install -y llvm
fi
llc --version
mkdir build
pushd build
cmake ..
make -j${core_number} -l${core_number}
make ci-tests -j${core_number} -l${core_number}
popd
./tests-full/run --teamcity --vpr-path build