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

Add variable to control git ref of rmw_zenoh and upgrade to rmw_zenoh 1.0.0 #40

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitlab-ci/docker-ros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ variables:
ENABLE_SINGLEARCH_PUSH: 'false' # Enable push of single arch images with [-amd64|-arm64] postfix
ENABLE_PUSH_AS_LATEST: 'false' # Push images with tag `latest`/`latest-dev` in addition to the configured image names
RMW_IMPLEMENTATION: 'rmw_cyclonedds_cpp' # RMW implementation to use (only for ROS 2)
RMW_ZENOH_GIT_REF: '28d917e0532fed6e9703f044662298f2b3553716' # Git ref of rmw_zenoh repo to build if `RMW_IMPLEMENTATION=rmw_zenoh_cpp`
ROS_DISTRO: '' # ROS Distro (required if ROS is not installed in `base-image`)
DISABLE_ROS_INSTALLATION: 'false' # Disable automatic installation of `ros-$ROS_DISTRO-ros-core` package, e.g., if ROS is already installed in `base-image` and package is not available for the OS
GIT_HTTPS_SERVER: ${CI_SERVER_HOST} # Server URL (without protocol) for cloning private Git repositories via HTTPS
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ The password of the custom user is set to its username (`dockeruser:dockeruser`
ROS 2 middleware implementation
*default:* `rmw_cyclonedds_cpp`
*supported values:* `rmw_zenoh_cpp`, `rmw_fastrtps_cpp`, `rmw_cyclonedds_cpp`, `rmw_gurumdds_cpp`, ...
- **`rmw-zenoh-git-ref` | `RMW_ZENOH_GIT_REF`**
Git ref of rmw_zenoh repo to build if `RMW_IMPLEMENTATION=rmw_zenoh_cpp`
*default:* `28d917e0532fed6e9703f044662298f2b3553716`
- **`ros-distro` | `ROS_DISTRO`**
ROS Distro
*required if ROS is not installed in `base-image`*
Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ inputs:
description: "RMW implementation to use (only for ROS 2)"
default: rmw_cyclonedds_cpp

rmw-implementation:
description: "Git ref of rmw_zenoh repo to build if `RMW_IMPLEMENTATION=rmw_zenoh_cpp`"
default: 28d917e0532fed6e9703f044662298f2b3553716

ros-distro:
description: "ROS Distro (required if ROS is not installed in `base-image`)"

Expand Down Expand Up @@ -232,6 +236,7 @@ runs:
ENABLE_SLIM: ${{ inputs.enable-slim }}
SLIM_BUILD_ARGS: ${{ inputs.slim-build-args }}
RMW_IMPLEMENTATION: ${{ inputs.rmw-implementation }}
RMW_ZENOH_GIT_REF: ${{ inputs.rmw-zenoh-git-ref }}
ROS_DISTRO: ${{ inputs.ros-distro }}
DISABLE_ROS_INSTALLATION: ${{ inputs.disable-ros-installation }}
GIT_HTTPS_SERVER: ${{ inputs.git-https-server }}
Expand Down Expand Up @@ -295,6 +300,7 @@ runs:
SLIM_BUILD_ARGS: ${{ inputs.slim-build-args }}
ENABLE_SINGLEARCH_PUSH: ${{ inputs.enable-singlearch-push }}
RMW_IMPLEMENTATION: ${{ inputs.rmw-implementation }}
RMW_ZENOH_GIT_REF: ${{ inputs.rmw-zenoh-git-ref }}
ROS_DISTRO: ${{ inputs.ros-distro }}
DISABLE_ROS_INSTALLATION: ${{ inputs.disable-ros-installation }}
GIT_HTTPS_SERVER: ${{ inputs.git-https-server }}
Expand Down Expand Up @@ -336,6 +342,7 @@ runs:
SLIM_BUILD_ARGS: ${{ inputs.slim-build-args }}
ENABLE_SINGLEARCH_PUSH: ${{ inputs.enable-singlearch-push }}
RMW_IMPLEMENTATION: ${{ inputs.rmw-implementation }}
RMW_ZENOH_GIT_REF: ${{ inputs.rmw-zenoh-git-ref }}
ROS_DISTRO: ${{ inputs.ros-distro }}
DISABLE_ROS_INSTALLATION: ${{ inputs.disable-ros-installation }}
GIT_HTTPS_SERVER: ${{ inputs.git-https-server }}
Expand Down
9 changes: 8 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,19 @@ RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
# install desired ROS 2 middleware
ARG RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"
ENV RMW_IMPLEMENTATION=${RMW_IMPLEMENTATION}
ARG RMW_ZENOH_GIT_REF="28d917e0532fed6e9703f044662298f2b3553716"
RUN source /opt/ros/$ROS_DISTRO/setup.bash && \
if [[ "$RMW_IMPLEMENTATION" == "rmw_zenoh_cpp" ]]; then \
mkdir -p /opt/ws_rmw_zenoh/src && \
git clone https://github.com/ros2/rmw_zenoh.git /opt/ws_rmw_zenoh/src/rmw_zenoh && \
cd /opt/ws_rmw_zenoh/src/rmw_zenoh && \
git checkout ${RMW_ZENOH_GIT_REF} && \
cd - && \
if [[ "$(lsb_release -r | awk '{print $2}')" == "22.04" ]]; then \
git clone https://github.com/eProsima/Fast-CDR.git /opt/ws_rmw_zenoh/src/Fast-CDR ; \
git clone https://github.com/eProsima/Fast-CDR.git /opt/ws_rmw_zenoh/src/Fast-CDR && \
cd /opt/ws_rmw_zenoh/src/Fast-CDR && \
git checkout 2.2.x && \
cd - ; \
lreiher marked this conversation as resolved.
Show resolved Hide resolved
fi && \
rosdep init || true && \
rosdep update --rosdistro $ROS_DISTRO && \
Expand Down
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build_image() {
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
--build-arg COMMAND="${COMMAND}" \
$(if [[ -n "${RMW_IMPLEMENTATION}" ]]; then echo "--build-arg RMW_IMPLEMENTATION=${RMW_IMPLEMENTATION}"; fi) \
$(if [[ -n "${RMW_ZENOH_GIT_REF}" ]]; then echo "--build-arg RMW_ZENOH_GIT_REF=${RMW_ZENOH_GIT_REF}"; fi) \
$(if [[ -n "${ROS_DISTRO}" ]]; then echo "--build-arg ROS_DISTRO=${ROS_DISTRO}"; fi) \
$(if [[ -n "${DISABLE_ROS_INSTALLATION}" ]]; then echo "--build-arg DISABLE_ROS_INSTALLATION=${DISABLE_ROS_INSTALLATION}"; fi) \
$(if [[ -n "${GIT_HTTPS_SERVER}" ]]; then echo "--build-arg GIT_HTTPS_SERVER=${GIT_HTTPS_SERVER}"; fi) \
Expand Down
1 change: 1 addition & 0 deletions scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ENABLE_SLIM="${ENABLE_SLIM:-true}"
SLIM_BUILD_ARGS="${SLIM_BUILD_ARGS:-'--sensor-ipc-mode proxy --continue-after=10 --show-clogs --http-probe=false'}"
ENABLE_SINGLEARCH_PUSH="${ENABLE_SINGLEARCH_PUSH:-false}"
RMW_IMPLEMENTATION="${RMW_IMPLEMENTATION:-}"
RMW_ZENOH_GIT_REF="${RMW_ZENOH_GIT_REF:-}"
ROS_DISTRO="${ROS_DISTRO:-}"
DISABLE_ROS_INSTALLATION="${DISABLE_ROS_INSTALLATION:-}"
GIT_HTTPS_SERVER="${GIT_HTTPS_SERVER:-}"
Expand Down