forked from jl2922/hps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
executable file
·79 lines (73 loc) · 2.37 KB
/
ci.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
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
#!/bin/bash
set -x
export TOOLS_DIR=$TRAVIS_BUILD_DIR/tools
echo $TOOLS_DIR
# Install Google Test.
echo "Downloading Google Test"
wget -O release-1.8.0.tar.gz https://github.com/google/googletest/archive/release-1.8.0.tar.gz
tar xzf release-1.8.0.tar.gz
rm release-1.8.0.tar.gz
mv googletest-release-1.8.0 gtest
echo "Completed"
# Install or Load Protocol Buffers.
if [ -f "$TOOLS_DIR/protobuf/bin/protoc" ]; then
echo "Found cached Protocol Buffers"
else
echo "Downloading Protocol Buffers"
mkdir -p downloads
cd downloads
wget -O protobuf-cpp-3.5.1.tar.gz https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-cpp-3.5.1.tar.gz
tar xzf protobuf-cpp-3.5.1.tar.gz
echo "Configuring and building Protocol Buffers"
cd protobuf-3.5.1
mkdir -p $TOOLS_DIR/protobuf
./configure --prefix=$TOOLS_DIR/protobuf CC=$C_COMPILER CXX=$CXX_COMPILER
make -j 8
make install
echo "Completed"
cd ../../
fi
export PATH=$TOOLS_DIR/protobuf/bin:$PATH
export LD_LIBRARY_PATH=$TOOLS_DIR/protobuf/lib:$LD_LIBRARY_PATH
# Install or Load CapnProto.
if [ -f "$TOOLS_DIR/capnproto/bin/capnp" ]; then
echo "Found cached CapnProto"
else
echo "Downloading CapnProto"
mkdir -p downloads
cd downloads
wget -O capnproto-c++-0.6.1.tar.gz https://capnproto.org/capnproto-c++-0.6.1.tar.gz
tar xzf capnproto-c++-0.6.1.tar.gz
echo "Configuring and building CapnProto"
cd capnproto-c++-0.6.1
mkdir -p $TOOLS_DIR/capnproto
./configure --prefix=$TOOLS_DIR/capnproto CC=$C_COMPILER CXX=$CXX_COMPILER
make -j 8
make install
echo "Completed"
cd ../../
fi
export PATH=$TOOLS_DIR/capnproto/bin:$PATH
export LD_LIBRARY_PATH=$TOOLS_DIR/capnproto/lib:$LD_LIBRARY_PATH
# Install or Load Boost.
if [ -f "$TOOLS_DIR/boost/lib/libboost_serialization.so" ] ; then
echo "Found cached Boost"
else
echo "Downloading Boost"
mkdir -p downloads
cd downloads
wget -O boost_1_66_0.tar.bz2 https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.bz2
tar xjf boost_1_66_0.tar.bz2
echo "Configuring and building Boost"
cd boost_1_66_0
mkdir -p $TOOLS_DIR/boost
./bootstrap.sh
echo 'libraries = --with-serialization ;' >> project-config.jam
echo $BOOST_USE >> project-config.jam
./b2 -j8 --prefix=$TOOLS_DIR/boost install
echo "Completed"
cd ../../
fi
export PATH=$TOOLS_DIR/boost/bin:$PATH
export LD_LIBRARY_PATH=$TOOLS_DIR/boost/lib:$LD_LIBRARY_PATH
make test_all -j