-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (51 loc) · 1.75 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
sudo: true
language: cpp
compiler: gcc
dist: trusty # Qt5, from https://gist.github.com/jreese/6207161#gistcomment-1462109
addons:
apt:
packages: libboost-all-dev
before_install:
# Qt5, from https://gist.github.com/jreese/6207161#gistcomment-1462109
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
# C++14
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
install:
# Qt5
- sudo apt-get install -qq libqt5webkit5-dev qtdeclarative5-dev
- export QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
# C++14
- sudo apt-get install -qq g++-5
# Codecov
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90
- sudo pip install codecov
# OCLint
- ./install_oclint
# Start virtual X server, from https://docs.travis-ci.com/user/gui-and-headless-browsers/
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
# Build and run Boost.Test
- qmake -qt=qt5 travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest_boost_test.pro
- make
- ./travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest_boost_test
# Build and run QTest
- qmake -qt=qt5 travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest_qtest.pro
- make
- ./travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest_qtest
# Build and run 'real' program
- qmake -qt=qt5 travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest.pro
- make
- ./travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest &
- sudo killall -9 travis_qmake_gcc_cpp14_boost_test_gcov_oclint_qt5_qtest
# Get code coverage
- ./get_code_cov
- codecov
# Call OCLint
- ./do_oclint
after_success:
- bash <(curl -s https://codecov.io/bash)