forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
155 lines (145 loc) · 4.97 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
# Ubuntu 14.04
dist: trusty
sudo: required
language: cpp
cache:
ccache: true
timeout: 600
directories:
- $HOME/.ccache
env:
global:
- CCACHE_DIR=$HOME/.ccache
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=500Mi
- CCACHE_CPP2=1
- MAINTAINER_MODE=ON
- WITHOUT_TOKUDB=OFF
matrix:
include:
# 1
- env: COMMAND=clang-test
script:
- wget https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py
- chmod a+x clang-format-diff.py
- git diff -U0 --no-color HEAD^1 | ./clang-format-diff.py -p1 >_GIT_DIFF
- '[ ! -s _GIT_DIFF ] && echo The last git commit is clang-formatted || cat _GIT_DIFF'
# 2
- compiler: clang
os: osx
osx_image: xcode9.2
env: BUILD=RelWithDebInfo MAINTAINER_MODE=OFF WITHOUT_TOKUDB=ON
# 3
- compiler: clang
env: VERSION=4.0 BUILD=RelWithDebInfo
# 4
- compiler: clang
env: VERSION=5.0 BUILD=RelWithDebInfo
# 5
- compiler: clang
env: VERSION=5.0 BUILD=RelWithDebInfo INVERTED=ON
# 6
- compiler: gcc
env: VERSION=7 BUILD=RelWithDebInfo INVERTED=ON
# 7
- compiler: gcc
env: VERSION=7 BUILD=RelWithDebInfo
# 8
- compiler: gcc
env: VERSION=6 BUILD=RelWithDebInfo
# 9
- compiler: gcc
env: VERSION=5 BUILD=RelWithDebInfo
# 10
- compiler: gcc
env: VERSION=4.8 BUILD=RelWithDebInfo
# 11
- compiler: clang
os: osx
osx_image: xcode9.2
env: BUILD=Debug MAINTAINER_MODE=OFF WITHOUT_TOKUDB=ON
# 12
- compiler: clang
env: VERSION=4.0 BUILD=Debug
# 13
- compiler: clang
env: VERSION=5.0 BUILD=Debug
# 14
- compiler: clang
env: VERSION=5.0 BUILD=Debug INVERTED=ON
# 15
- compiler: gcc
env: VERSION=7 BUILD=Debug INVERTED=ON
# 16
- compiler: gcc
env: VERSION=7 BUILD=Debug
# 17
- compiler: gcc
env: VERSION=6 BUILD=Debug
# 18
- compiler: gcc
env: VERSION=5 BUILD=Debug
# 19
- compiler: gcc
env: VERSION=4.8 BUILD=Debug
script:
- JOB_NUMBER=$(echo $TRAVIS_JOB_NUMBER | sed -e 's:[0-9][0-9]*\.\(.*\):\1:');
echo -- JOB_NUMBER=$JOB_NUMBER PACKAGES=$PACKAGES TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_EVENT_TYPE=$TRAVIS_EVENT_TYPE TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST
- echo -- Perform all Travis jobs or only jobs that are included in ENV_VAR_JOB_NUMBERS list if it is defined;
JOB_NUMBERS="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24";
if [[ "$ENV_VAR_JOB_NUMBERS" != "" ]]; then
JOB_NUMBERS=$ENV_VAR_JOB_NUMBERS;
fi;
JOB_ARRAY=(${JOB_NUMBERS// / });
if [[ ! " ${JOB_ARRAY[@]} " =~ " ${JOB_NUMBER} " ]]; then
echo Finishing as job ${JOB_NUMBER} is not on a list = $JOB_NUMBERS;
travis_terminate 0;
fi;
- 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 -;
echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-$VERSION main" | sudo tee -a /etc/apt/sources.list > /dev/null;
fi;
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CC" == "gcc" ]]; 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
CC=$CC-$VERSION;
CXX=$CXX-$VERSION;
sudo -E apt-get -yq update >> ~/apt-get-update.log 2>&1;
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install $CXX $PACKAGES cmake cmake-curses-gui bison libncurses5-dev libaio-dev libssl-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
brew update;
brew install ccache;
brew link ccache;
export PATH="/usr/local/opt/ccache/libexec:$PATH";
fi
- mkdir bin; cd bin;
- $CC -v
- $CXX -v
- ccache --version
- ccache --print-config;
ccache --zero-stats;
- echo -- Perform Debug or RelWithDebInfo compilation;
if [[ "$INVERTED" == "ON" ]]; then
CMAKE_OPT="-DWITH_SSL=system -DWITH_ZLIB=bundled -DWITH_LIBEVENT=system -DWITH_EDITLINE=bundled $CMAKE_OPT";
fi;
echo -- BUILD=$BUILD MAINTAINER_MODE=$MAINTAINER_MODE WITHOUT_TOKUDB=$WITHOUT_TOKUDB CMAKE_OPT=\"$CMAKE_OPT\";
cmake ..
-DCMAKE_BUILD_TYPE=$BUILD
-DMYSQL_MAINTAINER_MODE=$MAINTAINER_MODE
-DBUILD_CONFIG=mysql_release
-DFEATURE_SET=community
-DENABLE_DTRACE=OFF
-DENABLE_DOWNLOADS=1
-DWITH_EXAMPLE_STORAGE_ENGINE=ON
-DWITH_QUERY_RESPONSE_TIME=ON
-DWITH_PAM=ON
-DWITHOUT_TOKUDB=$WITHOUT_TOKUDB
$CMAKE_OPT
- make -j2
- ccache --show-stats