Skip to content

Commit

Permalink
Revert "Change Build Tutorial Image CI job to only build main again…
Browse files Browse the repository at this point in the history
…st Rolling (moveit#782)"

This reverts commit 8cd7875.
  • Loading branch information
disvorten committed Oct 12, 2023
1 parent a8c4d68 commit 5c143c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
19 changes: 13 additions & 6 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ 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 sources from docker context
# Copy MoveIt sources from docker context
COPY . src/moveit2_tutorials

# Fetch required upstream sources for building
RUN vcs import src < src/moveit2_tutorials/.github/upstream.repos
# 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

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

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

# Replace template hello_moveit.cpp with implementation from planning_around_objects
######################### 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
COPY ./doc/tutorials/planning_around_objects/hello_moveit.cpp src/hello_moveit/src/hello_moveit.cpp

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

# Replace template mtc_node.cpp with the example file
# Remove the empty cpp file and replace it with the example file
RUN rm src/mtc_tutorial/src/mtc_node.cpp
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 @@ -51,7 +58,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: 6 additions & 1 deletion .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: [rolling]
ROS_DISTRO: [humble, rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -19,6 +19,11 @@ 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

0 comments on commit 5c143c7

Please sign in to comment.