Skip to content

Commit 8cd7875

Browse files
MarqRazzrhaschke
andauthored
Change Build Tutorial Image CI job to only build main against Rolling (#782)
Co-authored-by: Robert Haschke <[email protected]>
1 parent 28f3f0f commit 8cd7875

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

.docker/Dockerfile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ FROM moveit/moveit2:${ROS_DISTRO}-source as tutorial_image
88

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

11-
# Copy MoveIt sources from docker context
11+
# Copy sources from docker context
1212
COPY . src/moveit2_tutorials
1313

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

2017
######################### Hello World Tutorial #########################################
2118

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

31-
######################### Planning Around Objects #######################################
32-
33-
# Remove the hello_world tutorial cpp file and replace it with the planning_around_objects file
34-
RUN rm src/hello_moveit/src/hello_moveit.cpp
28+
# Replace template hello_moveit.cpp with implementation from planning_around_objects
3529
COPY ./doc/tutorials/planning_around_objects/hello_moveit.cpp src/hello_moveit/src/hello_moveit.cpp
3630

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

48-
# Remove the empty cpp file and replace it with the example file
49-
RUN rm src/mtc_tutorial/src/mtc_node.cpp
42+
# Replace template mtc_node.cpp with the example file
5043
COPY ./doc/tutorials/pick_and_place_with_moveit_task_constructor/src/mtc_node.cpp src/mtc_tutorial/src/mtc_node.cpp
5144

5245
# Add the launch folder to the tutorial package and CMakeLists.txt
@@ -58,7 +51,7 @@ RUN sed -i "s|ament_package()|install(DIRECTORY launch DESTINATION share/\${PRO
5851
RUN --mount=type=cache,target=/root/.ccache/ \
5952
# Enable ccache
6053
. "/opt/ros/${ROS_DISTRO}/setup.sh" &&\
61-
. "install/setup.sh" &&\
54+
. "install/setup.sh" &&\
6255
sudo apt update && rosdep install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y && \
6356
sudo apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp && \
6457
colcon build \

.github/workflows/docker-images.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ROS_DISTRO: [humble, rolling]
12+
ROS_DISTRO: [rolling]
1313
runs-on: ubuntu-latest
1414
permissions:
1515
packages: write
@@ -19,11 +19,6 @@ jobs:
1919
PUSH: ${{ (github.ref_name == 'main') }}
2020

2121
steps:
22-
- name: Checkout distro branch
23-
if: ${{ matrix.ROS_DISTRO != 'rolling' }}
24-
uses: actions/checkout@v4
25-
with:
26-
ref: ${{ matrix.ROS_DISTRO }}
2722
- name: Set lower case for container name
2823
run: |
2924
echo "GH_IMAGE_LC=${GH_IMAGE,,}" >>${GITHUB_ENV}

0 commit comments

Comments
 (0)