diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2016-08-18 12:47:20 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2016-08-18 12:49:04 +0400 |
commit | daff133ddf9a9d120050703c0b5753979c6190e0 (patch) | |
tree | 8847835f515af17d6c090300b138c31e1226731e | |
parent | 69052ed022063d0770ad4562a1dd42572067547e (diff) | |
download | mariadb-git-daff133ddf9a9d120050703c0b5753979c6190e0.tar.gz |
MDEV-9185 - Integrate with Travis-CI for easier and more automatic QA
Based on contributions by Daniel Black and Otto Kekäläinen.
-rw-r--r-- | .travis.yml | 56 | ||||
-rwxr-xr-x | debian/autobake-deb.sh | 14 | ||||
-rwxr-xr-x | debian/rules | 19 |
3 files changed, 73 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..b09c348dfab --- /dev/null +++ b/.travis.yml @@ -0,0 +1,56 @@ +# 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}" diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh index 6f4109515e6..b597ec036b3 100755 --- a/debian/autobake-deb.sh +++ b/debian/autobake-deb.sh @@ -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 diff --git a/debian/rules b/debian/rules index 7f134af24a8..2591e0070a4 100755 --- a/debian/rules +++ b/debian/rules @@ -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 |