forked from pcolby/pcp-pmda-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
107 lines (96 loc) · 3.81 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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="
matrix:
# Tip: curl -s https://dl.bintray.com/pcp/trusty/ | sed -nre 's/.*libpcp3_([-0-9.]+)_.*/ - PCP: \1/p' | sort -u
- PCP:
- PCP: 3.10.5
- PCP: 3.10.6
- PCP: 3.10.7
- PCP: 3.10.8
- PCP: 3.10.9
- PCP: 3.11.0
- PCP: 3.11.1
- PCP: 3.11.2
- PCP: 3.11.3
- PCP: 3.11.4
- PCP: 3.11.5
- PCP: 3.11.6
- PCP: 3.11.7
- PCP: 3.11.8
- PCP: 3.11.9
- PCP: 3.11.10
- PCP: 3.12.0
- PCP: 3.12.1
- PCP: 3.12.2
- PCP: 4.0.0-1
addons:
coverity_scan:
project:
name: $TRAVIS_REPO_SLUG
description: "Build submitted via Travis CI"
notification_email: git@colby.id.au
build_command_prepend: >
mkdir -p $TRAVIS_BUILD_DIR-scan &&
cmake -B$TRAVIS_BUILD_DIR-scan -H$TRAVIS_BUILD_DIR
build_command: make -C $TRAVIS_BUILD_DIR-scan -j2
branch_pattern: cov-scan
before_install:
- '[ -z "$PCP" ] || export PCP_VERSION=`echo "$PCP" | cut -d- -f1 | awk ''BEGIN{FS="."}{printf "%d%02d%02d\n",$1,$2,$2}''`'
- '[ -z "$PCP" ] || curl "https://bintray.com/user/downloadSubjectPublicKey?username=pcp" | sudo apt-key add -'
- '[ -z "$PCP" ] || echo "deb https://dl.bintray.com/pcp/trusty trusty main" | sudo tee -a /etc/apt/sources.list'
- sudo apt-get update -y
install:
- export PCP_PKGS=libpcp3-dev,libpcp-pmda3-dev,pcp
- '[ -z "$PCP" ] || export PCP_PKGS=$PCP_PKGS,libpcp3,libpcp-pmda3,libpcp-pmda-perl,pcp-conf,python-pcp'
- '[[ -z "$PCP" || $PCP_VERSION -lt 31104 ]] || export PCP_PKGS="$PCP_PKGS,libpcp-gui2,libpcp-import1,libpcp-mmv1"'
- '[ -z "$PCP" ] || export EQ_PCP="=$PCP"'
- export PCP_PKGS=`eval echo "{$PCP_PKGS}$EQ_PCP"`
- echo "$PCP_PKGS"
- sudo apt-get install -y clang cppcheck libboost-program-options-dev $PCP_PKGS rpm
- 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:
- ./.cppcheck.sh -j2 --quiet
- scan-build --status-bugs cmake -B$TRAVIS_BUILD_DIR-clang-scan -DCMAKE_BUILD_TYPE=DEBUG -H$TRAVIS_BUILD_DIR
- scan-build --status-bugs make -C $TRAVIS_BUILD_DIR-clang-scan -j2
- cmake -B$TRAVIS_BUILD_DIR-build -H$TRAVIS_BUILD_DIR && make -C$TRAVIS_BUILD_DIR-build -j2 check
- if [ "$CXX" = "g++" ]; then make -C $TRAVIS_BUILD_DIR-build coverage; fi
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
before_deploy:
# Currently, there is no rpmlint on Travis CI, so fake it for now.
# This will simply circumvent a check in the make-src-rpm.sh script.
- ln -s /bin/true ~/bin/rpmlint
- mkdir -p `rpm -E %{_topdir}`/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- $TRAVIS_BUILD_DIR/package/rpm/make-src-rpm.sh "$TRAVIS_BRANCH"
- sha256sum `rpm -E %{_srcrpmdir}`/pcp-pmda-cpp-*
deploy:
provider: releases
api_key:
secure: UK6KkwxhVxP1yHvUo2gHbjhjpl1Y0A8YlplEVRn/1hlK1OveZ2tduq/7nDgC8tB7vG3dZYxl2fRxxlrk98t5Au/ZDXoj+mKFOjqJV/Pcn1hBxsP2fzDdXTl/R8ussMFAJPjPGi+Eb2Qbw+SkRNn1OI9A4Dcg6trPeSAsZcKYRCE=
file_glob: true
file: "`rpm -E %{_srcrpmdir}`/pcp-pmda-cpp-*"
skip_cleanup: true
on:
tags: true
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/70f1d860b6adfae00a0c