diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:07:14 +0000 |
commit | a175314c3e5827eb193872241446f2f8f5c9d33c (patch) | |
tree | cd3d60ca99ae00829c52a6ca79150a5b6e62528b /.travis.compiler.sh | |
parent | Initial commit. (diff) | |
download | mariadb-10.5-upstream.tar.xz mariadb-10.5-upstream.zip |
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.travis.compiler.sh')
-rwxr-xr-x | .travis.compiler.sh | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/.travis.compiler.sh b/.travis.compiler.sh new file mode 100755 index 00000000..98d8197d --- /dev/null +++ b/.travis.compiler.sh @@ -0,0 +1,55 @@ +#!/bin/sh +set -v -x + +# 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 + CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_ARCHIVE=NO" +fi +if [[ ! "${MYSQL_TEST_SUITES}" =~ "rocksdb" ]]; then + CMAKE_OPT="${CMAKE_OPT} -DPLUGIN_ROCKSDB=NO" +fi +} + +if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then + 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 + if [[ "${CXX}" == 'clang++' ]]; then + if [[ "${CC_VERSION}" == '6' ]]; then + export CXX=${CXX}-${CC_VERSION}.0 + else + export CXX=${CXX}-${CC_VERSION} + fi + export CC=${CXX/++/} + # excess warnings about unused include path + export CFLAGS='-Wno-unused-command-line-argument' + export CXXFLAGS='-Wno-unused-command-line-argument' + elif [[ "${CXX}" == 'g++' ]]; then + export CXX=g++-${CC_VERSION} + export CC=gcc-${CC_VERSION} + fi + if [[ ${CC_VERSION} == 7 ]]; then + export WSREP_PROVIDER=/usr/lib/galera/libgalera_smm.so + MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep" + fi +fi + +if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then + TEST_CASE_TIMEOUT=20 + exclude_modules; + CMAKE_OPT="${CMAKE_OPT} -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl" + if which ccache ; then + CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" + fi +fi + +set +v +x |