Commit 325c9ce9 authored by Otto Kekäläinen's avatar Otto Kekäläinen Committed by Vicențiu-Marian Ciorbaru

Travis-CI: slim down the deb build so it passes in the 50 minute time limit

The Debian packaging build was failing on Travis-CI due to timeouts.
These changes make it faster by skipping less relevant parts of the build,
like the test suite, RocksDB, TokuDB and Mroonga.

Also fix the usage of the 'make -j' flag to not have any spaces as
recommended in an example in the Debian policy.
parent b9e029d7
...@@ -82,7 +82,6 @@ matrix: ...@@ -82,7 +82,6 @@ matrix:
- fakeroot - fakeroot
script: script:
- ${CC} --version ; ${CXX} --version - ${CC} --version ; ${CXX} --version
- source .travis.compiler.sh
# 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
......
...@@ -6,16 +6,11 @@ ...@@ -6,16 +6,11 @@
# Exit immediately on any error # Exit immediately on any error
set -e set -e
# On Buildbot, don't run the mysql-test-run test suite as part of build. # This file is invocated from Buildbot and Travis-CI to build deb packages.
# It takes a lot of time, and we will do a better test anyway in # As both of those CI systems have many parallel jobs that include different
# Buildbot, running the test suite from installed .debs on a clean VM. # parts of the test suite, we don't need to run the mysql-test-run at all when
# On Travis-CI we want to simulate the full build, including tests. # building the deb packages here.
# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS export DEB_BUILD_OPTIONS="nocheck $DEB_BUILD_OPTIONS"
# at this stage at all.
if [[ ! $TRAVIS ]]
then
export DEB_BUILD_OPTIONS="nocheck"
fi
# Travis-CI optimizations # Travis-CI optimizations
if [[ $TRAVIS ]] if [[ $TRAVIS ]]
...@@ -26,6 +21,12 @@ then ...@@ -26,6 +21,12 @@ then
# Don't include test suite package on Travis-CI to make the build time shorter # Don't include test suite package on Travis-CI to make the build time shorter
sed '/Package: mariadb-test-data/,+28d' -i debian/control sed '/Package: mariadb-test-data/,+28d' -i debian/control
sed '/Package: mariadb-test/,+36d' -i debian/control sed '/Package: mariadb-test/,+36d' -i debian/control
# Don't build the test package at all to save time and disk space
sed 's|DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test|DINSTALL_MYSQLTESTDIR=false|' -i debian/rules
# Also skip building RocksDB and TokuDB to save even more time and disk space
sed 's|-DDEB|-DWITHOUT_TOKUDB_STORAGE_ENGINE=true -DWITHOUT_MROONGA_STORAGE_ENGINE=true -DWITHOUT_ROCKSDB_STORAGE_ENGINE=true -DDEB|' -i debian/rules
fi fi
...@@ -77,11 +78,11 @@ fi ...@@ -77,11 +78,11 @@ fi
GCCVERSION=$(gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$/&00/') GCCVERSION=$(gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$/&00/')
# Don't build rocksdb package if gcc version is less than 4.8 or we are running on # Don't build rocksdb package if gcc version is less than 4.8 or we are running on
# x86 32 bit. # x86 32 bit.
if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] if [[ $GCCVERSION -lt 40800 ]] || [[ $(arch) =~ i[346]86 ]] || [[ $TRAVIS ]]
then then
sed '/Package: mariadb-plugin-rocksdb/,+11d' -i debian/control sed '/Package: mariadb-plugin-rocksdb/,+11d' -i debian/control
fi fi
if [[ $GCCVERSION -lt 40800 ]] if [[ $GCCVERSION -lt 40800 ]] || [[ $TRAVIS ]]
then then
sed '/Package: mariadb-plugin-aws-key-management-10.2/,+13d' -i debian/control sed '/Package: mariadb-plugin-aws-key-management-10.2/,+13d' -i debian/control
fi fi
......
...@@ -32,7 +32,7 @@ CXX := $(DEB_HOST_GNU_TYPE)-g++ ...@@ -32,7 +32,7 @@ CXX := $(DEB_HOST_GNU_TYPE)-g++
# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options # at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j $(NUMJOBS) MAKEFLAGS += -j$(NUMJOBS)
else else
# NUMJOBS cannot be empty as it is used as a parameter to mtr, default to 1. # NUMJOBS cannot be empty as it is used as a parameter to mtr, default to 1.
NUMJOBS = 1 NUMJOBS = 1
......
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