language: cpp addons: apt: sources: - ubuntu-toolchain-r-test - sourceline: 'ppa:beineri/opt-qt571-trusty' packages: - ninja-build - g++-5 - qt57base - qt57multimedia - valgrind matrix: include: - os: linux compiler: gcc env: [ 'ENV_EVAL="CC=gcc-5 && CXX=g++-5"' ] - os: linux compiler: clang - os: osx osx_image: xcode10.1 env: [ 'PATH=/usr/local/opt/qt/bin:$PATH' ] addons: homebrew: packages: - qt5 before_install: - eval "${ENV_EVAL}" - if [ "$TRAVIS_OS_NAME" = "linux" ]; then USE_NINJA="-GNinja"; VALGRIND="valgrind $VALGRIND_OPTIONS"; . /opt/qt57/bin/qt57-env.sh; fi install: - pushd 3rdparty/libQtOlm - git clone https://gitlab.matrix.org/matrix-org/olm.git - popd - git clone https://github.com/QMatrixClient/matrix-doc.git - git clone --recursive https://github.com/KitsuneRal/gtad.git - pushd gtad - cmake $USE_NINJA -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} . - cmake --build . - popd before_script: - mkdir build && pushd build - cmake $USE_NINJA -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=../install .. - cmake --build . --target update-api - popd script: - cmake --build build --target all - cmake --build build --target install # Build qmc-example with the installed library - mkdir build-example && pushd build-example - cmake -DCMAKE_PREFIX_PATH=../install ../examples - cmake --build . --target all - popd # Build and install with qmake - qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" - make all # Run the qmake-compiled qmc-example under valgrind - 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