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

Build ROS/ROS 2 nodes in CI #105

Merged
merged 6 commits into from
Mar 29, 2023
Merged

Build ROS/ROS 2 nodes in CI #105

merged 6 commits into from
Mar 29, 2023

Conversation

ahans
Copy link
Contributor

@ahans ahans commented Mar 27, 2023

Fixes #101.

@nachovizzo
Copy link
Collaborator

@ahans Maybe adding the other 3 distros is not a big deal?

ros1_melodic:
  image: osrf/ros:melodic-desktop-full
  stage: build
  before_script:
    - apt-get update && sudo apt-get install -y gpg wget
    - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
    - echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null && apt update
    - rm /usr/share/keyrings/kitware-archive-keyring.gpg
    - apt-get install -y kitware-archive-keyring
    - apt-get install -y cmake
  script:
    - rm -rf ~/catkin_ws/
    - mkdir -p ~/catkin_ws/
    - cp -r ${CI_PROJECT_DIR} ~/catkin_ws/src
    - cd ~/catkin_ws/
    - catkin_make

ros1_noetic:
  image: osrf/ros:noetic-desktop-full
  stage: build
  before_script:
    - rm -rf ~/catkin_ws/
    - mkdir -p ~/catkin_ws/
    - cp -r ${CI_PROJECT_DIR} ~/catkin_ws/src
  script:
    - cd ~/catkin_ws/
    - catkin_make

ros2_foxy:
  image: osrf/ros:foxy-desktop
  stage: build
  script:
    - colcon build --event-handlers console_direct+

@ahans ahans changed the title Build ROS 2 node in CI Build ROS/ROS 2 nodes in CI Mar 28, 2023
@ahans
Copy link
Contributor Author

ahans commented Mar 28, 2023

@ahans Maybe adding the other 3 distros is not a big deal?

I don't care about the others and wanted to leave some work for you. 😀 Anyways, learned some more about GH actions and matrix strategy. I think it's done now and turned out quite ok.

@nachovizzo
Copy link
Collaborator

nachovizzo commented Mar 28, 2023

@ahans Maybe adding the other 3 distros is not a big deal?

I don't care about the others and wanted to leave some work for you. 😀 Anyways, learned some more about GH actions and matrix strategy. I think it's done now and turned out quite ok.

Agree, this turned out to be nice and simple.

Any idea why people would opt for This instead of the plain docker syntax you used? I found yours much less confusing, but maybe I'm way too used to Docker 🤷

@ahans
Copy link
Contributor Author

ahans commented Mar 28, 2023

Any idea why people would opt for This instead of the plain docker syntax you used? I found yours much less confusing, but maybe I'm way too used to Docker shrug

It looks like this does a bit more than the equivalent of pulling and running a Docker image. It can checkout other dependent repos and run rosdep automatically to apt-get install stuff, supposedly reading the deps from package.xml files. In the Docker-based approach we would have to do that manually. For the present project I would still prefer the Docker approach, because there's less magic happening and you can easily repro locally exactly what the workflow does. You can probably also run an action locally, but that's another tool you need to install and understand how to use ...

@nachovizzo nachovizzo merged commit 99ac940 into PRBonn:main Mar 29, 2023
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.

Finish dev-ops migration from Gitlab CI to Github actions
2 participants