-
Notifications
You must be signed in to change notification settings - Fork 88
46 lines (34 loc) · 1.14 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
name: Static Analysis
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake python3-pip jq cppcheck
pip3 install codechecker requests
CodeChecker analyzers --details
- name: generate compile commands
run: bazel build //:iso14229 && bazel run //:lib_compile_commands
- name: Analyze with CodeChecker
run: |
CodeChecker analyze compile_commands.json --ignore .CodeChecker/skipfile.txt -o reports
- name: Print report summary
run: |
CodeChecker parse reports || true
- name: Generate json report
run: |
CodeChecker parse reports --export json -o report.json || true
- name: Create Check Run with Annotations
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
python3 .CodeChecker/post_to_github.py report.json