Skip to content

Commit

Permalink
Merge pull request #258 from BishrutSubedi/biss/add_clangtidy12
Browse files Browse the repository at this point in the history
Add clang-tidy in CI
  • Loading branch information
gregmedd authored Aug 8, 2024
2 parents f02105f + 3638d93 commit 910bc9d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [ "main", "v1.0_up-v1.6.0" ]
pull_request:
branches: ["**"]

permissions:
contents: read

jobs:
build:
Expand Down Expand Up @@ -379,6 +382,9 @@ jobs:
name: Lint C++ sources
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
pull-requests: read

steps:
- name: Get build commands
Expand Down Expand Up @@ -410,7 +416,14 @@ jobs:
with:
path: up-cpp

- name: Get build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: up-cpp/build/Release

- name: Run linters on source
continue-on-error: true
id: source-linter
uses: cpp-linter/cpp-linter-action@v2
env:
Expand All @@ -420,9 +433,10 @@ jobs:
ignore: 'test'
style: 'file' # read .clang-format for configuration
tidy-checks: '' # Read .clang-tidy for configuration
database: compile_commands.json
database: build/Release/compile_commands.json

- name: Run linters on tests
continue-on-error: true
id: test-linter
uses: cpp-linter/cpp-linter-action@v2
env:
Expand All @@ -432,7 +446,7 @@ jobs:
ignore: 'src|include'
style: 'file' # read .clang-format for configuration
tidy-checks: '' # Read .clang-tidy for configuration
database: compile_commands.json
database: build/Release/compile_commands.json

- name: Report lint failure
if: steps.source-linter.outputs.checks-failed > 0 || steps.test-linter.outputs.checks-failed > 0
Expand Down

0 comments on commit 910bc9d

Please sign in to comment.