Skip to content

Static analysis

Static analysis #4

name: Static Analysis
on:
push:
branches: [ "main" ]
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
pip install --upgrade pip
pip install codechecker
- name: generate compile commands
run: bazel build //:iso14229 && bazel run //:lib_compile_commands
- name: Analyze with CodeChecker
run: |
CodeChecker analyze compile_commands.json -o reports
- name: Generate HTML report
run: |
CodeChecker parse reports --export html -o html_report
- name: Deploy HTML to GH Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: html_report
publish_branch: gh-pages