-
Notifications
You must be signed in to change notification settings - Fork 66
45 lines (38 loc) · 1.46 KB
/
coverity.yml
File metadata and controls
45 lines (38 loc) · 1.46 KB
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
name: Coverity
on:
workflow_dispatch:
jobs:
coverity:
name: Run Coverity Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential wget
- name: Download Coverity Build Tool
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=Argtable3" -O coverity_tool.tgz
tar xzf coverity_tool.tgz
export COV_DIR=$(find . -type d -name 'cov-analysis*' | head -n 1)
echo "COV_DIR=$COV_DIR" >> $GITHUB_ENV
- name: Build with Coverity
run: |
mkdir build && cd build
cmake ..
cd ..
$COV_DIR/bin/cov-build --dir cov-int cmake --build build
- name: Create tarball
run: tar czf cov-int.tgz cov-int
- name: Submit to Coverity Scan
env:
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }}
run: |
curl --form token=$COVERITY_TOKEN \
--form email=${{ secrets.COVERITY_EMAIL }} \
--form file=@cov-int.tgz \
--form version="$(date +'%Y-%m-%d')-$(git rev-parse --short HEAD)" \
--form description="GitHub Actions Coverity Scan" \
https://scan.coverity.com/builds?project=Argtable3