Actions: Run Cppcheck on repository.

This commit is contained in:
imi415 2021-07-27 05:22:39 +00:00
parent 99914fe090
commit 718f37f262
1 changed files with 28 additions and 0 deletions

28
.github/workflows/cppcheck.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
name: "Run Cppcheck on repository"
on:
push:
branches: ["master"]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: "Update package cache"
run: "sudo apt-get update"
- name: "Setup dependencies"
run: "sudo apt-get -y install build-essential cmake cppcheck"
env:
DEBIAN_FRONTEND: "noninteractive"
- name: "Checkout repository"
uses: "actions/checkout@v2"
with:
submodules: "true"
- name: "Create build directory"
run: "mkdir build"
- name: "Configure cmake"
run: "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=yes .."
working-directory: "build"
- name: "Run Cppcheck"
run: "cppcheck --project=compile_commands.json"
working-directory: "build"