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 GitHub actions for linting and source-build CI #178
Conversation
MacOS and Windows have been a bit flaky. We're still running them in nodl, and MacOS passes, but Windows consistently fails due to Fast RTPS not building. We only require Linux to pass given the flakiness. |
Oh nice. Do your tests run any ROS Nodes or are they just pure python tests not relying on a running ROS system ? |
I believe they're just pure Python at the moment, which probably explains the difference. |
311a7da
to
42ff12a
Compare
This is now uploading colcon logs only on failure. build and test: https://github.com/mikaelarguedas/sros2/actions/runs/58114846 |
That's a good point. I default to multiple files because one issue I have with single workflow is that it means same triggers for all jobs in the workflow. You can do some conditionals on triggers but it quickly becomes limited.This is why I use different ones in e.g. https://github.com/osrf/docker_images#table-of-contents. In this case it doesn't make much of a difference, merging them into the same workflow means triggering linter jobs along the nightly builds and test, which is totally fine. |
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.
Looking good @mikaelarguedas, thank you! I have a few inline comments.
Also, note that having separate test files means you also have separate pass/fail badges:
I kinda prefer just having one, but what do you think?
Good point, that makes sense.
Sounds like neither of us feel too strongly about this. Let's ask this, then: do we want to show that badge somewhere? In the README, maybe? Do we care about them at all? If we do, let's make it one job so we only have one to show. If we don't, let's leave it as two. Personally I think it's more helpful to get a code quality/health impression from the readme as opposed to "are the tests passing right at this moment" (because note that the cron job updates the badges as well). So maybe we revisit that when we have coverage setup. |
43f40ac
to
e5fb4d7
Compare
Sounds good to me, it's now in the README. |
This pull request has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-tsc-meeting-minutes-2020-03-18/13313/1 |
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 have one last nit/question, but I'm really +1 either way.
I left this PR hanging the last couple days as ros2 builfarm switched to 20.04 over the weekend. This puts a bigger question mark on the relevance of this set of actions. Leaving this one on hold for now |
- One source build to test against latest master - One build on top of nightly image to give quick feedback Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
New version of this PR: Workflow with 2 jobs:
Example of repo/PR using this: mikaelarguedas#2 Prerequisites for merging:
Related work (non-blocking):
Future work:
|
3cb4573
to
3963861
Compare
[run] | ||
omit = | ||
# omit test directory | ||
test/* |
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 did this to get accurate coverage numbers. Code in test is usually pretty well covered and skewing the numbers
@@ -0,0 +1,2 @@ | |||
fixes: | |||
- "ros_ws/src/sros2/::" |
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.
This rewrites the path of the files in the report so that we can browse them directly on the codecov.io interface and see which lines/conditionals are covered and which are not
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
LGTM |
About the prerequisite
Who's responsibility is this? I don't know |
Mine, this is already done. We think 😛 . |
Ok, good to know. |
It was actually already enabled and (at least we think) actions don't need a token, so there's really nothing to do there. |
Left a last small comment/question. |
So apparently it was not done ^^ 2 ways to do it:
App integration seems the way to go these days but may require permission at the org level asd the app doesnt seem to be installed on the ros2 org. Is there a preference from @ros2/team or @ros2/security-members for one approach or the other ? Edit: the webhook allows to post comment automatically on PR. But so far didnt allow to browse files on the codecov.io interface |
Huh, maybe that's why it looked like it was already enabled, the default settings didn't need the app installed. I prefer that, of course, but it's up to the org admins. |
Currently Ubuntu only and no xmllint test for
sros2
due to schema hosting issue.Looking for feedback on the following:
Some repositories using the ROS github actions upload the colcon logs (e.g. rosbag2) but they upload them only on job success, which doesn't seem very useful. I opted to not add that upload step until we come across cases where we need the logs.
Examples of jobs using these parameters:
Build + test: https://github.com/mikaelarguedas/sros2/actions/runs/56872161
Lint: https://github.com/mikaelarguedas/sros2/actions/runs/56872157
Failing on Macos for now, haven't tried windows:
Possible reason: environment may be sanitized (maybe SIP is enabled) so the relevant libs are not on the
DYLD_LIBRARY_PATH
: upstream ticket ros-tooling/action-ros-ci#81@kyrofa did you ever succeed to run some ROS nodes on MacOS using this action ?