-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiprocessing support to ament_clang_tidy #288
Conversation
Signed-off-by: Miaofei <miaofei@amazon.com>
Signed-off-by: Miaofei <miaofei@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this locally and it greatly speeds up using ament_clang_tidy.
I would like that, but it's not my call. From my understanding, GitHub Actions now supports macOS and Windows, which is good. It would probably be hard to make GitHub Actions support building and testing a arbitrary collection of ROS packages that depend on each other. This may be acceptable for the |
I think this is actually fairly doable using https://github.com/ros-industrial/industrial_ci If you'd like I can try to create a PR to do this. Can you point me to how the CI on jenkins is configured? Caveat I wouldn't know the least bit about how to go about doing this on Windows/MacOS even though github actions support those platforms. |
I don't mind. But it would probably take convincing more than a couple of people at OSRF to move PR CI testing from Jenkins to GitHub Actions. If you follow the link in the badges (for example, https://ci.ros2.org/job/ci_linux/13454/), it shows the repos file, the Ubuntu distro, ROS distro, OSRF does require testing on Windows and macOS before merging. So while GitHub Actions does support Windows and macOS, ROS Industrial's CI might not. |
On topic, this looks like it needs to be rebased for the doc change. I'm looking forward to using this feature. I'm curious if you have any idea how it could be used from colcon/cmake. Do linters already run in parallel when launched from colcon (once thread project up to system threads or -j option)? |
Signed-off-by: Miaofei <miaofei@amazon.com> # Conflicts: # ament_clang_tidy/doc/index.rst
@claireyywang, would you mind reviewing this PR, too? I think it is a highly sought after feature :) |
I am not familiar with how
What that number should be passed in should probably be dynamically determined by CMake or make , so that when you're building multiple packages in parallel, you don't get a massive number of clang-tidy processes spawned.
I think |
@claireyywang, friendly ping. Or if you could get another maintainer to take a look. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This can speedup the amount of time
ament_clang_tidy
spends analyzing/linting packages.Without this change:
With this change, using 1 job (default):
See log_1cpu.txt for
With this change, using 4 parallel jobs:
The attached log files also show that analysis results have not changed:
log_base.txt
log_1cpu.txt
log_4cpu.txt