Skip to content
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

Slow #439

Closed
amacneil opened this issue Aug 27, 2021 · 7 comments
Closed

Slow #439

amacneil opened this issue Aug 27, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@amacneil
Copy link

Description

This action is very slow, it often takes 3-4 minutes to run (example). Have you considered or tried simply running action-ros-ci inside a ros:*-ros-core container? Is that a supported workflow? (at least on Linux, I don't think Github Actions supports Windows containers yet).

Alternatively, I notice this action installs ros-distrib-desktop. Is that a necessary default? I would have though that most libraries could get away with installing only core or base to run CI.

Completion Criteria

I think it would be nice if this action could run in under 1 minute, or be bypassed entirely on linux if the container path is feasible.

Implementation Notes / Suggestions

See above

@amacneil amacneil added the enhancement New feature or request label Aug 27, 2021
@christophebedard
Copy link
Member

christophebedard commented Aug 27, 2021

1 minute seems pretty arbitrary to me, but there are a few options.

This action is very slow, it often takes 3-4 minutes to run (example). Have you considered or tried simply running action-ros-ci inside a ros:*-ros-core container? Is that a supported workflow? (at least on Linux, I don't think Github Actions supports Windows containers yet).

Take a look at setup-ros-docker, which provides Docker images as an alternative to setup-ros: https://github.com/ros-tooling/setup-ros-docker

Also, action-ros-ci lists the tools it needs, so you can set up your own Docker image if you want: https://github.com/ros-tooling/action-ros-ci#requirements. It might work with ros:*-ros-core or osrf/ros2:*; if not, you probably just need to extend the image to install the missing tools.

Alternatively, I notice this action installs ros-distrib-desktop. Is that a necessary default? I would have though that most libraries could get away with installing only core or base to run CI.

It's certainly not optimal, but you don't need to install a ROS distro with setup-ros. If you don't provide a value for required-ros-distributions, setup-ros will only install the required tools (vcstool, colcon, etc.). Then you can rely on action-ros-ci to run rosdep to install only the required binary dependencies (or build all dependencies from source, but that might take longer).

@christophebedard christophebedard added the question Further information is requested label Aug 27, 2021
@amacneil
Copy link
Author

Yes 1 minute is definitely arbitrary - was just filling out the “completion criteria” field. But it’s probably a reasonable target to aim for (a few seconds or no step at all obviously being even better).

Thanks for the suggestions, I will try them out and report back. I do think it’s important to make the default as fast as possible, because folks like me stumble across the action and implement it following the readme, and right now that results in a pretty slow CI experience.

Re not passing a distro to setup-ros: how would action-ros-ci know which version of ros to install deps for them?

@christophebedard
Copy link
Member

christophebedard commented Aug 27, 2021

Of course, the faster the better! I think a lot of users prefer going to Docker image route for speed, especially if their ROS 2 (core) dependencies are stable.

Suggestions and PRs for improving the overall speed/experience/etc. are definitely welcome!

Re not passing a distro to setup-ros: how would action-ros-ci know which version of ros to install deps for them?

action-ros-ci itself has inputs for ROS 1 and 2 target distros: target-ros1-distro and target-ros2-distro, respectively https://github.com/ros-tooling/action-ros-ci#overview. It's used to source the corresponding binary installation (if any) and to run rosdep install.

@amacneil
Copy link
Author

I don't know what changed, but this seems to typically run in around a minute for me now on rosbridge_suite (example).

@christophebedard
Copy link
Member

Could be a GitHub actions infrastructure change/improvement!

@amacneil
Copy link
Author

It looks like this got faster when I removed required-ros-distributions: RobotWebTools/rosbridge_suite#651

I found that setting actually makes testing worse, because ros-desktop is installed so you don't catch if your project is missing any dependencies. I don't know what it's intended to be used for but it might be a good idea to remove it from the readme?

@christophebedard
Copy link
Member

If I'm not mistaken, it's needed for Windows and macOS, because there's no other way to install ROS 2 (or exact ROS 2 dependencies) on those platforms. It's also needed if you just want to install ROS 1/2 without necessarily also using action-ros-ci.

But, when also using action-ros-ci with Ubuntu, that's a good point. I'll look into adding a section for this specific use-case/warning after this section: https://github.com/ros-tooling/setup-ros#setting-up-the-worker-installing-system-dependencies-and-ros-linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants