2017-03-17 02:50:21 +01:00
|
|
|
#!/bin/sh
|
2017-04-10 11:11:01 +02:00
|
|
|
set -v -x
|
2018-06-29 10:17:28 +02:00
|
|
|
|
|
|
|
# Exclude modules from build not directly affecting the current
|
|
|
|
# test suites found in $MYSQL_TEST_SUITES, to conserve job time
|
|
|
|
# as well as disk usage
|
|
|
|
|
|
|
|
function exclude_modules() {
|
|
|
|
# excludes for all
|
|
|
|
CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_TOKUDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_SPHINX=NO"
|
|
|
|
# exclude storage engines not being tested in current job
|
|
|
|
if [[ ! "${MYSQL_TEST_SUITES}" =~ "archive" ]]; then
|
2018-06-29 12:51:33 +02:00
|
|
|
CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_ARCHIVE=NO"
|
2018-06-29 10:17:28 +02:00
|
|
|
fi
|
|
|
|
if [[ ! "${MYSQL_TEST_SUITES}" =~ "rocksdb" ]]; then
|
2018-06-29 12:51:33 +02:00
|
|
|
CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_ROCKSDB=NO"
|
2018-06-29 10:17:28 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-04-10 11:11:01 +02:00
|
|
|
if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
|
2018-06-29 10:17:28 +02:00
|
|
|
TEST_CASE_TIMEOUT=2
|
|
|
|
exclude_modules;
|
|
|
|
if which ccache ; then
|
|
|
|
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
|
|
|
fi
|
2017-04-10 11:11:01 +02:00
|
|
|
if [[ "${CXX}" == 'clang++' ]]; then
|
2018-11-23 00:41:38 +01:00
|
|
|
if [[ "${CC_VERSION}" == '6' ]]; then
|
|
|
|
export CXX=${CXX}-${CC_VERSION}.0
|
|
|
|
else
|
|
|
|
export CXX=${CXX}-${CC_VERSION}
|
|
|
|
fi
|
|
|
|
export CC=${CXX/++/}
|
2018-11-23 01:46:52 +01:00
|
|
|
# excess warnings about unused include path
|
|
|
|
export CFLAGS='-Wno-unused-command-line-argument'
|
|
|
|
export CXXFLAGS='-Wno-unused-command-line-argument'
|
2017-04-10 11:11:01 +02:00
|
|
|
elif [[ "${CXX}" == 'g++' ]]; then
|
MDEV-16213: Improvements and adjustments to Travis config
Several improvements have been made so that builds run
faster and with fewer canceled jobs:
* Set ccache max size to 1GB. Was 512MB for Linux
(too low for MariaDB) and 5GB on macOS with defaults;
* Don't install libasan in Travis if not necessary.
Sicne ASAN is disabled for the time being, save
time/resources for other steps;
* Decrease number of parallel processes. To prevent
resource exhaustion leading to poor performance. According
to Travis docs, a max of 4 concurrent processses should be
run per job:
https://docs.travis-ci.com/user/common-build-problems/#My-build-script-is-killed-without-any-error
* Reconsider tests exec order and split huge main and rocksdb
test suites into their own job, decreasing the chance of going
over the Travis job execution limit and getting killed;
* Increase Travis testcase-timeout to 4 minutes. Occasionally
on Ubuntu target and frequently on macOS, many tests in main,
rpl, binlog suites take longer than 2 minutes, resulting in
many jobs failing, when in reality the failing tests didn't
get a chance to complete. From my testing, along with the other
speedups, i.e. increasing ccache size, a timeout of 4 minutes
should be Ok. Revert to 3 minutes of necessary.
* Build with GCC and Clang version 5,6 only.
* Rename GCC_VERSION to CC_VERSION for clarity. We are using
two compilers after all, GCC and Clang.
* Stop using somewhat obsolete Clang4 in Travis. Also, was the
reason for the failing test suites in MDEV-15430.
2018-05-29 09:26:01 +02:00
|
|
|
export CXX=g++-${CC_VERSION}
|
|
|
|
export CC=gcc-${CC_VERSION}
|
2017-04-10 11:11:01 +02:00
|
|
|
fi
|
2018-11-23 00:41:38 +01:00
|
|
|
if [[ ${CC_VERSION} == 7 ]]; then
|
2019-03-14 07:20:32 +01:00
|
|
|
export WSREP_PROVIDER=/usr/lib/galera/libgalera_smm.so
|
2018-06-29 10:17:28 +02:00
|
|
|
MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep"
|
2017-04-10 11:11:01 +02:00
|
|
|
fi
|
2018-06-29 10:17:28 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then
|
|
|
|
TEST_CASE_TIMEOUT=20
|
|
|
|
exclude_modules;
|
|
|
|
CMAKE_OPT="${CMAKE_OPT} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl"
|
2017-04-10 11:11:01 +02:00
|
|
|
if which ccache ; then
|
|
|
|
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
|
|
|
fi
|
2017-03-17 02:50:21 +01:00
|
|
|
fi
|
2017-04-10 11:11:01 +02:00
|
|
|
|
|
|
|
set +v +x
|