-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (51 loc) · 1.93 KB
/
coverity.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
name: Coverity Scan
on:
push:
branches:
- coverity_scan
schedule:
- cron: '17 4 */7 * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
COVERITY_SCAN_PROG_URL: https://scan.coverity.com/download/cxx/linux64
COVERITY_SCAN_PROJECT_NAME: sipwise/mediator
COVERITY_SCAN_NOTIFICATION_EMAIL: [email protected]
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Update APT cache
run: |
sudo apt-get update
- name: Get build dependencies
run: |
# note: debhelper v13 isn't available from ubuntu-20.04 yet, we need a backport
sudo apt-add-repository -y ppa:ubuntu-cloud-archive/yoga-staging
sudo apt-get install -q -y --no-install-recommends git ca-certificates curl
sudo apt-get build-dep -q -y .
- name: Get coverity scan
run: |
curl -o cov-analysis.tgz \
$COVERITY_SCAN_PROG_URL \
--form project=$COVERITY_SCAN_PROJECT_NAME \
--form token=$COVERITY_SCAN_TOKEN
tar xfz cov-analysis.tgz
# We need to disable glib deprecation warnings, as coverity-scan does
# not support __attributes__ in enums.
- name: Analyze
run: |
CPPFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS" \
cov-analysis-*/bin/cov-build --dir cov-int make -j4
- name: Submit result
run: |
tar cfz cov-int.tar.gz cov-int
curl \
https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME \
--form token=$COVERITY_SCAN_TOKEN \
--form email=$COVERITY_SCAN_NOTIFICATION_EMAIL \
--form [email protected] \
--form version="`git describe --tags`" \
--form description="`git describe --tags` / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"