-
Notifications
You must be signed in to change notification settings - Fork 37
89 lines (81 loc) · 3.78 KB
/
periodic-coverity-scan.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
name: Coverity Scan
on:
workflow_dispatch:
schedule:
- cron: '0 14 * * 1'
jobs:
scan:
environment: CoverityScan
name: Coverity Scan
runs-on: ubuntu-20.04
steps:
- name: Clone Atheme source code repository
uses: actions/checkout@v2
with:
ref: master
repository: 'atheme/atheme'
submodules: recursive
- name: Update Atheme contrib submodule
run: |
cd modules/contrib/
git checkout master
git pull
echo -n $(git rev-parse --short=20 HEAD) > /tmp/version.txt
cd ../../
- name: Install dependencies
working-directory: /tmp
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
curl \
gcc \
git \
libargon2-0-dev \
libcrack2-dev \
libgcrypt20-dev \
libidn11-dev \
libldap2-dev \
libpasswdqc-dev \
libpcre3-dev \
libqrencode-dev \
libsodium-dev \
libssl-dev \
# EOF
- name: Download Coverity Scan
env:
COVERITY_SCAN_PROJECT: ${{ secrets.COVERITY_SCAN_PROJECT }}
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
mkdir -p "${HOME}/utils"
curl \
--form "project=${COVERITY_SCAN_PROJECT}" \
--form "token=${COVERITY_SCAN_TOKEN}" \
'https://scan.coverity.com/download/cxx/linux64' | tar -C "${HOME}/utils/" -xz
- name: Run Coverity Scan
run: |
export PATH="${PATH}:$(find "${HOME}/utils/" -mindepth 1 -maxdepth 1 -type d -name 'cov-analysis-*')/bin"
hash -r
which cov-build
./configure \
--prefix="${HOME}/atheme-build" \
--disable-heap-allocator \
--enable-contrib \
--without-libmowgli \
--with-digest-api-frontend=internal \
--with-rng-api-frontend=internal
cov-build --dir cov-int make
tar czf /tmp/cov-int.tgz cov-int/
- name: Submit scan results
env:
COVERITY_SCAN_PROJECT: ${{ secrets.COVERITY_SCAN_PROJECT }}
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
curl \
--form 'description=GitHub Actions Job (Master Branch)' \
--form '[email protected]' \
--form 'file=@/tmp/cov-int.tgz' \
--form "project=${COVERITY_SCAN_PROJECT}" \
--form "token=${COVERITY_SCAN_TOKEN}" \
--form 'version=</tmp/version.txt' \
'https://scan.coverity.com/builds'