Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cppcheck github workflow #207

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: cppcheck-action-test
on:
pull_request:

jobs:
build:
name: cppcheck-test
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
checks: write
security-events: write
steps:
- uses: actions/checkout@v4

- name: install-deps
run: sudo apt install libyaml-cpp-dev libatasmart-dev cmake libsensors4-dev cppcheck
- name: build
run: |
mkdir build
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE:STRING=Debug -DUSE_ATASMART:BOOL=ON
cmake --build build

- name: cppcheck
uses: deep5050/cppcheck-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# enable: all
# other_options: --addon=threadsafety.py --project=build/compile_commands.json -ibuild

- name: publish report
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'master'
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore the build directory
build/

# Ignore cppcheck artifacts
*.ctu-info

# Ignore ctags file
tags
Loading