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: | ||
| workflow_dispatch:workflow_dispatch: | ||
| pull_request: | ||
| branches: [main, master, develop] | ||
| paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake'] | ||
| push: | ||
| branches: [main, master, develop] | ||
| paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake'] | ||
| jobs: | ||
| cpp-linter: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-python@v6 | ||
| - name: Install dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y cmake ninja-build doxygen clang-tidy libglib2.0-dev | ||
| - name: Configure, build and test | ||
| run: cmake --workflow --preset default-develop | ||
| - uses: cpp-linter/cpp-linter-action@v2 | ||
| id: linter | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| database: ${{ github.workspace }}/build/default-develop | ||
| style: 'file' | ||
| # tidy-checks: '' | ||
| thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} | ||
| - name: Fail fast?! | ||
| if: steps.linter.outputs.checks-failed > 0 | ||
| run: exit 1 | ||