[PYTHON/RECCMP] Create setup script and re-structure reccmp setup #18
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
| # Taken mostly from https://cpp-linter.github.io/cpp-linter-action/examples/ | |
| name: cpp-linter | |
| on: | |
| pull_request: | |
| branches: [main] | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake'] | |
| push: | |
| branches: [main] | |
| paths: ['**.c', '**.cpp', '**.h', '**.hpp', '**.cxx', '**.hxx', '**.cc', '**.hh', '**CMakeLists.txt', 'meson.build', '**.cmake'] | |
| jobs: | |
| cpp-linter: | |
| # only run on non-draft PRs, this will skip the job for drafts and report success, but drafts can not be merged anyway | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # ... optionally setup build env to create a compilation database | |
| - uses: cpp-linter/cpp-linter-action@v2 | |
| id: linter | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| version: 21 # default is 18 | |
| style: 'file' # Use .clang-format config file. | |
| tidy-checks: '-*' # disable clang-tidy checks. | |
| # only 'update' a single comment in a pull request's thread. | |
| thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} | |
| # disable file annotations, the thread comment should be the response | |
| file-annotations: false | |
| - name: Fail fast?! | |
| if: steps.linter.outputs.checks-failed > 0 | |
| run: exit 1 |