-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
139 lines (127 loc) · 5.61 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
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:
include:
# Tip: for dist in trusty xenial; do curl -s https://dl.bintray.com/pcp/$dist/ | sed -nre "s/.*libpcp3_([-0-9.]+)_.*/ - { dist: $dist, env: PCP=\1 }/p" | sort -u; done
- { dist: trusty, env: PCP= }
- { dist: trusty, env: PCP=3.10.5 }
- { dist: trusty, env: PCP=3.10.6 }
- { dist: trusty, env: PCP=3.10.7 }
- { dist: trusty, env: PCP=3.10.8 }
- { dist: trusty, env: PCP=3.10.9 }
- { dist: trusty, env: PCP=3.11.0 }
- { dist: trusty, env: PCP=3.11.1 }
- { dist: trusty, env: PCP=3.11.2 }
- { dist: trusty, env: PCP=3.11.3 }
- { dist: trusty, env: PCP=3.11.4 }
- { dist: trusty, env: PCP=3.11.5 }
- { dist: trusty, env: PCP=3.11.6 }
- { dist: trusty, env: PCP=3.11.7 }
- { dist: trusty, env: PCP=3.11.8 }
- { dist: trusty, env: PCP=3.11.9 }
- { dist: trusty, env: PCP=3.11.10 }
- { dist: trusty, env: PCP=3.12.0 }
- { dist: trusty, env: PCP=3.12.1 }
- { dist: trusty, env: PCP=3.12.2 }
- { dist: trusty, env: PCP=4.0.0-1 }
- { dist: trusty, env: PCP=4.0.1-1 }
- { dist: trusty, env: PCP=4.0.2-1 }
- { dist: trusty, env: PCP=4.1.0-1 }
- { dist: trusty, env: PCP=4.1.1-1 }
- { dist: trusty, env: PCP=4.1.3-1 }
- { dist: trusty, env: PCP=4.2.0-1 }
- { dist: trusty, env: PCP=4.3.0-1 }
- { dist: xenial, env: PCP= }
- { dist: xenial, env: PCP=3.11.2 }
- { dist: xenial, env: PCP=3.11.3 }
- { dist: xenial, env: PCP=3.11.4 }
- { dist: xenial, env: PCP=3.11.5 }
- { dist: xenial, env: PCP=3.11.6 }
- { dist: xenial, env: PCP=3.11.7 }
- { dist: xenial, env: PCP=3.11.8 }
- { dist: xenial, env: PCP=3.11.9 }
- { dist: xenial, env: PCP=3.11.10 }
- { dist: xenial, env: PCP=3.12.0 }
- { dist: xenial, env: PCP=3.12.1 }
- { dist: xenial, env: PCP=3.12.2 }
- { dist: xenial, env: PCP=4.0.0-1 }
- { dist: xenial, env: PCP=4.0.1-1 }
- { dist: xenial, env: PCP=4.0.2-1 }
- { dist: xenial, env: PCP=4.1.0-1 }
- { dist: xenial, env: PCP=4.1.1-1 }
- { dist: xenial, env: PCP=4.1.3-1 }
- { dist: xenial, env: PCP=4.2.0-1 }
- { dist: xenial, env: PCP=4.3.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,$3}''`'
- '[ -z "$PCP" ] || curl "https://bintray.com/user/downloadSubjectPublicKey?username=pcp" | sudo apt-key add -'
- '[ -z "$PCP" ] || echo "deb https://dl.bintray.com/pcp/$TRAVIS_DIST $TRAVIS_DIST 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'
- '[[ -z "$PCP" || $PCP_VERSION -le 31102 ]] || export PCP_PKGS="$PCP_PKGS,python3-pcp"'
- '[[ -z "$PCP" || $PCP_VERSION -ge 31103 ]] || export PCP_PKGS="$PCP_PKGS,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