Merge pull request #14 from mad201802/feature/fix-sequence-counter #33
This file contains hidden or 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: Static Analysis | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: static-analysis-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| cppcheck: | |
| name: cppcheck | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install cppcheck | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y --no-install-recommends cppcheck | |
| - name: Run cppcheck | |
| run: | | |
| cppcheck \ | |
| --enable=all \ | |
| --std=c++17 \ | |
| --language=c++ \ | |
| --error-exitcode=1 \ | |
| --suppress=missingIncludeSystem \ | |
| --suppress=unusedFunction \ | |
| --inline-suppr \ | |
| -I include \ | |
| include/ 2>&1 | tee cppcheck-report.txt | |
| - name: Upload cppcheck report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cppcheck-report | |
| path: cppcheck-report.txt | |
| retention-days: 7 | |
| clang-tidy: | |
| name: clang-tidy | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install clang-tidy | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y --no-install-recommends \ | |
| clang-18 clang-tidy-18 | |
| - name: Configure (generate compile_commands.json) | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
| -DBUILD_TESTING=OFF \ | |
| -DCMAKE_CXX_COMPILER=clang++-18 | |
| - name: Run clang-tidy | |
| run: | | |
| find include -name '*.hpp' | xargs \ | |
| clang-tidy-18 \ | |
| --config-file=.clang-tidy \ | |
| -p build \ | |
| --warnings-as-errors='*' 2>&1 | tee clang-tidy-report.txt | |
| - name: Upload clang-tidy report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clang-tidy-report | |
| path: clang-tidy-report.txt | |
| retention-days: 7 |