Skip to content

Commit

Permalink
[build] add travis build definition
Browse files Browse the repository at this point in the history
  • Loading branch information
loganek committed May 5, 2018
1 parent f8a2491 commit cfbac05
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
sudo: required # to run ASAN

language:
- c
- cpp

compiler:
- clang
- gcc
os:
- osx

matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
packages:
- lcov
- python
- doxygen

before_install:
# - pip install --user codecov

after_script:
- make coverage_base
- make doc_doxygen_coverage
# - codecov --file coverage.info -F unittests
# - codecov --file doc-coverage.info -F documentation

- os: linux
compiler: clang

script:
- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_ASAN=ON -DENABLE_BENCHMARKS=ON -DENABLE_CODE_COVERAGE=ON ENABLE_EXAMPLES=ON -DENABLE_SHARED_LIB=ON -DENABLE_STATIC_LIB=ON -DENABLE_TESTS=ON .
- make
- make test CTEST_OUTPUT_ON_FAILURE=TRUE
- ./benchmarks/hawktracer_benchmarks

branches:
only:
- master

notifications:
email: false
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![Build Status](https://travis-ci.org/amzn/hawktracer.svg?branch=master)](https://travis-ci.org/amzn/hawktracer)
[![Gitter chat](https://img.shields.io/gitter/room/amzn/hawktracer.svg)](https://gitter.im/amzn/hawktracer)

# HawkTracer

HawkTracer is a highly portable, low-overhead, configurable profiling tool built in Amazon Video for getting performance metrics from low-end devices.
Expand Down
9 changes: 6 additions & 3 deletions cmake/coverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ if(NOT XDG_OPEN_PATH)
set(XDG_OPEN_PATH cmake -E echo Coverage report generated. Open )
endif()

add_custom_target(coverage
add_custom_target(coverage_base
COMMAND ${LCOV_PATH} --directory . --capture --output-file coverage.info
COMMAND ${LCOV_PATH} -r coverage.info /usr/\\*include/\\* \\*tests/\\* -o coverage.info
COMMAND ${LCOV_PATH} -r coverage.info /usr/\\*include/\\* \\*tests/\\* \\*benchmarks/\\* -o coverage.info)

add_custom_target(coverage
COMMAND ${GENHTML_PATH} coverage.info --output-directory coverage_report
COMMAND ${XDG_OPEN_PATH} coverage_report/index.html)
COMMAND ${XDG_OPEN_PATH} coverage_report/index.html
DEPENDS coverage_base)

0 comments on commit cfbac05

Please sign in to comment.