forked from baidu/braft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (25 loc) · 1.16 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
language: cpp
sudo: required
compiler:
- clang
- gcc
env:
- PURPOSE=compile
- PURPOSE=unittest
- PURPOSE=compile-with-bazel
before_install:
- wget --no-clobber https://github.com/bazelbuild/bazel/releases/download/0.25.2/bazel_0.25.2-linux-x86_64.deb
- sudo dpkg -i bazel_0.25.2-linux-x86_64.deb
install:
- sudo apt-get install -qq realpath libgflags-dev libprotobuf-dev libprotoc-dev protobuf-compiler libleveldb-dev libgoogle-perftools-dev
- sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo env "PATH=$PATH" cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
- sudo apt-get install -y gdb
- if [[ "$PURPOSE" != "compile-with-bazel" ]]; then git clone https://github.com/brpc/brpc.git && mkdir -p brpc/bld && cd brpc/bld && cmake .. && make -j4 && sudo make install && cd - ; fi
before_script:
- ulimit -c unlimited -S
script:
- if [[ "$PURPOSE" == "compile-with-bazel" ]]; then bazel build -c opt --copt -DHAVE_ZLIB=1 //... ; fi
- sh build_in_travis_ci.sh
after_failure:
- COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1)
- if [[ -f "$COREFILE" ]]; then gdb -c "$COREFILE" example -ex "thread apply all bt" -ex "set pagination 0" -batch; fi