summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorAlexander <AKutsan@luxoft.com>2016-04-08 10:46:08 +0300
committerAlexander <AKutsan@luxoft.com>2016-04-21 15:05:50 +0300
commit8a3bc784250db1a4de988c9c23ff08355db55833 (patch)
treeedfb1846cc38a9df95f4d2e06edac60a27257798 /.travis.yml
parent0c3a71a7cc8437ec6fd6a8fc9c9f7ba02eec6b4c (diff)
downloadsdl_core-8a3bc784250db1a4de988c9c23ff08355db55833.tar.gz
Improve travis.yml
Add tests run Add collecting covarage report
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml49
1 files changed, 42 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index eea4331127..0c16fa095b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,50 @@
language: cpp
+dist: trusty
+sudo: required
+only:
+ - master
+ - develop
+ - \/feature\/.+
+ - \/fix\/.+
+ - \/hotfix\/.+
+
addons:
apt:
sources:
- - travis-ci/sqlite3
+ - ubuntu-toolchain-r-test
packages:
- - sqlite3
+ - gcc-4.9
+ - g++-4.9
+ - lcov
+ - libssl-dev
+ - libbluetooth3
+ - libbluetooth-dev
+ - libudev-dev
+ - cmake
+ - html2text
before_install:
- sudo apt-get -qq update
- - sudo apt-get install -y libavahi-client-dev libssl-dev libbluetooth3 libbluetooth-dev bluez-tools libudev-dev
- - sudo add-apt-repository ppa:kalakris/cmake -y
- - sudo apt-get update -q
- - sudo apt-get install -y cmake
+ - sudo apt-get -q -y install libavahi-client-dev bluez-tools sqlite3 libsqlite3-dev automake1.11
script:
- - mkdir build && cd build && cmake ../ && make && make install \ No newline at end of file
+ - mkdir build && cd build && cmake ../ -DBUILD_TESTS=ON -DENABLE_GCOV=ON && make install | perl -pe 's/\e\[?.*?[\@-~]//g'
+ - sudo ldconfig
+ - travis_wait make test | perl -pe 's/\e\[?.*?[\@-~]//g'
+ - mkdir coverage_report/ && lcov --capture --directory . --output-file coverage_report/full_report.info >/dev/null 2>&1
+ - lcov --remove coverage_report/full_report.info '/usr/*' 'src/3rd*' '*/commands/*' '*/test/*' --output-file coverage_report/coverage.info >/dev/null 2>&1
+ - genhtml coverage_report/coverage.info --output-directory coverage_report/ >/dev/null 2>&1
+ - tar -zcvf coverage_report.tar.gz coverage_report >/dev/null 2>&1
+ - html2text -width 150 coverage_report/index.html
+env:
+ global:
+ - CMAKE_CXX_COMPILER=g++-4.9
+ - CMAKE_C_COMPILER=gcc-4.9
+ - LD_LIBRARY_PATH=.
+deploy:
+ provider: releases
+ api-key: "uw8e4USTAS6c9LFhRMYOvw"
+ file:
+ - "coverage_report.tar.gz"
+ skip_cleanup: true
+ on:
+ tags: true
+