ci:travis ci: Use ccache and add gcc 6 build config

Also make the build noisier to prevent some build failures when download
speeds are slow from whatever repository.

Note: The 64-bit devel build currently doesn't benefit from ccache for
whatever reason.

[skip appveyor]
This commit is contained in:
Jonathan Li 2016-05-16 23:44:10 +01:00
parent 37c049425d
commit df5035d975
2 changed files with 41 additions and 7 deletions

View File

@ -3,20 +3,24 @@ language: cpp
sudo: required
dist: trusty
cache: ccache
matrix:
include:
# Version 5 seems to be whatever is latest - for now it's 5.3
- env: VERSION=6 BITS=32
compiler: gcc-6-32
os: linux
- env: VERSION=5 BITS=32
compiler: gcc
compiler: gcc-5-32
os: linux
- env: VERSION=4.9 BITS=32
compiler: gcc
compiler: gcc-4.9-32
os: linux
- env: VERSION=3.7 BITS=32
compiler: clang
compiler: clang-3.7-32
os: linux
- env: VERSION=4.9 BITS=64
compiler: gcc
compiler: gcc-4.9-64
os: linux
before_install:
@ -24,3 +28,6 @@ before_install:
script:
- ./travis.sh script
after_success:
- ./travis.sh after_success

View File

@ -30,7 +30,7 @@ linux_32_before_install() {
# build image. libgtk2.0-dev:i386 and libsdl2-dev:i386 require the 32-bit
# versions of the dependencies, and the 2 versions conflict. So those
# dependencies must be explicitly installed.
sudo apt-get -qq -y install \
sudo apt-get -y install \
gir1.2-freedesktop:i386 \
gir1.2-gdkpixbuf-2.0:i386 \
gir1.2-glib-2.0:i386 \
@ -51,12 +51,22 @@ linux_32_before_install() {
portaudio19-dev:i386 \
zlib1g-dev:i386 \
${COMPILER_PACKAGE}
# Manually add ccache symlinks for clang
if [ "${CXX}" = "clang++" ]; then
sudo ln -sf ../../bin/ccache /usr/lib/ccache/${CXX}-${VERSION}
sudo ln -sf ../../bin/ccache /usr/lib/ccache/${CC}-${VERSION}
fi
}
linux_32_script() {
mkdir build
cd build
# Prevents warning spam
if [ "${CXX}" = "clang++" ]; then
export CCACHE_CPP2=yes
fi
export CC=${CC}-${VERSION} CXX=${CXX}-${VERSION}
cmake \
-DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake \
@ -86,7 +96,7 @@ linux_64_before_install() {
# libgl1-mesa-dev, liblzma-dev, libxext-dev, zlib1g-dev already installed on
# build worker, I put these here in case the build image changes.
sudo apt-get -qq -y install \
sudo apt-get -y install \
libaio-dev \
libasound2-dev \
libgtk2.0-dev \
@ -96,6 +106,12 @@ linux_64_before_install() {
libwxgtk3.0-dev \
portaudio19-dev \
${COMPILER_PACKAGE}
# Manually add ccache symlinks for clang
if [ "${CXX}" = "clang++" ]; then
sudo ln -sf ../../bin/ccache /usr/lib/ccache/${CXX}-${VERSION}
sudo ln -sf ../../bin/ccache /usr/lib/ccache/${CC}-${VERSION}
fi
}
@ -103,6 +119,10 @@ linux_64_script() {
mkdir build
cd build
# Prevents warning spam
if [ "${CXX}" = "clang++" ]; then
export CCACHE_CPP2=yes
fi
export CC=${CC}-${VERSION} CXX=${CXX}-${VERSION}
cmake \
-DCMAKE_BUILD_TYPE=Devel \
@ -114,11 +134,18 @@ linux_64_script() {
make -j3 install
}
linux_after_success() {
ccache -s
}
# Just in case I do manual testing and accidentally insert "rm -rf /"
case "${1}" in
before_install|script)
${TRAVIS_OS_NAME}_${BITS}_${1}
;;
after_success)
${TRAVIS_OS_NAME}_${1}
;;
*)
echo "Unknown command" && false
;;