Skip to content

fix(ci): fix clang-tidy-pr-comments workflow trigger#12436

Merged
xmfcx merged 3 commits intomainfrom
fix/clang-tidy-pr-comments
Apr 9, 2026
Merged

fix(ci): fix clang-tidy-pr-comments workflow trigger#12436
xmfcx merged 3 commits intomainfrom
fix/clang-tidy-pr-comments

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Apr 8, 2026

  • Parent Issue: fix(ci): resolve clang-tidy failures on main branch #12431
  • Fix the workflow_run trigger in the automatic workflow: was listening for build-and-test-differential (a reusable workflow_call workflow that never fires workflow_run events), changed to build-test-tidy-pr (the actual top-level PR workflow)
  • Apply the same cleanup to the manual workflow: remove rosdistro matrix, widen artifact pattern to clang-tidy-result-*, update description text, bump to ubuntu-latest and actions/checkout@v6

Why

The automatic clang-tidy PR comment annotations were silently broken because workflow_run only fires for top-level workflows, not reusable ones. This fix restores the trigger so clang-tidy suggestions are posted as inline review comments on PRs. The manual workflow is updated in parallel to stay consistent.


Test plan

  • Open a PR with a C++ change that triggers a clang-tidy suggestion
  • Confirm build-test-tidy-pr runs to completion
  • Confirm clang-tidy suggestions appear as inline review comments on the PR (tested via manual workflow from PR branch)
  • Check Actions tab: clang-tidy-pr-comments should appear with trigger workflow_run after build-test-tidy-pr completes

Note: The automatic workflow_run trigger (clang-tidy-pr-comments) can only be tested after this PR is merged, because GitHub evaluates workflow_run triggers from the default branch. The manual workflow (clang-tidy-pr-comments-manually) was successfully tested from the PR branch.

Changed files:

The workflow was listening for `build-and-test-differential` which is a
reusable workflow (workflow_call). The workflow_run trigger only fires
for top-level workflows. Changed to `build-test-tidy-pr` which is the
actual top-level PR workflow.

Also modernized the workflow: removed the rosdistro matrix (no longer
needed), updated to ubuntu-latest and actions/checkout@v6, and made
artifact pattern rosdistro-agnostic.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx self-assigned this Apr 8, 2026
@github-actions github-actions bot added the type:ci Continuous Integration (CI) processes and testing. (auto-assigned) label Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx xmfcx added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Apr 8, 2026
…kflow

This commit will be reverted once the clang-tidy-pr-comments workflow
is confirmed working.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx marked this pull request as draft April 8, 2026 15:02
@github-actions github-actions bot added the component:simulation Virtual environment setups and simulations. (auto-assigned) label Apr 8, 2026
github-actions[bot]

This comment was marked as outdated.

@autowarefoundation autowarefoundation deleted a comment from github-actions bot Apr 8, 2026
@xmfcx
Copy link
Copy Markdown
Contributor Author

xmfcx commented Apr 8, 2026

Test

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

{
std::string value = "test";
auto moved = std::move(value);
return value; // bugprone-use-after-move
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bugprone-use-after-move
value used after it was moved

@xmfcx
Copy link
Copy Markdown
Contributor Author

xmfcx commented Apr 8, 2026

…ents workflow"

This reverts commit fe0efa7.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@github-actions github-actions bot removed the component:simulation Virtual environment setups and simulations. (auto-assigned) label Apr 8, 2026
@xmfcx xmfcx requested a review from mitsudome-r April 8, 2026 16:03
@xmfcx xmfcx marked this pull request as ready for review April 8, 2026 16:03
@xmfcx xmfcx merged commit 9267b2f into main Apr 9, 2026
38 checks passed
@xmfcx xmfcx deleted the fix/clang-tidy-pr-comments branch April 9, 2026 07:12
@github-project-automation github-project-automation bot moved this from To Triage to Done in Software Working Group Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:ci Continuous Integration (CI) processes and testing. (auto-assigned)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants