-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
206 lines (188 loc) · 5.28 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
language: cpp
sudo: false
compiler:
- clang
matrix:
include:
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=0 && COVERAGE=ON"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Debug && SHARED=1"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Release && SHARED=0"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5 && CONFIG=Release && SHARED=1"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=0"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=1"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=0 && SANITIZE=address"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=0 && SANITIZE=undefined"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=0 && SANITIZE=thread"
- os: linux
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
packages:
- clang-4.0
- libgtest-dev
- libboost1.55-all-dev
env:
- MATRIX_EVAL="CC=clang-4.0 && CXX=clang++-4.0 && CONFIG=Debug && SHARED=0"
cache:
- apt: true
- directories:
- lcov
- gtest
before_install:
# Set up CC/CXX variables
- eval "${MATRIX_EVAL}"
- export CMAKE=cmake
# workaround for not having lcov 1.13
- if [ ! -d "lcov/usr/local/bin/lcov" ]; then
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz;
tar -xzf lcov_1.13.orig.tar.gz;
mkdir lcov || true;
DESTDIR=$HOME/lcov make -C lcov-1.13/ install;
fi
- export LCOV=$HOME/lcov/usr/local/bin/lcov
# workaround for gtest not providing its own libraries (sigh)
- if [ ! -d "gtest/libgtest.a" ]; then
cd gtest;
CC=$CCOMPILE CXX=$CXXCOMPILE $CMAKE /usr/src/gtest -DCMAKE_CXX_FLAGS="-fPIC" && make;
cd ..;
fi
- export GTEST_ROOT=$PWD/gtest
# install coverage software
- if [ "$COVERAGE" == "ON" ]; then gem install coveralls-lcov; fi
# Install Crypto++, and fix the dependant-name bug
# - sudo apt-get install -y libcrypto++-dev
# - sudo sed -i 's/\tCheckSize/\tthis->CheckSize/g' /usr/include/cryptopp/secblock.h
# workaround for gtest not providing its own libraries (sigh)
before_script:
- mkdir build || true
- cd build
- $CMAKE -DCMAKE_BUILD_TYPE=$CONFIG -DBUILD_SHARED_LIBS=$SHARED -DPARADICE_SANITIZE=$SANITIZE -DPARADICE_COVERAGE=$COVERAGE ..
script:
- make -j2
- if [ "$COVERAGE" == "ON" ]; then
$LCOV --gcov-tool=gcov-5 --base-directory . --directory . --zerocounters -q;
fi
- make test
after_failure:
- cat Testing/Temporary/LastTest.log
after_success:
- if [ "$COVERAGE" == "ON" ]; then
$LCOV --gcov-tool=gcov-5 --base-directory . --directory . --capture --output-file coverage.info;
$LCOV --gcov-tool=gcov-5 --remove coverage.info '*/test/*' '/usr/*' --output-file coverage.info;
$LCOV --gcov-tool=gcov-5 --list coverage.info;
coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info;
fi
notifications:
email:
on_success: change # [always|never|change] # default: change
on_failure: change # [always|never|change] # default: always
slack:
rooms:
- kazdragon:E8B4Cs4p3TiVLqHAq8wYYTr3#ci