-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
62 lines (53 loc) · 1.8 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
branches:
only:
- master
- travis_test
notifications:
on_failure: never
on_success: never
matrix:
include:
# TODO: below env could be used as additional dimension in matrix but there is a feature missing:
# https://github.com/travis-ci/travis-ci/issues/1519
- compiler: gcc
addons:
apt:
packages:
- g++-5
- gcc-5
- lcov
- qtbase5-dev
sources:
- ubuntu-toolchain-r-test
# use compiler which has c++14 support
env: COMPILER=g++-5
cache:
directories:
- $TRAVIS_BUILD_DIR/usr
before_install:
# setup Qt 5.7 which is not in Ubuntu by default. To be removed in the future.
- sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y
- sudo apt-get -qq update
- sudo sudo apt-get install -qq qt57base qt57svg
- source /opt/qt57/bin/qt57-env.sh
before_script:
- GTEST_PATH=$TRAVIS_BUILD_DIR/usr/src/googletest
# setup gmock and gtest
- if [ ! -e $GTEST_PATH ]; then
git clone https://github.com/google/googletest.git $GTEST_PATH;
fi
# mdadm-qt
- mkdir build && cd build
- CXX=$COMPILER cmake -DCMAKE_BUILD_TYPE=Debug -DGTEST_DIR=$GTEST_PATH/googletest -DGMOCK_DIR=$GTEST_PATH/googlemock -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/usr ..
script:
- make
after_success:
# Creating report
- cd ${TRAVIS_BUILD_DIR}/build
- make run_unit_tests_code_coverage
- lcov --directory . --capture --output-file coverage.info # capture coverage info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
- lcov --list coverage.info #debug info
# Uploading report to CodeCov
- bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"