From e918900d4e66020dd9e5fe87b53c5b3755dc73e2 Mon Sep 17 00:00:00 2001 From: Gavin Bisesi Date: Fri, 14 Nov 2014 10:38:54 -0500 Subject: [PATCH] Refine travis config to only install qt4 or qt5 per build instead of both --- .travis.yml | 6 +++--- travis-dependencies.sh | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e2bd5fc8..89b71d6a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ language: cpp env: - - QT="-DWITH_QT4=0" - - QT="-DWITH_QT4=1" + - QT4=1 + - QT4=0 os: - linux - osx compiler: - gcc - clang -script: mkdir build && cd build && cmake .. $QT -DWITH_SERVER=1 && make +script: mkdir build && cd build && cmake .. -DWITH_QT4=$QT4 -DWITH_SERVER=1 && make install: ./travis-dependencies.sh cache: apt diff --git a/travis-dependencies.sh b/travis-dependencies.sh index e4280fd5a..39c0e4e49 100755 --- a/travis-dependencies.sh +++ b/travis-dependencies.sh @@ -2,10 +2,19 @@ if [[ $TRAVIS_OS_NAME == "osx" ]] ; then brew update - brew install qt qt5 protobuf libgcrypt + if (( QT4 )); then + brew install qt protobuf libgcrypt + else + brew install qt qt5 protobuf libgcrypt + fi else - sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa - sudo apt-get update -qq - sudo apt-get install -y qtmobility-dev libprotobuf-dev protobuf-compiler libqt4-dev\ - qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev qt5-default qttools5-dev-tools + 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\ + qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev qt5-default qttools5-dev-tools + fi fi