Commit 5cdc70b8 authored by Teodor Mircea Ionita's avatar Teodor Mircea Ionita Committed by Vicențiu-Marian Ciorbaru

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.
parent 724a5105
...@@ -7,10 +7,6 @@ if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then ...@@ -7,10 +7,6 @@ if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
if which ccache ; then if which ccache ; then
CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" CMAKE_OPT="${CMAKE_OPT} -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
fi fi
case ${GCC_VERSION} in
5) CXX=clang++-4.0 ;;
6) CXX=clang++-5.0 ;;
esac
export CXX CC=${CXX/++/} export CXX CC=${CXX/++/}
elif [[ "${CXX}" == 'g++' ]]; then elif [[ "${CXX}" == 'g++' ]]; then
CMAKE_OPT="" CMAKE_OPT=""
...@@ -18,16 +14,16 @@ if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then ...@@ -18,16 +14,16 @@ if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=TRUE" CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_TOKUDB_STORAGE_ENGINE=TRUE"
CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_MROONGA_STORAGE_ENGINE=TRUE" CMAKE_OPT="${CMAKE_OPT} -DWITHOUT_MROONGA_STORAGE_ENGINE=TRUE"
fi fi
export CXX=g++-${GCC_VERSION} export CXX=g++-${CC_VERSION}
export CC=gcc-${GCC_VERSION} export CC=gcc-${CC_VERSION}
fi fi
if [[ ${GCC_VERSION} == 6 ]]; then if [[ ${CC_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 ; 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 ar vx percona-xtradb-cluster-galera-2.x_165-0ubuntu1_amd64.deb
tar -xJvf data.tar.xz tar -xJvf data.tar.xz
export WSREP_PROVIDER=$PWD/usr/lib/libgalera_smm.so export WSREP_PROVIDER=$PWD/usr/lib/libgalera_smm.so
MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep" MYSQL_TEST_SUITES="${MYSQL_TEST_SUITES},wsrep"
#elif [[ ${GCC_VERSION} != 5 ]]; then #elif [[ ${CC_VERSION} != 5 ]]; then
#CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON" #CMAKE_OPT="${CMAKE_OPT} -DWITH_ASAN=ON"
fi fi
else else
......
...@@ -18,16 +18,18 @@ compiler: ...@@ -18,16 +18,18 @@ compiler:
cache: cache:
apt: true apt: true
ccache: true # Does not currently work for clang builds: https://github.com/travis-ci/travis-ci/issues/6201 ccache: true
directories: directories:
- /usr/local/Cellar # Fails do to permission error: https://github.com/travis-ci/travis-ci/issues/8092 - /usr/local/Cellar # Fails do to permission error: https://github.com/travis-ci/travis-ci/issues/8092
env: env:
matrix: matrix:
- GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl - CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
- 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 - CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=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 - CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
- GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles - CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb
- CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
matrix: matrix:
exclude: exclude:
...@@ -81,39 +83,45 @@ matrix: ...@@ -81,39 +83,45 @@ matrix:
# https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable # https://github.com/travis-ci/travis-ci/issues/7062 - /run/shm isn't writable or executable
# in trusty containers # in trusty containers
- export MTR_MEM=/tmp - export MTR_MEM=/tmp
- env DEB_BUILD_OPTIONS="parallel=6" debian/autobake-deb.sh; - env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
- ccache --show-stats - ccache --show-stats
# Until OSX becomes a bit more stable: MDEV-12435 # Until OSX becomes a bit more stable: MDEV-12435
allow_failures: allow_failures:
- os: osx - os: osx
compiler: clang compiler: clang
env: GCC_VERSION=4.8 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl env: CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rpl
- os: osx - os: osx
compiler: clang compiler: clang
env: 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 env: CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=main
- os: osx - os: osx
compiler: clang compiler: clang
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption,rocksdb env: CC_VERSION=5 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=archive,optimizer_unfixed_bugs,parts,sys_vars,unit,vcol,innodb,innodb_gis,innodb_zip,innodb_fts
- os: osx - os: osx
compiler: clang compiler: clang
env: GCC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=binlog,binlog_encryption,encryption
- os: osx
compiler: clang
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=rocksdb
- os: osx
compiler: clang
env: CC_VERSION=6 TYPE=RelWithDebInfo MYSQL_TEST_SUITES=csv,federated,funcs_1,funcs_2,gcol,handler,heap,json,maria,perfschema,plugins,multi_source,roles
addons: addons:
apt: apt:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main' - sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main'
packages: # make sure these include all compilers and all build dependencies (see list above) packages: # make sure these include all compilers and all build dependencies (see list above)
- gcc-5 - gcc-5
- g++-5 - g++-5
- gcc-6 - gcc-6
- g++-6 - g++-6
- clang-4.0
- llvm-4.0-dev
- clang-5.0 - clang-5.0
- llvm-5.0-dev - llvm-5.0-dev
- libasan0 - clang-6.0
- llvm-6.0-dev
# - libasan0
- bison - bison
- chrpath - chrpath
- cmake - cmake
...@@ -154,19 +162,22 @@ before_install: ...@@ -154,19 +162,22 @@ before_install:
script: script:
- ccache --version - ccache --version
# Clang: - ccache --show-stats
# mroonga just generates too many warnings with clang and travis stops the job - ccache --max-size=1000M
# tokudb has fatal warnings # following modules are disabled after sourcing .travis.compiler.sh:
# clang disabled: mroonga just generates too many warnings with clang and travis stops the job
# cland disabled: tokudb has fatal warnings
# gcc/rpl: tokudb and mroonga
- source .travis.compiler.sh - source .travis.compiler.sh
- cmake . - cmake .
-DCMAKE_BUILD_TYPE=${TYPE} -DCMAKE_BUILD_TYPE=${TYPE}
${CMAKE_OPT} ${CMAKE_OPT}
-DWITH_SSL=system -DWITH_ZLIB=system -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=ON -DWITH_SSL=system -DWITH_ZLIB=system -DPLUGIN_AWS_KEY_MANAGEMENT=DYNAMIC -DAWS_SDK_EXTERNAL_PROJECT=ON
- make -j 6 - make -j 4
- cd mysql-test - cd mysql-test
# With ASAN --thread-stack=400K to account for overhead # With ASAN --thread-stack=400K to account for overhead
# Test timeout needs to be 10(minutes) or less due to travis out timeout # Test timeout needs to be 10 (minutes) or less due to travis job timeout
- ./mtr --force --max-test-fail=20 --parallel=6 --testcase-timeout=2 - ./mtr --force --max-test-fail=20 --parallel=4 --testcase-timeout=4
--suite=${MYSQL_TEST_SUITES} --suite=${MYSQL_TEST_SUITES}
--skip-test-list=unstable-tests --skip-test-list=unstable-tests
--skip-test=binlog.binlog_unsafe --skip-test=binlog.binlog_unsafe
......
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