Add static analysis workflow #19
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", "master" ] | |
schedule: | |
- cron: '0 0 * * *' | |
pull_request: | |
branches: '*' | |
jobs: | |
codechecker: | |
name: CodeChecker | |
runs-on: ubuntu-latest | |
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: whisperity/codechecker-analysis-action@v1 | |
id: codechecker | |
with: | |
ctu: true | |
logfile: ${{ github.workspace }}/build/compile_commands.json | |
config: ${{ github.workspace }}/.codechecker.json | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "CodeChecker Bug Reports" | |
path: ${{ steps.codechecker.outputs.result-html-dir }} | |
- name: Fail if a warning is found | |
if: ${{ steps.codechecker.outputs.warnings == 'true' }} | |
run: exit 1 |