diff options
-rw-r--r-- | .travis.yml | 49 |
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 + |