-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use clang-tidy action to push comments to the PR.
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Post clang-tidy review comments | ||
|
||
on: | ||
workflow_run: | ||
# The name field of the lint action .github/workflows/clang-tidy-run.yml | ||
workflows: ["clang-tidy-review"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ZedThree/clang-tidy-review/[email protected] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: clang-tidy-review | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create Cache Timestamp | ||
id: cache_timestamp | ||
uses: nanzm/[email protected] | ||
with: | ||
format: 'YYYY-MM-DD-HH-mm-ss' | ||
|
||
- name: Retrieve cached results | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
/root/.cache/clang-tidy | ||
/root/.cache/bazel | ||
key: clang-tidy-${{ steps.cache_timestamp.outputs.time }} | ||
restore-keys: clang-tidy- | ||
- name: Make compilation DB | ||
run: | | ||
export USE_BAZEL_VERSION=6.5.0 | ||
.github/bin/make-compilation-db.sh | ||
- name: Create clang-tidy review | ||
id: clang-tidy-review | ||
uses: ZedThree/[email protected] | ||
with: | ||
split_workflow: true # Post comments separately | ||
clang_tidy_version: 17 | ||
config_file: .clang-tidy | ||
|
||
- uses: ZedThree/clang-tidy-review/[email protected] |
This file contains 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