Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
172 lines (160 sloc) 5.08 KB
# Inspiration from http://stackoverflow.com/questions/29721240/ci-for-qt-app-build-with-different-qt-versions
# Inspiration from http://stackoverflow.com/questions/22111549/travis-ci-with-clang-3-4-and-c11
# Inspiration from https://jonasw.de/blog/2015/07/22/develop/cplusplus14-on-travis-with-cmake/
# Inspiration from http://apt.llvm.org/
language: cpp
cache: ccache
compiler: gcc
os:
- linux
# - osx
dist: trusty
env:
global:
- QT_VERSION_MAJOR=5
# xenial still not out in 2017 !1!!?
- TRAVIS_DIST_NAME=trusty
- CLANG_VERSION=4.0
matrix:
# - QT_VERSION_MINOR=6 QT_VERSION_REVISION=2
- QT_VERSION_MINOR=8 QT_VERSION_REVISION=0
# - QT_VERSION_MINOR=9 QT_VERSION_REVISION=0
# Avoid sudo to speed up things a little
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-4.0
- sourceline: 'ppa:beineri/opt-qt58-trusty'
# - sourceline: 'deb http://ppa.launchpad.net/beineri/opt-qt58-trusty/ubuntu trusty main'
- key_url: 'http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x10C56D0DE9977759'
packages:
###################################### GCC
- g++-6
- gcc-6
###################################### Clang
- clang-4.0
###################################### Qt5
# - qt58-meta-full # THIS WORKS BUT IS SLOW SO WE OPTIMIZE BY REMOVING WHAT WE DONT NEED
- qt583d
- qt58base
# qt58canvas3d
- qt58connectivity
# - qt58declarative
# - qt58doc
- qt58gamepad
- qt58graphicaleffects
- qt58imageformats
- qt58location
- qt58multimedia
# - qt58qbs
# - qt58quickcontrols
# - qt58quickcontrols2
- qt58script
# - qt58scxml
- qt58sensors
- qt58serialbus
- qt58serialport
# - qt58speech
- qt58svg
- qt58tools
- qt58translations
# - qt58webchannel
# - qt58webengine
# - qt58websockets
- qt58x11extras
# - qt58xmlpatterns
###################################### Dependencies
#-lGL -lpthread -lpulse-mainloop-glib -lpulse -lglib-2.0
- build-essential
# XCB/X11 support
- libx11-xcb-dev
# OpenGL - GLX
- libglu1-mesa-dev
- libxrender-dev
# Audio
- libasound2-dev
- libpulse-dev
# G-Streamer support
- libgstreamer0.10-dev
- libgstreamer-plugins-base0.10-dev
- libgstreamer-plugins-bad0.10-dev
- libgstreamer0.10-dev
# XKB fixes for Qt5.4x
- libxkbfile1
- x11-xkb-utils
- xkb-data
- libxkbfile-dev
# SQLite 3 support
- libsqlite-dev
- libsqlite3-dev
# SSL/TLS Support
- libssl-dev
# - gnutls-dev
- libgnutls-dev
# DEPS+=" libgnutls-openssl-dev" # Not available on debian
- libsslcommon2-dev
# D-BUS ?
- libdbus-glib-1-dev
before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update;
fi
- if test -n "$BUILD_CC"; then export CC="$BUILD_CC"; fi
- if test -n "$BUILD_CXX"; then export CXX="$BUILD_CXX"; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
# - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50; fi
install:
- if [ "$CXX" == "clang++" ]; then cwd=$(pwd); fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install qt${QT_VERSION_MAJOR}${QT_VERSION_MINOR};
brew link --force qt${QT_VERSION_MAJOR}${QT_VERSION_MINOR};
fi
# - sudo chmod +x local/prep.sh - sudo local/prep.sh
before_script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export QT_ENV_SCRIPT="/opt/qt${QT_VERSION_MAJOR}${QT_VERSION_MINOR}/bin/qt${QT_VERSION_MAJOR}${QT_VERSION_MINOR}-env.sh"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then echo "QT_ENV_SCRIPT=${QT_ENV_SCRIPT}"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cat ${QT_ENV_SCRIPT}; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then source ${QT_ENV_SCRIPT}; fi
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- echo "------------- SHOW STATS ------------"
- OCOMY_BUILD_ROOT=build
- mkdir -p ${OCOMY_BUILD_ROOT}
- cd ${OCOMY_BUILD_ROOT}
- pwd
- cp ../integration/travis_ci/overrides.pri ../pri/local_overrides.pri
- cat ../pri/local_overrides.pri
- ls -haltF ../
- which c++
- which g++
- which clang++
- c++ --version
- which ${CXX}
- ${CXX} --version
- which qmake
- qmake -v
- echo "NPROC=$(nproc)"
- echo "--------------- QMAKE ---------------"
- qmake QMAKE_CXX=g++-6 QMAKE_CC=gcc-6 QMAKE_LINK=g++-6 ../OctoMY.pro
- echo "---------------- MAKE ---------------"
- make -j$(nproc) -l
- echo "------------- RUN TESTS -------------"
- make check
notifications:
email:
recipients:
- lennartrolland@gmail.com
on_success: change
on_failure: always
irc:
channels:
- "irc.freenode.net:8001#octomy"
on_success: change
on_failure: always
template:
- "%{repository} (%{commit}) : %{message} %{foo} "
- "Build details: %{build_url}"
You can’t perform that action at this time.