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

Change Build Tutorial Image CI job to only build main against Rolling #782

Merged
merged 14 commits into from
Oct 5, 2023
19 changes: 6 additions & 13 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ FROM moveit/moveit2:${ROS_DISTRO}-source as tutorial_image

LABEL org.opencontainers.image.description "This container has working versions of the tutorials discussed here: https://moveit.picknik.ai/main/doc/tutorials/tutorials.html"

# Copy MoveIt sources from docker context
# Copy sources from docker context
COPY . src/moveit2_tutorials

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
RUN --mount=type=cache,target=/root/.ccache/ \
# Fetch required upstream sources for building
vcs import src < /root/ws_moveit/src/moveit2_tutorials/.github/upstream.repos
# Fetch required upstream sources for building
RUN vcs import src < src/moveit2_tutorials/.github/upstream.repos

######################### Hello World Tutorial #########################################

Expand All @@ -28,10 +25,7 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" &&\
--dependencies moveit_ros_planning_interface moveit_visual_tools rclcpp \
--node-name hello_moveit hello_moveit

######################### Planning Around Objects #######################################

# Remove the hello_world tutorial cpp file and replace it with the planning_around_objects file
RUN rm src/hello_moveit/src/hello_moveit.cpp
# Replace template hello_moveit.cpp with implementation from planning_around_objects
COPY ./doc/tutorials/planning_around_objects/hello_moveit.cpp src/hello_moveit/src/hello_moveit.cpp

######################### Pick and Place (MTC) Image #########################################
Expand All @@ -45,8 +39,7 @@ RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" &&\
--dependencies moveit_task_constructor_core rclcpp \
--node-name mtc_node mtc_tutorial

# Remove the empty cpp file and replace it with the example file
RUN rm src/mtc_tutorial/src/mtc_node.cpp
# Replace template mtc_node.cpp with the example file
COPY ./doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp src/mtc_tutorial/src/mtc_node.cpp

# Add the launch folder to the tutorial package and CMakeLists.txt
Expand All @@ -58,7 +51,7 @@ RUN sed -i "s|ament_package()|install(DIRECTORY launch DESTINATION share/\${PRO
RUN --mount=type=cache,target=/root/.ccache/ \
# Enable ccache
. "/opt/ros/${ROS_DISTRO}/setup.sh" &&\
. "install/setup.sh" &&\
. "install/setup.sh" &&\
sudo apt update && rosdep install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y && \
sudo apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp && \
colcon build \
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble, rolling]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -19,11 +19,6 @@ jobs:
PUSH: ${{ (github.ref_name == 'main') }}

steps:
- name: Checkout distro branch
if: ${{ matrix.ROS_DISTRO != 'rolling' }}
uses: actions/checkout@v4
with:
ref: ${{ matrix.ROS_DISTRO }}
- name: Set lower case for container name
run: |
echo "GH_IMAGE_LC=${GH_IMAGE,,}" >>${GITHUB_ENV}
Expand Down