-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (67 loc) · 3.05 KB
/
build_and_analyze.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
name: Build and Static Analysis
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch updates
run: sudo apt-get update && sudo apt-get upgrade
- name: Install OpenGL
run: sudo apt-get install libglu1-mesa-dev mesa-common-dev
- name: Install X virtual framebuffer
run: sudo apt-get install xvfb
- name: Build debug config
run: |
cmake -B ${{github.workspace}}/Build_Debug -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-g"
cmake --build ${{github.workspace}}/Build_Debug -j
- name: Run GreenWorld_Debug
working-directory: ${{github.workspace}}/Build_Debug
run: xvfb-run -a ./GreenWorld & sleep 20 ; kill $!
- name: Run CellSim_Debug
working-directory: ${{github.workspace}}/Build_Debug
run: xvfb-run -a ./CellSim & sleep 20 ; kill $!
- name: Run Liquefied_Debug
working-directory: ${{github.workspace}}/Build_Debug
run: xvfb-run -a ./Liquefied & sleep 20 ; kill $!
- name: Build release config
run: |
cmake -B ${{github.workspace}}/Build_Release -D CMAKE_BUILD_TYPE=Release -D CMAKE_CXX_FLAGS="-O3 -Wno-unused-but-set-variable -Wno-unused-result"
cmake --build ${{github.workspace}}/Build_Release -j
- name: Run GreenWorld_Release
working-directory: ${{github.workspace}}/Build_Release
run: xvfb-run -a ./GreenWorld & sleep 20 ; kill $!
- name: Run CellSim_Release
working-directory: ${{github.workspace}}/Build_Release
run: xvfb-run -a ./CellSim & sleep 20 ; kill $!
- name: Run Liquefied_Release
working-directory: ${{github.workspace}}/Build_Release
run: xvfb-run -a ./Liquefied & sleep 20 ; kill $!
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pvs tools
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-get update && sudo apt-get upgrade
sudo apt-get install libglu1-mesa-dev mesa-common-dev
sudo apt-get install pvs-studio
pvs-studio-analyzer credentials ${{secrets.PVS_STUDIO_CREDENTIALS}}
- name: Build debug config
run: |
cmake -B ${{github.workspace}}/Build_Debug_PVS -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="-g" -D CMAKE_EXPORT_COMPILE_COMMANDS=On
cmake --build ${{github.workspace}}/Build_Debug_PVS -j
- name: Analyze debug config
run: |
pvs-studio-analyzer analyze -f ${{github.workspace}}/Build_Debug_PVS/compile_commands.json -j -e Vendor/
- name: Convert report
run: plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log
- name: Publish report
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: pvs-report.sarif
category: PVS-Studio