-
Notifications
You must be signed in to change notification settings - Fork 320
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
Conversation
@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+ |
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 🤷 |
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 |
All stages were moved to github now
This reverts commit 6bf1f87.
Fixes #101.