Skip to content

Commit eb04ee5

Browse files
grooverdansvoj
authored andcommitted
Travis: llvm, additional packages and container
Additionally use clang as a compiler, versions 3.8, 3.9 and 4.0 Additionally use gcc/g++-7 Add additional packages used by build now that they are whitelisted. - libsnappy-dev - innodb compression - liblzma-dev - innodb compression - libzmq-dev - used my Mgoonga - libdistro-info-perl - used by autobake-debian Change to a container build as they tend to have more ram Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
1 parent d235782 commit eb04ee5

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

.travis.compiler.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
if [[ "${TRAVIS_OS_NAME}" == 'linux' && "${CXX}" == 'clang++' ]]; then
3+
case ${GCC_VERSION} in
4+
4.8) MYSQL_BUILD_CXX=clang++-3.8;;
5+
5) MYSQL_BUILD_CXX=clang++-3.9;;
6+
6) MYSQL_BUILD_CXX=clang++-4.0;;
7+
esac
8+
export MYSQL_BUILD_CXX MYSQL_BUILD_CC=${MYSQL_BUILD_CXX/++/}
9+
elif [[ "${TRAVIS_OS_NAME}" == 'linux' && "${CXX}" == 'g++' ]]; then
10+
export MYSQL_BUILD_CXX=g++-${GCC_VERSION};
11+
export MYSQL_BUILD_CC=gcc-${GCC_VERSION}
12+
fi

.travis.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# vim ft=yaml
22
# travis-ci.org definition
33

4-
# non-container builds don't have enough RAM to reliably compile
5-
sudo: required
4+
sudo: false
65
dist: trusty
76

87
language: cpp
8+
os:
9+
- linux
910
compiler:
1011
- gcc
12+
- clang
1113
cache:
1214
- apt
1315
- ccache
@@ -17,21 +19,25 @@ env:
1719
- GCC_VERSION=4.8
1820
- GCC_VERSION=5
1921
- GCC_VERSION=6
22+
2023
addons:
2124
apt:
2225
sources:
2326
- ubuntu-toolchain-r-test
24-
# below requires https://github.com/travis-ci/apt-source-whitelist/pull/309
25-
# - llvm-toolchain-trusty-3.8
26-
# - llvm-toolchain-trusty-3.9
27-
# llvm urls awaiting fix
28-
# https://github.com/travis-ci/apt-source-whitelist/pull/288
29-
# https://github.com/travis-ci/apt-source-whitelist/pull/309
27+
- llvm-toolchain-trusty
28+
- llvm-toolchain-trusty-3.9
29+
- llvm-toolchain-trusty-4.0
3030
packages: # make sure these match debian/control contents
3131
- gcc-5
3232
- g++-5
3333
- gcc-6
3434
- g++-6
35+
- clang-3.8
36+
- llvm-3.8-dev
37+
- clang-3.9
38+
- llvm-3.9-dev
39+
- clang-4.0
40+
- llvm-4.0-dev
3541
- bison
3642
- chrpath
3743
- cmake
@@ -57,18 +63,23 @@ addons:
5763
- zlib1g-dev
5864
- libcrack2-dev
5965
- libjemalloc-dev
66+
- libsnappy-dev
67+
- liblzma-dev
68+
- libzmq-dev
69+
- libdistro-info-perl
6070
- devscripts # implicit for any build on Ubuntu
6171

62-
# libsnappy-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3880
63-
# liblzma-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3879
64-
# libzmq-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3881
6572
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
6673

6774
script:
68-
- export MYSQL_BUILD_CC=/usr/bin/gcc-${GCC_VERSION} MYSQL_BUILD_CXX=/usr/bin/g++-${GCC_VERSION}
75+
- source .travis.compiler.sh
6976
- ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version
7077
- cd "${TRAVIS_BUILD_DIR}"
78+
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
79+
# in trusty containers
80+
- export MTR_MEM=/tmp
7181
- env DEB_BUILD_OPTIONS="parallel=3" debian/autobake-deb.sh;
82+
- ccache --show-stats
7283

7384
notifications:
7485
irc:

0 commit comments

Comments
 (0)