-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (47 loc) · 1.55 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
name: "Coverity"
on:
schedule:
- cron: '0 1 * * 0'
permissions:
contents: read
jobs:
analyze:
name: Analyze
if: github.repository == 'Nordix/hiredis-cluster'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-depth: 1
- name: Download Coverity
run: |
cd ..
wget -q https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_TOKEN}&project=hiredis-cluster" -O coverity_tool.tgz
mkdir coverity
tar xzf coverity_tool.tgz --strip 1 -C coverity
echo "$(pwd)/coverity/bin" >> $GITHUB_PATH
env:
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }}
- name: Prepare
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
with:
packages: libevent-dev cmake
version: 1.0
- name: Build with Coverity
run: |
mkdir build; cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_SSL=ON ..
cov-build --dir cov-int make
- name: Submit the result to Coverity
run: |
tar czvf hiredis_cluster.tgz cov-int
curl \
--form token=${COVERITY_TOKEN} \
--form [email protected] \
--form file=@hiredis_cluster.tgz \
--form version=${GITHUB_SHA} \
https://scan.coverity.com/builds?project=hiredis-cluster
working-directory: build
env:
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }}