aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 79d7720e701d20fa74401fd8c8d8b0e04c98a265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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 . /opt/qt56/bin/qt56-env.sh; fi

install:
- git clone https://github.com/QMatrixClient/matrix-doc.git
- git clone --recursive https://github.com/KitsuneRal/gtad.git
- pushd gtad
- cmake -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} .
- cmake --build .
- popd

before_script:
- mkdir build && cd build
- cmake -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} ..
- cmake --build . --target update-api

script:
- cmake --build . --target all
- cd ..
- qmake qmc-example.pro "CONFIG += debug" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" && make all
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./qmc-example "$QMC_TEST_USER" "$QMC_TEST_PWD" '#qmc-test:matrix.org'; 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