Commit eecce3d7 authored by Daniel Black's avatar Daniel Black Committed by Sergey Vojtovich

Travis: Test more suites, latest OSX

Remove clang-3.8 which doesn't have a repository on apt.llvm.org any
more.

For OSX, xcode8.3 is explicitly specified.

/usr/local/Cellar is used as a cache repository to save brew install
time on OSX (and /usr/local was too big).

Debian autobake.sh is moved to a matrix include.

Other branches of the matrix build test other test suites.
An Ubuntu galera is downloaded and used in the test suite.

TYPE=RelWithDebInfo used with the test to provide backtraces with line
numbers when crashes occur.

Build of PLUGIN_AWS_KEY_MANAGEMENT enabled in build.

Code supporting TYPE=Debug and -DWITH_ASAN=ON included by not enabled
due to large numbers of errors.

Running more tests in parallel (6) as container based builds seem to
support them. The test case timeout has been set to 2 minutes as large
stalls will put test cases over 50 minute interval.

ccache enabled where possible. Linux clang builds don't use them as the
minimum CMake version isn't there.
parent c7319cf3
#!/bin/sh #!/bin/sh
if [[ "${TRAVIS_OS_NAME}" == 'linux' && "${CXX}" == 'clang++' ]]; then set -v -x
case ${GCC_VERSION} in if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
4.8) MYSQL_BUILD_CXX=clang++-3.8;; if [[ "${CXX}" == 'clang++' ]]; then
5) MYSQL_BUILD_CXX=clang++-3.9;; CMAKE_OPT="-DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON"
6) MYSQL_BUILD_CXX=clang++-4.0;; #CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
esac if which ccache ; then
export MYSQL_BUILD_CXX MYSQL_BUILD_CC=${MYSQL_BUILD_CXX/++/} MYSQL_COMPILER_LAUNCHER=ccache CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
elif [[ "${TRAVIS_OS_NAME}" == 'linux' && "${CXX}" == 'g++' ]]; then fi
export MYSQL_BUILD_CXX=g++-${GCC_VERSION}; case ${GCC_VERSION} in
export MYSQL_BUILD_CC=gcc-${GCC_VERSION} 5) CXX=clang++-3.9 ;;
6) CXX=clang++-4.0 ;;
esac
export CXX CC=${CXX/++/}
elif [[ "${CXX}" == 'g++' ]]; then
CMAKE_OPT=""
export CXX=g++-${GCC_VERSION}
export CC=gcc-${GCC_VERSION}
fi
if [[ ${GCC_VERSION} == 6 ]]; then
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/percona-xtradb-cluster-galera-2.x/percona-xtradb-cluster-galera-2.x_165-0ubuntu1_amd64.deb ;
ar vx percona-xtradb-cluster-galera-2.x_165-0ubuntu1_amd64.deb
tar -xJvf data.tar.xz
export WSREP_PROVIDER=$PWD/usr/lib/libgalera_smm.so
MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep"
#elif [[ ${GCC_VERSION} != 5 ]]; then
#CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
fi
else
# osx_image based tests
CMAKE_OPT="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl"
#CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
if which ccache ; then
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_MROONGA_STORAGE_ENGINE=ON"
if [[ "${TYPE}" == "Debug" ]]; then
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON"
fi
fi fi
# main.mysqlhotcopy_myisam consitently failed in travis containers # main.mysqlhotcopy_myisam consitently failed in travis containers
# https://travis-ci.org/grooverdan/mariadb-server/builds/217661580 # https://travis-ci.org/grooverdan/mariadb-server/builds/217661580
echo 'main.mysqlhotcopy_myisam : unstable in containers' | tee -a debian/unstable-tests.amd64 echo 'main.mysqlhotcopy_myisam : unstable in containers' >> ${TRAVIS_BUILD_DIR}/mysql-test/unstable-tests
echo 'archive.mysqlhotcopy_archive : unstable in containers' >> ${TRAVIS_BUILD_DIR}/mysql-test/unstable-tests
set +v +x
...@@ -10,6 +10,8 @@ git: ...@@ -10,6 +10,8 @@ git:
language: cpp language: cpp
os: os:
- linux - linux
- osx
osx_image: xcode8.3
compiler: compiler:
- gcc - gcc
- clang - clang
...@@ -18,48 +20,37 @@ cache: ...@@ -18,48 +20,37 @@ cache:
apt: true apt: true
ccache: true ccache: true
directories: directories:
- /usr/local - /usr/local/Cellar
env: env:
matrix: matrix:
- GCC_VERSION=4.8 # - GCC_VERSION=4.8 TYPE=Debug MYSQL_TEST_SUITES=rpl
- GCC_VERSION=5 # - GCC_VERSION=5 TYPE=Debug MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- GCC_VERSION=6 # - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
# - GCC_VERSION=6 TYPE=Debug MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
- GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
- GCC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main,archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,percona,perfschema,plugins,multi_source,roles
matrix: matrix:
allowed_failures: exclude:
- os: osx - os: osx
env: compiler: gcc
- GCC_VERSION=4.8
- GCC_VERSION=5
- GCC_VERSION=6
compiler:
- gcc
- clang
include: include:
- os: osx - os: linux
before_install: compiler: gcc
- brew update
- brew install homebrew/boneyard/judy gnutls lz4 lzo xz snappy ccache
# Below fixed by: https://github.com/MariaDB/server/pull/347
- sed -i -e 's:/usr/bin/::g' cmake/libutils.cmake
script: script:
- ccache --version - ${CC} --version ; ${CXX} --version
- cmake . # Just for disabling hotcopy tests for now
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl - source .travis.compiler.sh
-DCMAKE_C_COMPILER_LAUNCHER=/usr/local/bin/ccache # https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
-DCMAKE_CXX_COMPILER_LAUNCHER=/usr/local/bin/ccache # in trusty containers
-DCMAKE_BUILD_TYPE=Debug - export MTR_MEM=/tmp
-DWITH_SSL=system -DWITH_ZLIB=system - env DEB_BUILD_OPTIONS="parallel=6" debian/autobake-deb.sh;
-DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
- make -j 4
- cd mysql-test
- ./mtr --force --parallel=4 --testcase-timeout=2
--suite=main,innodb
--skip-rpl
--skip-test-list=unstable-tests
- ccache --show-stats - ccache --show-stats
# Matrix include for coverity
# - env: # - env:
# - GCC_VERSION=6 # - GCC_VERSION=6
# addon: # addon:
...@@ -77,8 +68,7 @@ matrix: ...@@ -77,8 +68,7 @@ matrix:
# build_command_prepend: # build_command_prepend:
# - source .travis.compiler.sh # - source .travis.compiler.sh
# - ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version # - ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version
# - cmake . {MYSQL_BUILD_CXX:+-DCMAKE_CXX_COMPILER=$${MYSQL_BUILD_CXX} # - cmake .
# {MYSQL_BUILD_CC:+-DCMAKE_C_COMPILER=$${MYSQL_BUILD_CC}
# -DCMAKE_BUILD_TYPE=Debug # -DCMAKE_BUILD_TYPE=Debug
# -DWITH_SSL=system -DWITH_ZLIB=system # -DWITH_SSL=system -DWITH_ZLIB=system
# -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON # -DWITHOUT_TOKUDB_STORAGE_ENGINE=ON -DWITHOUT_MROONGA_STORAGE_ENGINE=ON
...@@ -103,12 +93,11 @@ addons: ...@@ -103,12 +93,11 @@ addons:
- g++-5 - g++-5
- gcc-6 - gcc-6
- g++-6 - g++-6
- clang-3.8
- llvm-3.8-dev
- clang-3.9 - clang-3.9
- llvm-3.9-dev - llvm-3.9-dev
- clang-4.0 - clang-4.0
- llvm-4.0-dev - llvm-4.0-dev
- libasan0
- bison - bison
- chrpath - chrpath
- cmake - cmake
...@@ -118,6 +107,7 @@ addons: ...@@ -118,6 +107,7 @@ addons:
- gdb - gdb
- libaio-dev - libaio-dev
- libboost-dev - libboost-dev
- libcurl3-dev
- libjudy-dev - libjudy-dev
- libncurses5-dev - libncurses5-dev
- libpam0g-dev - libpam0g-dev
...@@ -142,19 +132,31 @@ addons: ...@@ -142,19 +132,31 @@ addons:
# libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882 # libsystemd-daemon-dev # https://github.com/travis-ci/apt-package-whitelist/issues/3882
before_install:
- if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
brew update;
brew install gnutls lz4 lzo xz snappy ccache jemalloc curl ossp-uuid pcre;
brew link ccache;
fi
script: script:
# mroonga just generates too many warnings with clang and travis stops the job - ccache --version
# tokudb has fatal warnings # Clang:
- if [[ "${TRAVIS_OS_NAME}" == 'linux' && "${CXX}" == 'clang++' ]]; then # mroonga just generates too many warnings with clang and travis stops the job
rm -rf "${TRAVIS_BUILD_DIR}"/storage/{mroonga,tokudb}; # tokudb has fatal warnings
fi
- source .travis.compiler.sh - source .travis.compiler.sh
- ${MYSQL_BUILD_CC} --version ; ${MYSQL_BUILD_CXX} --version - cmake .
- cd "${TRAVIS_BUILD_DIR}" -DCMAKE_BUILD_TYPE=${TYPE}
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable ${CMAKE_OPT}
# in trusty containers -DWITH_SSL=system -DWITH_ZLIB=system -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=ON
- export MTR_MEM=/tmp - make -j 6
- env DEB_BUILD_OPTIONS="parallel=3" debian/autobake-deb.sh; - cd mysql-test
# With ASAN --thread-stack=400K to account for overhead
# Test timeout needs to be 10(minutes) or less due to travis out timeout
- ./mtr --force --max-test-fail=20 --parallel=6 --testcase-timeout=2
--suite=${MYSQL_TEST_SUITES}
--skip-test-list=unstable-tests
--skip-test=binlog.binlog_unsafe
- ccache --show-stats - ccache --show-stats
notifications: notifications:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment