-
Notifications
You must be signed in to change notification settings - Fork 552
/
.travis.yml
81 lines (66 loc) · 3.71 KB
/
.travis.yml
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
80
language: cpp
compiler: gcc
env:
global:
- secure: "BTWd5JMj+Asg9e9Fg7jJ2i1MDpko0+jMN6WqsbKwa0nq5IcdcnKQp9JNdMr25VIpYS9/E8ys+ha0M00QZE/1O4xkX7tlSq/Ex0knqEpXZjLpwA+c3d+4Nuw+u/WZG+Q8YPSvJocFBrCNTpD3wTue0nR9gpw79c+iclQWHXeuziM="
- WORK_DIR=`pwd`
- DEPS_PREFIX=$WORK_DIR/thirdparty
- DEPS_CONFIG="--prefix=`pwd`/thirdparty --disable-shared --with-pic"
matrix:
- PROTOBUF_VERSION=2.6.0
before_install:
- echo $WORK_DIR
- echo $DEPS_PREFIX
- echo $DEPS_CONFIG
install:
- echo | sudo apt-add-repository ppa:boost-latest/ppa
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update
- sudo apt-get install -qq g++-4.8
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
- sudo update-alternatives --config g++
- sudo apt-get install libboost-dev
- wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-$PROTOBUF_VERSION.tar.gz
- tar xf protobuf-$PROTOBUF_VERSION.tar.gz
- ( cd protobuf-$PROTOBUF_VERSION && ./configure $DEPS_CONFIG && make -j4 && sudo make install)
- wget https://github.com/google/snappy/releases/download/1.1.4/snappy-1.1.4.tar.gz
- tar xf snappy-1.1.4.tar.gz
- ( cd snappy-1.1.4 && sh -x ./autogen.sh && ./configure $DEPS_CONFIG && make -j2 && sudo make install && sudo ldconfig )
- sudo apt-get install zlib1g-dev
- git clone https://github.com/baidu/sofa-pbrpc
- ( cd sofa-pbrpc && echo "PROTOBUF_DIR=$DEPS_PREFIX" >> depends.mk && echo "PREFIX=$DEPS_PREFIX" >> depends.mk && make -j4 && sudo make install);
- wget https://github.com/gflags/gflags/archive/v2.1.2.tar.gz
- tar xf v2.1.2.tar.gz
- ( cd gflags-2.1.2 && cmake -DCMAKE_INSTALL_PREFIX=$DEPS_PREFIX -DGFLAGS_NAMESPACE=google -DCMAKE_CXX_FLAGS=-fPIC && make -j4 && sudo make install )
- git clone -b cpp11 https://github.com/baidu/common
- ( cd common && sed -i '/^PREFIX=.*/d' config.mk && echo "PREFIX=$DEPS_PREFIX" >> config.mk && make -j4 && sudo make install)
- git clone https://github.com/yvxiang/gtest.git
- ( cd gtest && ./configure --disable-shared --with-pic && make -j4 && sudo cp -a lib/.libs/* /usr/lib && sudo cp -a include/gtest /usr/include )
- wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-beta.tar.gz
- tar zxvf libunwind-0.99-beta.tar.gz
- ( cd libunwind-0.99-beta && ./configure CFLAGS=-U_FORTIFY_SOURCE --with-pic && make -j4 && sudo make install )
- wget https://github.com/gperftools/gperftools/releases/download/gperftools-2.2.1/gperftools-2.2.1.tar.gz
- tar zxvf gperftools-2.2.1.tar.gz
- ( cd gperftools-2.2.1 && ./configure --with-pic && make -j4 && sudo make install && sudo ldconfig )
- git clone --depth=1 https://github.com/lylei/leveldb.git leveldb
- ( cd leveldb && echo "PREFIX=$DEPS_PREFIX" > config.mk && make -j4 && sudo make install)
before_script:
- echo 'SNAPPY_PATH=./thirdparty/snappy' > depends.mk
- echo 'PROTOBUF_PATH=./thirdparty/protobuf' >> depends.mk
- echo 'PROTOBUF_PATH=./thirdparty' >> depends.mk
- echo 'PBRPC_PATH=./thirdparty/bin/' >> depends.mk
- echo 'PROTOC=./thirdparty/bin/protoc' >> depends.mk
- echo 'PBRPC_PATH=./thirdparty/sofa-pbrpc/output' >> depends.mk
- echo 'TCMALLOC_PATH=./thirdparty' >> depends.mk
- echo 'COMMON_PATH=./common/output' >> depends.mk
- echo 'LEVELDB_PATH=./thirdparty' >> depends.mk
- echo 'STD_FLAG=c++11' >> depends.mk
script: make -j4 && make check && make test
addons:
coverity_scan:
project:
name: "bluebore/bfs"
notification_email: [email protected]
build_command_prepend: "make clean"
build_command: "make -j4"
branch_pattern: master