-
-
Notifications
You must be signed in to change notification settings - Fork 163
58 lines (48 loc) · 1.4 KB
/
static-analysis.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
name: "Static Analysis"
on:
push:
branches: [ "main", "master" ]
schedule:
- cron: '0 0 * * *'
pull_request:
branches: '*'
jobs:
codechecker:
name: CodeChecker
# Use latest Ubuntu 24.04 for latest GCC.
# CodeChecker requires gcc >= 13.0.0.
# ubuntu-latest is ubuntu 22.04 (atm)
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Deps, Configure and Build
run: |
./.github/workflows/codeql-buildscript.sh
- name: Run CodeChecker
uses: ardera/CodeChecker-Action@master
id: codechecker
with:
ctu: true
logfile: ${{ github.workspace }}/build/compile_commands.json
config: ${{ github.workspace }}/.codechecker.json
- uses: actions/upload-artifact@v4
id: upload
with:
name: "CodeChecker Bug Reports"
path: ${{ steps.codechecker.outputs.result-html-dir }}
- name: Fail on Warnings
if: ${{ steps.codechecker.outputs.warnings == 'true' }}
run: |
cat <<EOF >>$GITHUB_STEP_SUMMARY
## ⚠️ CodeChecker found warnings
Please see the 'CodeChecker Bug Reports' artifact for more details:
- ${{ steps.upload.outputs.artifact-url }}
EOF
exit 1