Commit daff133d authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-9185 - Integrate with Travis-CI for easier and more automatic QA

Based on contributions by Daniel Black and Otto Kekäläinen.
parent 69052ed0
# vim ft=yaml
# travis-ci.org definition
# non-container builds don't have enough RAM to reliably compile
sudo: required
dist: trusty
language: cpp
compiler:
- gcc
# - clang # See commit f38808 if you want to re-enable clang builds
cache:
apt:
ccache:
# Timing on build an test needs to be < 50 minutes. The compile is ~4-5minutes
# so here we group the tests such that this happens.
addons:
apt:
packages: # make sure these match debian/control contents
- bison
- chrpath
- cmake
- debhelper
- dh-apparmor
- dpatch
- libaio-dev
- libboost-dev
- libjudy-dev
- libncurses5-dev
- libpam0g-dev
- libreadline-gplv2-dev
- libssl-dev
- lsb-release
- perl
- po-debconf
- psmisc
- zlib1g-dev
- libcrack2-dev # no effect as the package is disallowed on Travis-CI
- libjemalloc-dev
- devscripts # implicit for any build on Ubuntu
script:
- ${CC} --version ; ${CXX} --version
- cd "${TRAVIS_BUILD_DIR}"
- env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
notifications:
irc:
channels:
- "chat.freenode.net#maria"
on_success: never # [always|never|change]
on_failure: never
template:
- "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
......@@ -10,10 +10,16 @@ set -e
# Debug script and command lines
#set -x
# Don't run the mysql-test-run test suite as part of build.
# On Buildbot, don't run the mysql-test-run test suite as part of build.
# It takes a lot of time, and we will do a better test anyway in
# Buildbot, running the test suite from installed .debs on a clean VM.
export DEB_BUILD_OPTIONS="nocheck"
# On Travis-CI we want to simulate the full build, including tests.
# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS
# at this stage at all.
if [[ ! $TRAVIS ]]
then
export DEB_BUILD_OPTIONS="nocheck"
fi
export MARIADB_OPTIONAL_DEBS=""
......@@ -32,8 +38,8 @@ LOGSTRING="MariaDB build"
CODENAME="$(lsb_release -sc)"
# add libcrack2 (>= 2.9.0) as a build dependency
# but only where the distribution can possibly satisfy it
if apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
# but only where the distribution can possibly satisfy it and if not on Travis-CI
if $TRAVIS || apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
then
# Anything in MARIADB_OPTIONAL_DEBS is omitted from the resulting
# packages by snipped in rules file
......
......@@ -29,20 +29,15 @@ ifeq (${MAKE_J}, -j0)
MAKE_J = -j1
endif
MAKE_TEST_TARGET=test-force
ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
# make test-bt is the testsuite run by the MySQL build team
# before a release, but it is long
MAKE_TEST_TARGET=test-bt
# Parallel build support as advised
# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j $(NUMJOBS)
endif
USE_ASSEMBLER=--enable-assembler
ifneq (,$(filter $(ARCH), amd64 i386 ia64 s390))
TESTSUITE_FAIL_CMD=exit 1
else
TESTSUITE_FAIL_CMD=true
endif
USE_ASSEMBLER=--enable-assembler
BUILDDIR = builddir
builddir = $(BUILDDIR)
......@@ -88,7 +83,7 @@ build-stamp: configure
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
if [ ! -f testsuite-stamp ] ; then \
cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
cd $(builddir)/mysql-test && ./mtr --force --parallel=$(NUMJOBS) --skip-rpl --suite=main; \
fi
endif
......
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