-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
40 lines (34 loc) · 1.46 KB
/
.travis.yml
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
language: cpp
dist: trusty
matrix:
include:
- os: linux
compiler: gcc
env: QT=53 PPA=beineri/opt-qt532-trusty
- os: linux
compiler: gcc
env: QT=57 PPA=beineri/opt-qt571-trusty
- os: osx
compiler: clang
env: QT=5
before_install:
- '[[ "$TRAVIS_OS_NAME" != linux || -z "$PPA" ]] || sudo add-apt-repository -y ppa:$PPA'
- '[ "$TRAVIS_OS_NAME" != linux ] || sudo apt-get -qy update'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew update'
install:
- '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" != */opt-* ]] || sudo apt-get -qy install qt${QT}base qt${QT}xmlpatterns qt${QT}svg'
- '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" == */opt-* ]] || sudo apt-get -qy install qt5-qmake qtbase5-dev libqt5xmlpatterns5-dev libqt5svg5-dev libqt5svg5'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew install qt$QT'
- '[ "$TRAVIS_OS_NAME" != osx ] || brew link --force qt$QT'
before_script:
- '[[ "$TRAVIS_OS_NAME" != linux || "$CXX" != g++ ]] || export QMAKESPEC=linux-g++'
- '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" != */opt-* ]] || . /opt/qt$QT/bin/qt$QT-env.sh'
- '[[ "$TRAVIS_OS_NAME" != linux || "$PPA" == */opt-* ]] || export QT_SELECT=qt5'
- '[[ "$TRAVIS_OS_NAME" != osx || "$CXX" != clang++ ]] || export QMAKESPEC=macx-clang'
- mkdir -p "$TRAVIS_BUILD_DIR-build"
- pushd "$TRAVIS_BUILD_DIR-build"
- qmake -v
- qmake -r -Wall -Wlogic -Wparser "$TRAVIS_BUILD_DIR"
- popd
script:
- make -C "$TRAVIS_BUILD_DIR-build" -j2 all