forked from pcolby/pcp-pmda-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (64 loc) · 2.17 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
63
64
65
66
67
68
69
70
71
72
73
language: cpp
compiler:
- clang
- gcc
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "P9gHn+wkHWzjRqcwlcCoSGmz8pw1aG3CwuPP0rsMpqsa+jh0lr3SDfdA01Xll68Rb7xY7yVTtXaFOXrEk6ceb3fvGs4JxYXNXRgkG8uF808Lm19bbADAQBb5kXECiClaLKk20es/Y4mlI6G/8Qmr4OmOc0Z2gL/sVqLnh6QLTtI="
addons:
coverity_scan:
project:
name: "pcolby/pcp-pmda-cpp"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: >
cp -a $TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR-scan &&
pushd $TRAVIS_BUILD_DIR-scan && cmake .
build_command: make -j2
branch_pattern: cov-scan
before_install:
- sudo apt-get update -qq
- dpkg -l
install:
- >
sudo apt-get install -qq
clang cppcheck
libboost-program-options-dev
libpcp3 libpcp3-dev libpcp-pmda3 libpcp-pmda3-dev
pcp
rubygems
- if [ "$CXX" = "g++" ]; then sudo apt-get install lcov; fi
- gem install lcoveralls
before_script:
- mkdir -p $TRAVIS_BUILD_DIR-build
- mkdir -p $TRAVIS_BUILD_DIR-clang-scan
script:
# When cppcheck 1.56+ is available, add: --std=c++03
# When cppcheck 1.58+ is available, add: --include=/usr/include/pcp/pmapi.h
- >
cppcheck --enable=all --error-exitcode=1 -I include --quiet .
--std=posix --std=c++11 .
--suppress=noExplicitConstructor:include/pcp-cpp/exception.hpp
- pushd $TRAVIS_BUILD_DIR-clang-scan
- scan-build --status-bugs cmake -DCMAKE_BUILD_TYPE=DEBUG $TRAVIS_BUILD_DIR
- scan-build --status-bugs make -j2
- popd
- pushd $TRAVIS_BUILD_DIR-build
- cmake $TRAVIS_BUILD_DIR && make -j2 check
- if [ "$CXX" = "g++" ]; then make coverage; fi
- popd
after_success:
- >
if [ "$CXX" = "g++" ]; then
# Report code coverage to coveralls.io
lcoveralls --retry-count 5 $TRAVIS_BUILD_DIR-build/test/coverage.info
# Report code coverage to codecov.io
curl https://codecov.io/bash > /tmp/codecov.sh; fi
bash /tmp/codecov.sh -f $TRAVIS_BUILD_DIR-build/test/coverage.info
fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/70f1d860b6adfae00a0c