-
Notifications
You must be signed in to change notification settings - Fork 133
/
.travis.yml
127 lines (114 loc) · 3.82 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
language: cpp
before_install:
- if [[ ${COVERITY_SCAN} == "1" ]]; then echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- ; fi
install:
- if [[ ${COVERAGE} == "1" ]]; then
gem install specific_install ;
gem specific_install https://github.com/mrgreywater/coveralls-lcov fix-record-reading ;
export CXXFLAGS="--coverage -fno-omit-frame-pointer -fno-default-inline -fno-inline -fno-exceptions -fno-unwind-tables" ;
fi
before_script:
- eval "${MATRIX_EVAL}"
# download ccache from mason (to avoid slow homebrew install)
- curl -sL https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/ccache/3.3.4.tar.gz | sudo tar --gunzip --extract --strip-components=1 --directory=/usr/local
- ( mkdir -p build && cd build ; cmake .. -DCMAKE_BUILD_TYPE=${BUILDTYPE} -DEARCUT_WARNING_IS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER="/usr/local/bin/ccache" )
- if [[ -n $COVERITY_SCAN_TOKEN && ${COVERITY_SCAN} == "1" ]] ; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true ; fi
script:
- cd ${TRAVIS_BUILD_DIR}/build
- make -j2
- ./tests
- echo -e "travis_fold:start:COVERALLS folding starts"
- if [[ -n $COVERALLS_REPO_TOKEN && ${COVERAGE} == "1" ]]; then
lcov -v && gcov -v ;
lcov --gcov-tool /usr/bin/gcov-7 --compat-libtool --directory . --base-directory ../include/mapbox --no-external --capture --rc lcov_branch_coverage=1 --output-file coverage.info ;
lcov --list coverage.info ;
coveralls-lcov --repo-token ${COVERALLS_REPO_TOKEN} coverage.info ;
fi
- echo -e "travis_fold:end:COVERALLS folding ends"
- ./bench
addons:
apt:
packages: &shared_linux_packages
- xorg-dev
- libgl1-mesa-dev
env:
global:
- COVERITY_SCAN_PROJECT_NAME="${TRAVIS_REPO_SLUG}"
- COVERITY_SCAN_BRANCH_PATTERN="master"
- COVERITY_SCAN_NOTIFICATION_EMAIL="[email protected]"
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="cov-configure --comptype g++ --compiler g++-7 --template && cd build"
- COVERITY_SCAN_BUILD_COMMAND="make -j2"
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- CCACHE_DIR=${HOME}/.ccache
cache:
directories:
- ${HOME}/.ccache
matrix:
fast_finish: true
include:
# clang5 debug
- os: linux
env:
- BUILDTYPE=Debug
- MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
compiler: clang
dist: xenial
addons:
apt:
packages:
- *shared_linux_packages
- clang-5.0
# clang3.8 release
- os: linux
env:
- BUILDTYPE=Release
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- *shared_linux_packages
- clang-3.8
# gcc7 debug with coverage
- os: linux
env:
- BUILDTYPE=Debug
- COVERAGE=1
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *shared_linux_packages
- g++-7
- lcov
# gcc7 release with coverity
- os: linux
env:
- BUILDTYPE=Release
- COVERITY_SCAN=1
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- *shared_linux_packages
- g++-7
# osx gcc
- os: osx
osx_image: xcode8
env: BUILDTYPE=Release
compiler: gcc
# osx clang
- os: osx
osx_image: xcode8
env: BUILDTYPE=Release
compiler: clang