Skip to content

Merge pull request #32 from pcolby/dependabot/github_actions/actions/… #75

Merge pull request #32 from pcolby/dependabot/github_actions/actions/…

Merge pull request #32 from pcolby/dependabot/github_actions/actions/… #75

Workflow file for this run

name: Static Analysis
on: [push, pull_request]
jobs:
CodeQL:
runs-on: ubuntu-latest
steps:
- name: Install Grantlee
run: sudo apt install libgrantlee5-dev
- uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp
- name: Build
run: |
cmake -D BUILD_CODEGEN=YES -S "$GITHUB_WORKSPACE" -B "$RUNNER_TEMP"
cmake --build "$RUNNER_TEMP" --target codegen QtAwsAcm QtAwsCore QtAwsS3 QtAwsS3Control QtAwsXRay
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Cppcheck:
runs-on: ubuntu-latest
steps:
- name: Install Cppcheck
run: sudo apt install cppcheck
- uses: actions/checkout@v4
- name: Perform Cppcheck Analysis
run: |
cppcheck -DQTAWS_SHARED -DQ_DECL_OVERRIDE=override -DQ_DECLARE_{FLAGS,PRIVATE,PUBLIC} \
--enable=all --error-exitcode=1 -Isrc --std={c++03,c++11} '--suppress=*:src/sqs-old/*' \
--suppress={missingIncludeSystem,unusedFunction} --suppress=no{CopyConstructor,OperatorEq} \
--quiet --xml --xml-version=2 {codegen/,}src 2> "$RUNNER_TEMP/cppcheck.xml"
- name: Generate Report
if: ${{ failure() }}
run: |
cppcheck-htmlreport --title=LibQtAws --file="$RUNNER_TEMP/cppcheck.xml" \
--report-dir="$RUNNER_TEMP/report" --source-dir="$GITHUB_WORKSPACE"
- name: Upload Report
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: Cppcheck HTML Report
path: "${{ runner.temp }}/report"