add cpp linter (clang-tidy) workflow #5
Workflow file for this run
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: cpp-linter | |
| on: | |
| pull_request: | |
| paths: ['**.cpp', '**.h', '**.hpp', '**CMakeLists.txt', '**.cmake', '.github/workflows/cpp-linter.yml'] | |
| jobs: | |
| cpp-linter: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: install Linux deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libsnappy-dev libzzip-dev zlib1g-dev libboost-all-dev | |
| - uses: actions/checkout@v5 | |
| - name: run cmake | |
| run: | | |
| cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON . | |
| - name: C/C++ Linter | |
| uses: cpp-linter/[email protected] | |
| id: linter | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| version: 21 | |
| database: build | |
| style: '' # disable clang-format checks. | |
| tidy-checks: '' # Use .clang-tidy config file. |