forked from alandefreitas/moderncpp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
250eb7d
commit 270db54
Showing
1 changed file
with
16 additions
and
49 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,23 @@ | ||
name: Static analysis | ||
name: Flawfinder Analysis | ||
|
||
on: push | ||
# Will run on push when merging to 'branches'. The output will be shown in the console | ||
# push | ||
|
||
# '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: | ||
# - "*" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
static_analysis: | ||
flawfinder-analysis: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- 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 | ||
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | apt-key add - | ||
wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list http://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list | ||
apt update && apt upgrade -y | ||
apt install -y libvulkan1 mesa-vulkan-drivers vulkan-tools" > init_script.sh | ||
- name: Run static analysis | ||
uses: JacobDomagala/StaticAnalysis@master | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
language: c++ | ||
|
||
# Exclude any issues found in ${Project_root_dir}/lib | ||
exclude_dir: lib | ||
|
||
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 | ||
python-version: '3.x' | ||
- name: Install Flawfinder | ||
run: pip install flawfinder | ||
- name: Run Flawfinder | ||
run: flawfinder ./ |