Skip to content

Commit 02d518f

Browse files
authored
CI: add coverity scan scheduled (#5940)
1 parent 5120105 commit 02d518f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/coverity.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
name: Coverity
3+
4+
on:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
scan:
13+
runs-on: ubuntu-latest
14+
if: ${{ github.repository_owner == 'danmar' }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install missing software on ubuntu
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev libboost-container-dev
21+
- name: Download Coverity build tool
22+
run: |
23+
wget -c -N https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=cppcheck" -O coverity_tool.tar.gz
24+
mkdir coverity_tool
25+
tar xzf coverity_tool.tar.gz --strip 1 -C coverity_tool
26+
- name: Build with Coverity build tool
27+
run: |
28+
export PATH=`pwd`/coverity_tool/bin:$PATH
29+
cov-build --dir cov-int make
30+
- name: Submit build result to Coverity Scan
31+
run: |
32+
tar czvf cov.tar.gz cov-int
33+
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
34+
35+
36+
--form version="Commit $GITHUB_SHA" \
37+
--form description="Development" \
38+
https://scan.coverity.com/builds?project=cppcheck

0 commit comments

Comments
 (0)