Skip to content

Commit

Permalink
Split clang tidy workflow in review + post
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Feb 27, 2024
1 parent 4ea8431 commit c050bfb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- '**.cpp'
- '**.h'
- '.github/workflows/clang_tidy.yml'

permissions:
contents: read

jobs:
review:
runs-on: ubuntu-latest
Expand All @@ -15,9 +19,9 @@ jobs:
- uses: ZedThree/clang-tidy-review@v0.17.1
id: review
with:
token: ${{ secrets.CLANG_TIDY_TOKEN }}
build_dir: build
config_file: .clang-tidy
split_workflow: true
apt_packages: |
libc++-dev, libc++abi-dev, libpixman-1-dev,
libfreetype6-dev, libharfbuzz-dev, zlib1g-dev, libx11-dev,
Expand All @@ -26,5 +30,3 @@ jobs:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DLAF_BACKEND=none -DCMAKE_EXPORT_COMPILE_COMMANDS=on
- uses: ZedThree/clang-tidy-review/upload@v0.17.1
id: upload-review
- if: steps.review.outputs.total_comments > 0
run: exit 1
18 changes: 18 additions & 0 deletions .github/workflows/clang_tidy_post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Post Clang Tidy Comments
on:
workflow_run:
workflows: ["Clang Tidy Diff"]
types:
- completed

permissions:
checks: write
pull-requests: write

jobs:
post-comments:
runs-on: ubuntu-latest
steps:
- uses: ZedThree/clang-tidy-review/post@v0.17.1
with:
token: ${{ secrets.CLANG_TIDY_TOKEN }}

0 comments on commit c050bfb

Please sign in to comment.