]>
Commit | Line | Data |
---|---|---|
b32b8144 FG |
1 | #! /bin/bash |
2 | # | |
11fdf7f2 | 3 | # Copyright 2017 James E. King III |
b32b8144 FG |
4 | # Distributed under the Boost Software License, Version 1.0. |
5 | # (See accompanying file LICENSE_1_0.txt or copy at | |
6 | # http://www.boost.org/LICENSE_1_0.txt) | |
7 | # | |
8 | # Bash script to run in travis to perform a Coverity Scan build | |
9 | # To skip the coverity integration download (which is huge) if | |
10 | # you already have it from a previous run, add --skipdownload | |
11 | # | |
12 | ||
13 | # | |
14 | # Environment Variables | |
15 | # | |
16 | # COVERITY_SCAN_NOTIFICATION_EMAIL - email address to notify | |
17 | # COVERITY_SCAN_TOKEN - the Coverity Scan token (should be secure) | |
18 | # SELF - the boost libs directory name | |
19 | ||
20 | set -ex | |
21 | ||
22 | pushd /tmp | |
23 | if [[ "$1" != "--skipdownload" ]]; then | |
24 | rm -rf coverity_tool.tgz cov-analysis* | |
25 | wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=boostorg/$SELF" -O coverity_tool.tgz | |
26 | tar xzf coverity_tool.tgz | |
27 | fi | |
28 | COVBIN=$(echo $(pwd)/cov-analysis*/bin) | |
29 | export PATH=$COVBIN:$PATH | |
30 | popd | |
31 | ||
32 | ci/build.sh clean | |
33 | rm -rf cov-int/ | |
34 | cov-build --dir cov-int ci/build.sh | |
35 | tar cJf cov-int.tar.xz cov-int/ | |
36 | curl --form token="$COVERITY_SCAN_TOKEN" \ | |
37 | --form email="$COVERITY_SCAN_NOTIFICATION_EMAIL" \ | |
38 | --form file=@cov-int.tar.xz \ | |
39 | --form version="$(git describe --tags)" \ | |
40 | --form description="boostorg/$SELF" \ | |
41 | https://scan.coverity.com/builds?project="boostorg/$SELF" | |
42 |