[1.0.3] fix HSM debug log generation #88
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
name: "SCA: MISRA-C-2012" | |
# TODO: run only on successfull builds | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
sca-misra: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install cppcheck | |
uses: awalsh128/[email protected] | |
with: | |
packages: cppcheck | |
version: 1.0 | |
- name: Build project | |
uses: ./.github/workflows/build_helper | |
with: | |
build_type: ${{env.BUILD_TYPE}} | |
src_dir: ${{github.workspace}} | |
build_dir: ${{github.workspace}}/build | |
platform: 'posix' | |
build_tests: 'OFF' | |
build_examples: 'ON' | |
- name: Run MISRA check | |
run: | | |
cppcheck --addon=${{github.workspace}}/scripts/cppcheck/misra.json \ | |
--enable=warning,performance,portability,information \ | |
--inline-suppr \ | |
--xml \ | |
--suppressions-list=${{github.workspace}}/scripts/cppcheck/cppcheck_suppress.txt \ | |
--project=${{github.workspace}}/build/compile_commands.json \ | |
-DSTL_AVAILABLE -D__GNU__=1 -D__LITTLE_ENDIAN__ -D__GNUC__ 2> ${{github.workspace}}/sca_misra.txt | |
- name: Validate cppcheck report | |
run: | | |
${{github.workspace}}/scripts/cppcheck/cppcheck_review.py ${{github.workspace}}/sca_misra.txt |