-
Notifications
You must be signed in to change notification settings - Fork 122
/
.travis.yml
217 lines (203 loc) · 8.02 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
206
207
208
209
210
211
212
213
214
215
216
217
# Ubuntu 18.04
dist: bionic
sudo: required
language: cpp
cache:
ccache: true
timeout: 600
directories:
- $TRAVIS_BUILD_DIR/deps # cache Boost libraries
env:
global:
- CCACHE_DIR=$HOME/.ccache
- CCACHE_COMPRESS=1
- CCACHE_COMPRESSLEVEL=9
- CCACHE_MAXSIZE=500Mi
- CCACHE_CPP2=1
matrix:
allow_failures:
- name: osx clang BUILD=Debug
- name: osx clang BUILD=RelWithDebInfo
include:
# Configurations for developers' forks and after merging a pull request for percona/PerconaFT
# 1
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: BUILD=Debug
compiler: clang
os: osx
name: osx clang BUILD=Debug
# 2
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=10 BUILD=RelWithDebInfo
compiler: clang
# 3
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=9 BUILD=Debug
compiler: clang
# 4
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=8 BUILD=Debug
compiler: clang
# 5
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=7 BUILD=Debug
compiler: clang
# 6
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=6.0 BUILD=Debug
compiler: clang
# 7
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=5.0 BUILD=Debug
compiler: clang
# 8
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=4.0 BUILD=Debug
compiler: clang
# 9
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=9 BUILD=Debug
compiler: gcc
# 10
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=8 BUILD=Debug
compiler: gcc
# 11
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=7 BUILD=Debug
compiler: gcc
# 12
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=6 BUILD=Debug
compiler: gcc
# 13
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=5 BUILD=Debug
compiler: gcc
# 14
- if: repo != percona/PerconaFT OR repo = percona/PerconaFT AND type IN (push, cron)
env: VERSION=4.8 BUILD=Debug
compiler: gcc
# Configurations for a pull request and after merging for percona/PerconaFT
# 1
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: BUILD=RelWithDebInfo
compiler: clang
os: osx
name: osx clang BUILD=RelWithDebInfo
# 2
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=10 BUILD=Debug
compiler: clang
# 3
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=9 BUILD=RelWithDebInfo
compiler: clang
# 4
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=8 BUILD=RelWithDebInfo
compiler: clang
# 5
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=7 BUILD=RelWithDebInfo
compiler: clang
# 6
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=6.0 BUILD=RelWithDebInfo
compiler: clang
# 7
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=5.0 BUILD=RelWithDebInfo
compiler: clang
# 8
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=4.0 BUILD=RelWithDebInfo
compiler: clang
# 9
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=9 BUILD=RelWithDebInfo
compiler: gcc
# 10
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=8 BUILD=RelWithDebInfo
compiler: gcc
# 11
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=7 BUILD=RelWithDebInfo
compiler: gcc
# 12
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=6 BUILD=RelWithDebInfo
compiler: gcc
# 13
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=5 BUILD=RelWithDebInfo
compiler: gcc
# 14
- if: branch =~ fullci OR repo = percona/PerconaFT AND type IN (push, pull_request, cron)
env: VERSION=4.8 BUILD=RelWithDebInfo
compiler: gcc
script:
- INIT_TIME=$SECONDS;
- echo --- Configure required LLVM and Ubuntu Toolchain repositories;
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CC" == "clang" ]]; then
PACKAGES="llvm-$VERSION-dev $PACKAGES";
curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -;
if [[ "$CC-$VERSION" != "clang-4.0" ]]; then
echo "deb http://apt.llvm.org/$TRAVIS_DIST/ llvm-toolchain-$TRAVIS_DIST-$VERSION main" | sudo tee -a /etc/apt/sources.list > /dev/null;
fi;
fi;
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test";
fi;
- echo --- Update list of packages and download dependencies;
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
TIMEOUT_CMD=timeout;
CC=$CC-$VERSION;
CXX=$CXX-$VERSION;
if [[ "$CC" == "clang-$VERSION" ]]; then
PACKAGES="$CC $PACKAGES";
else
PACKAGES="$CXX $PACKAGES";
fi;
sudo -E apt-get -yq update >> ~/apt-get-update.log 2>&1;
sudo -E apt-get -yq --allow-unauthenticated --no-install-suggests --no-install-recommends install $PACKAGES cmake cmake-curses-gui bison libncurses5-dev libaio-dev libevent-dev || travis_terminate 1;
sudo ln -s $(which ccache) /usr/lib/ccache/$CC;
sudo ln -s $(which ccache) /usr/lib/ccache/$CXX || echo;
else
TIMEOUT_CMD=gtimeout;
brew update;
brew install ccache;
brew link ccache;
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi;
UPDATE_TIME=$(($SECONDS - $INIT_TIME));
echo --- Packages updated in $UPDATE_TIME seconds. Initialization time $INIT_TIME seconds.
- mkdir bin; cd bin;
- $CC -v
- $CXX -v
- ccache --version
- ccache --print-config;
ccache --zero-stats;
- echo --- Set cmake parameters;
CMAKE_OPT="
-DCMAKE_BUILD_TYPE=$BUILD
-DBUILD_TESTING=ON
-DUSE_VALGRIND=OFF
";
- echo --- Perform Debug or RelWithDebInfo compilation;
echo --- CMAKE_OPT=\"$CMAKE_OPT\";
echo --- ENV_VAR_CMAKE_OPT=\"$ENV_VAR_CMAKE_OPT\";
cmake .. $CMAKE_OPT $ENV_VAR_CMAKE_OPT;
- CMAKE_TIME=$(($SECONDS - $INIT_TIME - $UPDATE_TIME));
if [[ "$TRAVIS_REPO_SLUG" == "percona/PerconaFT" ]]; then
TIMEOUT_TIME=$((176 * 60 - $SECONDS));
else
TIMEOUT_TIME=$((46 * 60 - $SECONDS));
fi;
echo --- Timeout $TIMEOUT_TIME seconds. CMake took $CMAKE_TIME seconds. Packages updated in $UPDATE_TIME seconds. Initialization time $INIT_TIME seconds.;
$TIMEOUT_CMD $TIMEOUT_TIME make -j2;
if [[ "$?" == "0" ]]; then echo $TRAVIS_COMMIT > $CCACHE_DIR/last_commit.txt; else false; fi;
- ccache --show-stats;
BUILD_TIME=$(($SECONDS - $INIT_TIME - $UPDATE_TIME - $CMAKE_TIME));
echo --- Total time $SECONDS seconds. Build time $BUILD_TIME/$TIMEOUT_TIME seconds. CMake took $CMAKE_TIME seconds. Packages updated in $UPDATE_TIME seconds. Initialization time $INIT_TIME seconds.