ci: Rewrite clang-tidy workflow(s) in a reusable manner - #7062
Conversation
There was a problem hiding this comment.
Pull request overview
Reworks the clang-tidy CI implementation to use a single reusable workflow with a dedicated reusable “determine changed files” workflow and a separate job for issue creation, aiming for clearer structure and reduced permissions.
Changes:
- Introduces
.github/workflows/determine-tidy-files.ymlto compute clang-tidy targets/flags based on changed files. - Rewrites
.github/workflows/reusable-clang-tidy.ymlto run clang-tidy directly (build/setup + run + artifact/issue-body generation) and split issue creation into a separate job. - Removes the older per-file reusable workflow and updates trigger workflows accordingly.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/reusable-clang-tidy.yml | Consolidates clang-tidy execution into one workflow, adds build/setup steps, artifacts, and a separate issue-creation job. |
| .github/workflows/reusable-clang-tidy-files.yml | Deleted legacy workflow previously responsible for running clang-tidy and optionally creating issues. |
| .github/workflows/determine-tidy-files.yml | New reusable workflow to detect changed C++/clang-tidy config files and output target lists. |
| .github/workflows/on-trigger.yml | Removes reference to deleted reusable-clang-tidy-files.yml. |
| .github/workflows/on-pr.yml | Removes reference to deleted reusable-clang-tidy-files.yml. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -6,8 +6,8 @@ Checks: "-*, | |||
| bugprone-assert-side-effect, | |||
| bugprone-bad-signal-to-kill-thread, | |||
| bugprone-bool-pointer-implicit-conversion, | |||
| bugprone-casting-through-void, | |||
There was a problem hiding this comment.
There are no actual new checks here, only the file is now sorted
This helps to launch the clang tidy workflow (I also checked that without changing this file, it's not actually launched; and changing only C++ files works as well)
646fbe5 to
6c1d41d
Compare
| @@ -176,4 +175,4 @@ jobs: | |||
| runs-on: ubuntu-latest | |||
| steps: | |||
| - name: Fail | |||
| run: false | |||
| run: exit 1 | |||
There was a problem hiding this comment.
This is the incorrect type, and my editor was complaining.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
13b65fe to
18fe09c
Compare
| .github/actions/generate-version/** | ||
| .github/actions/setup-conan/** | ||
| .github/scripts/strategy-matrix/** | ||
| .github/workflows/reusable-build.yml |
There was a problem hiding this comment.
This file and a few others don't exist (Copilot correctly complained), so I removed them in this PR, since I changed this list of files
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7062 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.0%
=========================================
Files 1010 1010
Lines 76033 76033
Branches 7375 7368 -7
=========================================
- Hits 62418 62411 -7
- Misses 13615 13622 +7 🚀 New features to boost your workflow:
|
|
This PR has conflicts, please resolve them in order for the PR to be reviewed. |
|
All conflicts have been resolved. Assigned reviewers can now start or resume their review. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This reverts commit 1b46943.
High Level Overview of Change
There are multiple improvements in this implementation:
determine-tidy-files.ymlis moved to XRPLF/actions. The reason I kept it a workflow and not an action - there is no way in GitHub to break execution of steps and return early. So, if it were an action, every subsequent step would have beenif: need_to_run.So, from the perspective of workflows, it's a rewrite.
Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)