Skip to content

Commit

Permalink
Change Build Tutorial Image CI job to only build main against Rolli…
Browse files Browse the repository at this point in the history
…ng (moveit#782)

Co-authored-by: Robert Haschke <[email protected]>
  • Loading branch information
MarqRazz and rhaschke authored Oct 5, 2023
1 parent 28f3f0f commit 8cd7875
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
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

0 comments on commit 8cd7875

Please sign in to comment.