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

CI to compile ros2 packages #23

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Conversation

martinaxgloria
Copy link
Member

@martinaxgloria martinaxgloria commented Nov 28, 2023

This PR introduces a workflow to check whether all the ros2 packages contained inside this repo are properly compiled without any errors. It includes:

  • a Dockerfile that uses superbuild-ros2 docker image as a starting point but installs other dependencies like the MoveIt2 ones;
  • the ci.yaml which includes a github action to build the docker image and run it;

Moreover, I refactored the repository to have the ros2 packages under the src folder. In this way, they could be compiled starting from the root, i.e.:

git clone https://github.com/icub-tech-iit/study-moveit
cd study-moveit
colcon build
source install/setup.bash

instead of:

mkdir -p ros2_ws/src
cd ros2_ws/src
git clone https://github.com/icub-tech-iit/study-moveit
cd ..
colcon build
source install/setup.bash

In my opinion, this makes the repository and the folder tree cleaner and easier to compile. But if you do not agree, I could revert it.

I tried it on my fork and this was the result:

Screenshot from 2023-11-28 16-18-54

@martinaxgloria martinaxgloria self-assigned this Nov 28, 2023
@martinaxgloria martinaxgloria linked an issue Nov 28, 2023 that may be closed by this pull request
@martinaxgloria martinaxgloria removed a link to an issue Nov 28, 2023
@martinaxgloria martinaxgloria mentioned this pull request Nov 28, 2023
@traversaro
Copy link
Member

In my opinion, this makes the repository and the folder tree cleaner and easier to compile. But if you do not agree, I could revert it.

I do not have a strong opinion on this, but all the ros2 repos I know of, even if composed by different C++/Python packages in different directories, place this package directories directly in the root, with no src directory, see for example:

@martinaxgloria
Copy link
Member Author

Hi @traversaro, thanks for the feedback! Actually, you're right, it's better to have the packages in the root to be aligned to what already exists. I'm going to revert it and fix the CI

@martinaxgloria martinaxgloria marked this pull request as draft November 29, 2023 07:32
@martinaxgloria martinaxgloria marked this pull request as ready for review November 29, 2023 13:22
@martinaxgloria
Copy link
Member Author

I reverted the changes regarding the folder tree, fixed the CI, and added a check to force the CI to exit when almost one of the packages fails. This is why I tried to run the workflow with an error but the CI completed the jobs successfully:

image

@Nicogene Nicogene linked an issue Nov 29, 2023 that may be closed by this pull request
@Nicogene Nicogene merged commit 9bab515 into icub-tech-iit:master Nov 29, 2023
@Nicogene Nicogene deleted the feat/CI branch November 29, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CI to the repo
3 participants