diff --git a/.travis.yml b/.travis.yml index 74f6feff..dfceb213 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,20 @@ language: cpp +env: + - QT4=1 + - QT4=0 os: - linux - osx compiler: - gcc - clang -script: mkdir build && cd build && cmake .. -DWITH_SERVER=1 && make +script: ./travis-compile.sh install: ./travis-dependencies.sh cache: apt +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/d94969c3b01b22cbdcb7 + on_success: change + on_failure: change + on_start: false diff --git a/travis-compile.sh b/travis-compile.sh new file mode 100755 index 00000000..e5058543 --- /dev/null +++ b/travis-compile.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +mkdir build +cd build +prefix="" +if [[ $TRAVIS_OS_NAME == "osx" && $QT4 == 0 ]]; then + prefix="-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.3.2/" +fi +cmake .. -DWITH_SERVER=1 -DWITH_QT4=$QT4 $prefix +make diff --git a/travis-dependencies.sh b/travis-dependencies.sh index 10af11cd..5878b513 100755 --- a/travis-dependencies.sh +++ b/travis-dependencies.sh @@ -2,8 +2,20 @@ if [[ $TRAVIS_OS_NAME == "osx" ]] ; then brew update - brew install qt protobuf libgcrypt + if (( QT4 )); then + brew install qt protobuf libgcrypt + else + brew install qt5 protobuf libgcrypt + fi else - sudo apt-get update -qq - sudo apt-get install -y qtmobility-dev libprotobuf-dev protobuf-compiler libqt4-dev + if (( QT4 )); then + sudo apt-get update -qq + sudo apt-get install -y qtmobility-dev libprotobuf-dev protobuf-compiler libqt4-dev + else + sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa + sudo apt-get update -qq + sudo apt-get install -y libprotobuf-dev protobuf-compiler qtbase5-dev cmake\ + qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev qt5-default qttools5-dev-tools\ + qttools5-dev qtmultimedia5-dev libqt5svg5-dev + fi fi