-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (63 loc) · 3.61 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
language: cpp
compiler: gcc
env:
global:
- secure: "BTWd5JMj+Asg9e9Fg7jJ2i1MDpko0+jMN6WqsbKwa0nq5IcdcnKQp9JNdMr25VIpYS9/E8ys+ha0M00QZE/1O4xkX7tlSq/Ex0knqEpXZjLpwA+c3d+4Nuw+u/WZG+Q8YPSvJocFBrCNTpD3wTue0nR9gpw79c+iclQWHXeuziM="
matrix:
- PROTOBUF_VERSION=2.6.0
install:
- sudo pip install --user cpp-coveralls
- 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 lcov
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.8 20
- sudo update-alternatives --config g++
- sudo update-alternatives --config gcov
- 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 && make -j4 && sudo make install)
- git clone https://github.com/google/snappy
- ( cd snappy && sh ./autogen.sh && ./configure && make -j2 && sudo make install && sudo ldconfig )
- sudo apt-get install zlib1g-dev
- git clone https://github.com/baidu/sofa-pbrpc ./thirdparty/sofa-pbrpc
- ( cd thirdparty/sofa-pbrpc && make -j4 && 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 -DGFLAGS_NAMESPACE=google && make -j4 && sudo make install )
- git clone -b cpp11 https://github.com/baidu/common
- ( cd common && make -j4 && 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=../thirdparty" > config.mk && make -j4 && make install)
before_script:
- export WORK_DIR=`pwd`
- echo $WORK_DIR
- echo "WORK_PATH=$WORK_DIR" > depends.mk
- echo "SNAPPY_PATH=$WORK_DIR/thirdparty/snappy" >> depends.mk
- echo "PROTOBUF_PATH=$WORK_DIR/thirdparty/protobuf" >> depends.mk
- echo "PROTOC=protoc" >> depends.mk
- echo "PBRPC_PATH=$WORK_DIR/thirdparty/sofa-pbrpc/output" >> depends.mk
- echo "TCMALLOC_PATH=$WORK_DIR/thirdparty" >> depends.mk
- echo "COMMON_PATH=$WORK_DIR/common/output" >> depends.mk
- echo "LEVELDB_PATH=$WORK_DIR/thirdparty" >> 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
after_script:
- COVERALLS_REPO_TOKEN=TnLIOj8lpAgN6CjpeGSDpXsu5IF5Bmluo find . -name *.gc* | xargs rm -f && make clean && make -j4 && make check && sudo ~/.local/bin/cpp-coveralls -e src/chunkserver/test -e src/nameserver/test -e thirdparty/ -e thirdsrc/ -e ut/ -e src/proto --gcov-options '\-lpr'