File: travis_script_linux_coverage

package info (click to toggle)
gpsbabel 1.7.0%2Bds-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 100,408 kB
  • sloc: cpp: 104,725; xml: 14,055; sh: 4,699; ansic: 2,062; makefile: 960; perl: 681; tcl: 138; javascript: 9
file content (24 lines) | stat: -rwxr-xr-x 942 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash -ex
#
# generate coverage report and upload to codacy

# extra ubuntu bionic packages: gcovr, openjdk-8-jre-headless, /usr/lib/jvm/java-8-openjdk-amd64/bin/java
# as of 6/18/2018 you must use java 8, see issue #76, #83 at https://github.com/codacy/codacy-coverage-reporter/issues
# as of 3/16/2019 with coverage reporter 4.0.3 java 8 is not required.

qmake
make coverage

# debug tokens
"$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"/ci_tokens

#!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# don't leak unhashed tokens!
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if [ -v CODACY_PROJECT_TOKEN ] ; then
  # upload coverate report to codacy.
  wget -nv -c https://github.com/codacy/codacy-coverage-reporter/releases/download/6.2.0/codacy-coverage-reporter-assembly-6.2.0.jar
  java -jar codacy-coverage-reporter-assembly-6.2.0.jar report -l cpp -f -r gpsbabel_coverage.xml
else
  echo "Skipping codacy coverage upload as CODACY_PROJECT_TOKEN is not set."
fi