[AIROCMLIR-197] Move C++ format/tidy checks to GitHub Actions#2356
[AIROCMLIR-197] Move C++ format/tidy checks to GitHub Actions#2356bogdan-petkovic wants to merge 25 commits into
Conversation
fcb2e9d to
ff2cfcf
Compare
73aed8e to
cb4015c
Compare
…ng on formatting Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
cb4015c to
d953156
Compare
|
@bogdan-petkovic can you review using AI agents first ? it is reporting some major problems |
@umangyadav I've assigned copilot for that |
There was a problem hiding this comment.
Pull request overview
This PR moves C/C++ diff-based clang-format and clang-tidy checks out of Jenkins and into GitHub Actions by introducing a dedicated cpp-static-checks job that runs the existing mlir/utils/jenkins/static-checks/premerge-checks.py inside the rocm/mlir:rocm7.2-latest container.
Changes:
- Add a new
cpp-static-checksGitHub Actions job to run diff-basedclang-formatandclang-tidychecks. - Generate and expose
compile_commands.jsonvia CMake configure (-DCMAKE_EXPORT_COMPILE_COMMANDS=ON) for the tidy-diff step. - Add caching for the
build/directory to reduce repeated CMake configure cost.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
…NER=1 Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
…time Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
Signed-off-by: bogdan-petkovic <bogdan.petkovic@htecgroup.com>
5053f03 to
6b9162c
Compare
|
| check_cxx_compiler_flag(-Wno-c++98-compat-extra-semi | ||
| CXX_SUPPORTS_NO_CXX98_COMPAT_EXTRA_SEMI_FLAG) | ||
| if (CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG) | ||
| if(CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG AND TARGET mlir_rocm_runtime) |
There was a problem hiding this comment.
Variable name mismatch: check_cxx_compiler_flag on line 47 stores its result in CXX_SUPPORTS_NO_CXX98_COMPAT_EXTRA_SEMI_FLAG (with _NO_), but this if checks CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG (without _NO_). The condition is therefore always false and -Wno-c++98-compat-extra-semi is never actually applied to mlir_rocm_runtime. The three sibling blocks below all use matching names, so this one stands out. Since this PR is already modifying this exact line to add the AND TARGET ... guard, please fix the typo here as well.
| if(CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG AND TARGET mlir_rocm_runtime) | |
| if(CXX_SUPPORTS_NO_CXX98_COMPAT_EXTRA_SEMI_FLAG AND TARGET mlir_rocm_runtime) |
|
Reviewed 2 files (.github/workflows/ci.yml; mlir/tools/rocmlir-tuning-driver/CMakeLists.txt). The new cpp-static-checks job correctly limits itself to pull_request events, uses a slash-free per-PR cache key, and validates git-clang-format presence before invoking premerge-checks.py — addressing the earlier reviewer concerns. Found 1 Major issue: a pre-existing variable-name typo on a line this PR is modifying makes one of the warning suppressions dead code. CI is green (C/C++ premerge checks passing). Verdict: COMMENT. |
Motivation
Move C/C++ formatting and diff-based clang-tidy checks out of Jenkins so GPU CI isn't blocked by style issues, and enforce these checks earlier/cheaper in GitHub Actions.
Technical Details
Test Plan
Test Result
Not run locally; relies on GitHub Actions and Jenkins pipeline execution after submission.
Submission Checklist