-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (47 loc) · 1.54 KB
/
pvs-studio.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
name: pvs-studio
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
PVS-Studio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: |
sudo apt install gcc-11
sudo apt install g++-11
- name: installing pvs-studio
run: |
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt \
| sudo apt-key add -
sudo wget -O /etc/apt/sources.list.d/viva64.list \
https://files.pvs-studio.com/etc/viva64.list
sudo apt update
sudo apt install pvs-studio
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }}
- name: get cmake
uses: lukka/get-cmake@latest
with:
useLocalCache: true
useCloudCache: false
cmakeVersion: "3.27.0"
- name: run build
run: |
cd ${{ github.workspace }}
mkdir -p builds
cmake -S . -B builds -DIS_CI_BUILD="true" -DCMAKE_EXPORT_COMPILE_COMMANDS=On
cmake --build builds
- name: run pvs studio
run: |
pvs-studio-analyzer analyze -f builds/compile_commands.json -j -e include -e docs -e assets -e test_games
- name: convert pvs studio report
run: |
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
- name: publish pvs studio report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: pvs-report.sarif
category: PVS-Studio