-
Notifications
You must be signed in to change notification settings - Fork 27
/
.travis.yml
110 lines (100 loc) · 2.57 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
language: cpp
os: linux
dist: xenial
sudo: required
cache:
directories:
- $HOME/deps
addons:
apt:
sources: &basic_sources
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main"
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main"
key_url: "http://llvm.org/apt/llvm-snapshot.gpg.key"
packages: &basic_deps
- libssl-dev
- yasm
- libgmp-dev
- libgflags-dev
- libsnappy-dev
- zlib1g-dev
- libbz2-dev
- autoconf
- libtool
- lcov
- libaio-dev
env:
global:
- ENABLE_COVERAGE=Off
- BUILD_TYPE=Debug
# matrix:
# include:
# - env:
# - STATIC_ANALYSIS=false
# - RUN_CHECKS=true
# - COMPILER=gcc
# - ENABLE_COVERAGE=On
# after_success:
# - ./ci/gen_coverage.sh # get the code coverage
# - ./ci/upload_report.sh # upload the report to coveralls
before_install:
- INSTALL_DIR=$HOME/deps
- CPATH=$CPATH:$INSTALL_DIR/include
- LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
- PATH=$INSTALL_DIR/bin:$HOME/installs/cmake/bin:$PATH
- echo $CPATH
- echo $LD_LIBRARY_PATH
- echo $PATH
install:
- bash ci/install_cmake.sh
- bash ci/install_crypto_tk_deps.sh
- bash ci/install_grpc.sh
- bash ci/install_rocksdb.sh
- gem install coveralls-lcov
matrix:
include:
- env:
- STATIC_ANALYSIS=false
- RUN_CHECKS=true
- COMPILER=gcc
- ENABLE_COVERAGE=On
compiler: gcc
addons:
apt:
sources: *basic_sources
packages:
- *basic_deps
after_success:
- ./ci/gen_coverage.sh # get the code coverage
- ./ci/upload_report.sh # upload the report to coveralls
- env:
- STATIC_ANALYSIS=true
- RUN_CHECKS=false
- CLANG_TIDY=clang-tidy-10
addons:
apt:
sources: *basic_sources
packages:
- *basic_deps
- cppcheck
- libclang-common-10-dev # to get the headers right
- clang-tidy-10
script:
- ./scripts/cppcheck.sh
- ./scripts/tidy.sh
- env:
- STATIC_ANALYSIS=false
- RUN_CHECKS=false
- CLANG_FORMAT=clang-format-10
addons:
apt:
sources: *basic_sources
packages:
- clang-format-10
install: # do not compile the dependencies
script:
- ./scripts/check_format.sh
script:
- ./ci/build.sh
- if [ "${RUN_CHECKS}" == "true" ]; then (cd build && ./test/check); fi