2014-11-02 06:55:46 -05:00
os :
- linux
- osx
compiler :
- gcc
- clang
language : cpp
2015-09-12 08:07:57 -04:00
before_install :
2015-09-12 15:46:15 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository -y ppa:beineri/opt-qt542; fi
2015-09-12 09:24:42 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
2014-11-02 06:55:46 -05:00
install :
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
2015-09-12 09:24:42 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" == "gcc" ]; then sudo apt-get -qq install gcc-4.7; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CC" == "gcc" ]; then export CC="gcc-4.7"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "g++" ]; then sudo apt-get -qq install g++-4.7; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" == "g++" ]; then export CXX="g++-4.7"; fi
2015-09-12 09:30:54 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake qt54base qt54x11extras qt54tools libgpg-error-dev zlib1g-dev libxtst-dev; fi
2015-09-12 09:43:18 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq purge libgcrypt11-dev || true; fi
2015-09-12 09:30:54 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget http://archive.ubuntu.com/ubuntu/pool/main/libg/libgcrypt20/libgcrypt20_1.6.1-2ubuntu1_amd64.deb; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget http://archive.ubuntu.com/ubuntu/pool/main/libg/libgcrypt20/libgcrypt20-dev_1.6.1-2ubuntu1_amd64.deb; fi
2015-09-12 09:38:48 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo dpkg -i libgcrypt20_1.6.1-2ubuntu1_amd64.deb libgcrypt20-dev_1.6.1-2ubuntu1_amd64.deb; fi
2014-11-02 06:55:46 -05:00
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
2015-09-12 08:43:37 -04:00
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq libgcrypt || brew install libgcrypt; fi
2015-09-12 08:07:57 -04:00
before_script :
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then source /opt/qt54/bin/qt54-env.sh; fi
2015-09-12 08:34:59 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz -O cmake.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then tar -xzf cmake.tar.gz -C $HOME; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export PATH=$HOME/cmake-3.3.1-Linux-x86_64/bin:$PATH; fi
2015-09-12 09:26:45 -04:00
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5"; fi
2015-09-12 08:07:57 -04:00
- mkdir build && pushd build
2014-11-02 06:55:46 -05:00
script :
2015-09-12 09:26:45 -04:00
- cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_GUI_TESTS=ON $CMAKE_ARGS ..
2014-11-02 06:55:46 -05:00
- make
2015-05-14 14:46:59 -04:00
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
2015-09-12 09:39:21 -04:00
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test ARGS+="--output-on-failure"; fi