-
Notifications
You must be signed in to change notification settings - Fork 167
/
.travis.yml
94 lines (85 loc) · 2.14 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
dist: focal
language: cpp
os: linux
compiler: clang
addons:
apt:
packages:
- clang-format-10
- g++-9
- libgflags-dev
- liblz4-dev
- libsnappy-dev
- libzstd-dev
- lcov
- zlib1g
stages:
- format
- test
env:
- BUILD_TYPE="Release"
- SANITIZER="ASAN"
- SANITIZER="TSAN"
- SANITIZER="UBSAN"
# For GCC build, we also report code coverage to codecov.
matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode12.2
env:
- SANITIZER="ASAN"
- os: linux
compiler:
env:
- COMPILER=gcc9
- os: linux
arch: arm64
env:
- SANITIZER="ASAN"
- stage: format
os: linux
compiler:
env:
- FORMATTER=ON
install:
# Don't do package update because Travis homebrew aren't cached.
- if [ "${TRAVIS_OS_NAME}" == osx ]; then
to_install=( "gflags" "zstd" "lz4" "snappy" "xz" );
brew list --formula > tmp;
for ins in ${to_install[*]}; do
grep -q "$ins" tmp;
if [ $? -ne 0 ]; then
brew install "$ins";
fi
done
fi
- export CTEST_OUTPUT_ON_FAILURE=1
- if [ "${COMPILER}" == gcc9 ]; then
CC=gcc-9;
CXX=g++-9;
export COVERAGE_OPT="-DCODE_COVERAGE=ON";
fi
- if [ ! -z "${BUILD_TYPE}" ]; then
export BUILD_OPT="-DCMAKE_BUILD_TYPE=${BUILD_TYPE}";
else
export BUILD_OPT="-DCMAKE_BUILD_TYPE=Debug";
fi
- if [ ! -z "${SANITIZER}" ]; then
export SANITIZER_OPT="-DWITH_${SANITIZER}=ON";
export TOOLS_OPT="-DWITH_TITAN_TOOLS=OFF";
fi
- export COMPRESSION_OPT="-DWITH_SNAPPY=ON -DWITH_LZ4=ON -DWITH_ZLIB=ON -DWITH_ZSTD=ON"
script:
- if [ -z "${FORMATTER}" ]; then
bash scripts/travis-make.sh;
else
bash scripts/travis-format.sh;
fi
after_success:
- if [ "${COMPILER}" == gcc9 ]; then
lcov --gcov-tool gcov-7 --directory . --capture --output-file coverage.info;
lcov --remove coverage.info '/usr/*' --output-file coverage.info;
lcov --list coverage.info;
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports";
fi