Skip to content

Create CodeChecker.yml #11

Create CodeChecker.yml

Create CodeChecker.yml #11

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Run static code analysis
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "sast"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: CodeChecker Static Analysis
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
steps:
# Check YOUR project out!
- name: "Check out repository"
uses: actions/checkout@v4
# Prepare a build
- name: "Prepare build"
run: |
mkdir -p Build
cd Build
cmake ../Source/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# Run the analysis
- uses: whisperity/codechecker-analysis-action@v1
id: codechecker
with:
build-command: "cd ${{ github.workspace }}/Build; cmake --build ."
# Upload the results to the CI.
- uses: actions/upload-artifact@v4
with:
name: "CodeChecker Bug Reports"
path: ${{ steps.codechecker.outputs.result-html-dir }}