language: cpp addons: apt: sources: - ubuntu-toolchain-r-test - sourceline: 'ppa:beineri/opt-qt563-trusty' packages: - g++-5 - qt56base - valgrind matrix: include: - os: linux compiler: gcc env: [ 'ENV_EVAL="CC=gcc-5 && CXX=g++-5"' ] - os: linux compiler: clang - os: osx env: [ 'ENV_EVAL="brew update && brew install qt5 && PATH=/usr/local/opt/qt/bin:$PATH"' ] before_install: - eval "${ENV_EVAL}" - if [ "$TRAVIS_OS_NAME" = "linux" ]; then VALGRIND="valgrind $VALGRIND_OPTIONS"; . /opt/qt56/bin/qt56-env.sh; fi script: - mkdir build && cd build - cmake -DCMAKE_INSTALL_PREFIX=../install .. - cmake --build . --target all - cmake --build . --target install - cd ../examples - $CC qmc-example.cpp -I../install/include -l../install/lib/libqmatrixclient.a -o qmc-example-lib-installed - cd .. - qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" - make all - if [ "$QMC_TEST_USER" != "" ]; then $VALGRIND ./qmc-example "$QMC_TEST_USER" "$QMC_TEST_PWD" qmc-example-travis '#qmc-test:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi notifications: webhooks: urls: - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGtpdHN1bmUlM0FtYXRyaXgub3JnLyUyMVBDelV0eHRPalV5U3hTZWxvZiUzQW1hdHJpeC5vcmc" on_success: change # always|never|change on_failure: always on_start: never