Skip to content

Commit

Permalink
testing diff action
Browse files Browse the repository at this point in the history
  • Loading branch information
gdifiore committed Apr 30, 2024
1 parent 6552e45 commit 3a6358f
Showing 1 changed file with 49 additions and 18 deletions.
67 changes: 49 additions & 18 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
name: cppcheck
name: Static analysis w/ cppcheck

on:
# Will run on push when merging to 'branches'. The output will be shown in the console
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches:
- develop
- master
- main

# 'pull_request_target' allows this Action to also run on forked repositories
# The output will be shown in PR comments (unless the 'force_console_print' flag is used)
pull_request_target:
branches:
- "*"

jobs:
build:
name: cppcheck-test
static_analysis:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: cppcheck
uses: deep5050/cppcheck-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: publish report
uses: mikeal/publish-to-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: 'main' # your branch name goes here
- uses: actions/checkout@v2

- name: setup init_script
shell: bash
run: |
echo "#!/bin/bash
# Input args provided by StaticAnalysis action
root_dir=\${1}
build_dir=\${2}
echo \"Hello from the init script! First arg=\${root_dir} second arg=\${build_dir}\"
add-apt-repository ppa:oibaf/graphics-drivers
apt update && apt upgrade
apt install -y libvulkan1 mesa-vulkan-drivers vulkan-utils" > init_script.sh
- name: Run static analysis
uses: JacobDomagala/StaticAnalysis@master
with:
language: c++

use_cmake: true

# Additional apt packages that need to be installed before running Cmake
#apt_pckgs: software-properties-common libglu1-mesa-dev freeglut3-dev mesa-common-dev

# Additional script that will be run (sourced) AFTER 'apt_pckgs' and before running Cmake
#init_script: init_script.sh

# (Optional) clang-tidy args
clang_tidy_args: -checks='*,fuchsia-*,google-*,zircon-*,abseil-*,modernize-use-trailing-return-type'

# (Optional) cppcheck args
cppcheck_args: --enable=all --suppress=missingInclude

0 comments on commit 3a6358f

Please sign in to comment.