Static analysis #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 --ignore .CodeChecker/skipfile.txt -o reports | |
- name: Generate HTML report | |
run: | | |
CodeChecker parse reports --export html -o html_report | |
continue-on-error: true | |
- 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 |