-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
62 lines (57 loc) · 3.03 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
language: cpp
matrix:
include:
- dist: xenial
compiler: clang
before_install:
- sudo add-apt-repository -y ppa:$PPA
- sudo apt-get -qy update
- eval "${MATRIX_EVAL}"
- git submodule update --init --remote --recursive
install:
- sudo apt-get -qy install qt${QT}quickcontrols qt${QT}svg qt${QT}quickcontrols2 qt${QT}webengine qt${QT}multimedia qt${QT}imageformats qt${QT}graphicaleffects qt${QT}declarative qt${QT}base qt${QT}translations qt${QT}tools qt${QT}xmlpatterns mesa-common-dev libglu1-mesa-dev freeglut3-dev libpoppler-qt5-dev
env:
- QT=512 BREW=@ex PPA=beineri/opt-qt-5.12.3-xenial QMAKESPEC=linux-clang QT_SELECT=qt5 QMAKE_CC=clang-7.0 QMAKE_CXX=clang++-7.0 QMAKE_CXXFLAGS="-stdlib=libc++" QMAKE_LFLAGS="-stdlib=libc++" LD_LIBRARY_PATH=/usr/local/clang-7.0.0/lib:$LD_LIBRARY_PATH
- MATRIX_EVAL="CC=clang-7.0 && CXX=clang++-7.0"
before_script:
- . /opt/qt$QT/bin/qt$QT-env.sh
- dist: xenial
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
before_install:
- sudo add-apt-repository -y ppa:$PPA
- sudo apt-get -qy update
install:
- sudo apt-get -qy install qt${QT}quickcontrols qt${QT}svg qt${QT}quickcontrols2 qt${QT}webengine qt${QT}multimedia qt${QT}imageformats qt${QT}graphicaleffects qt${QT}declarative qt${QT}base qt${QT}translations qt${QT}tools qt${QT}xmlpatterns mesa-common-dev libglu1-mesa-dev freeglut3-dev libpoppler-qt5-dev
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- QT=512 BREW=@ex PPA=beineri/opt-qt-5.12.3-xenial QMAKESPEC=linux-g++ QT_SELECT=qt5 QMAKE_CC=gcc-7 QMAKE_CXX=g++-7 QMAKE_CXXFLAGS="" QMAKE_LFLAGS=""
before_script:
- . /opt/qt$QT/bin/qt$QT-env.sh
- os: osx
osx_image: xcode10
before_install:
- travis_wait 30 brew update
before_script:
- sudo Xvfb :99 -ac -screen 0 1024x768x8 &
install:
- brew install cppcheck
- brew install qt5
- brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.12.3/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.12.3/plugins /usr/local/plugins
env:
- QMAKESPEC=macx-clang QMAKE_CXXFLAGS="" QMAKE_LFLAGS="" PATH=/usr/local/opt/qt5/bin:$PATH CMAKE_PREFIX_PATH=/usr/local/Cellar/qt5/5.12.3
script:
- mkdir -p "$TRAVIS_BUILD_DIR-build"
- pushd "$TRAVIS_BUILD_DIR-build"
- lrelease "$TRAVIS_BUILD_DIR/rcse.pro"
- qmake -r -Wall -Wlogic -Wparser CONFIG+=debug CONFIG+=TESTS -spec $QMAKESPEC QCONFIG+="c++11" QMAKE_CXXFLAGS="$QMAKE_CXXFLAGS" QMAKE_LFLAGS="$QMAKE_LFLAGS" "$TRAVIS_BUILD_DIR"
- make -j2
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then (xvfb-run make -s -j2 check -C "$TRAVIS_BUILD_DIR-build") fi
- if [ "$TRAVIS_OS_NAME" = osx ] ; then (make -s -j2 check -C "$TRAVIS_BUILD_DIR-build") fi
- popd