forked from nanocurrency/nano-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-travis.sh
executable file
·51 lines (41 loc) · 935 Bytes
/
build-travis.sh
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
#!/bin/bash
qt_dir=${1}
src_dir=${2}
set -o errexit
set -o nounset
set -o xtrace
OS=`uname`
mkdir build
pushd build
if [[ ${ASAN_INT-0} -eq 1 ]]; then
SANITIZERS="-DRAIBLOCKS_ASAN_INT=ON"
elif [[ ${ASAN-0} -eq 1 ]]; then
SANITIZERS="-DRAIBLOCKS_ASAN=ON"
elif [[ ${TSAN-0} -eq 1 ]]; then
SANITIZERS="-DRAIBLOCKS_TSAN=ON"
else
SANITIZERS=""
fi
cmake \
-G'Unix Makefiles' \
-DACTIVE_NETWORK=rai_test_network \
-DRAIBLOCKS_TEST=ON \
-DRAIBLOCKS_GUI=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBOOST_ROOT=/usr/local \
-DQt5_DIR=${qt_dir} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
${SANITIZERS} \
..
if [[ "$OS" == 'Linux' ]]; then
cmake --build ${PWD} -- -j2
else
sudo cmake --build ${PWD} -- -j2
fi
popd
pushd load-tester
cargo build --release
popd
cp ./load-tester/target/release/raiblocks-load-tester ./build/load_test
./ci/test.sh ./build