Skip to content

Commit

Permalink
Add Ubuntu 24.04 Noble and switch Rolling to it (#69)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard authored Mar 25, 2024
1 parent fcaf26a commit d8cf4bc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
base_image_name: [ubuntu]
base_image_tag: [focal, jammy]
base_image_tag: [focal, jammy, noble]
name: "${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}"
# always use latest linux worker, as it should not have any impact
# when it comes to building docker images.
Expand Down Expand Up @@ -102,15 +102,15 @@ jobs:

# Rolling Ridley (June 2020 - Ongoing)
- ros_distro: rolling
base_image_tag: jammy
base_image_tag: noble
ros_variant: desktop
rmw_implementations: ros-rolling-rmw-fastrtps-cpp,ros-rolling-rmw-cyclonedds-cpp,ros-rolling-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-rolling-desktop
output_image_tag: ubuntu-noble-ros-rolling-desktop
- ros_distro: rolling
base_image_tag: jammy
base_image_tag: noble
ros_variant: ros-base
rmw_implementations: ros-rolling-rmw-fastrtps-cpp,ros-rolling-rmw-cyclonedds-cpp,ros-rolling-rmw-connextdds
output_image_tag: ubuntu-jammy-ros-rolling-ros-base
output_image_tag: ubuntu-noble-ros-rolling-ros-base

name: "${{ matrix.output_image_tag }}"
# always use latest linux worker, as it should not have any impact
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# The script has been tested against:
# - ubuntu:focal
# - ubuntu:jammy
# - ubuntu:noble
#
# Do not pass directly "X:Y" to BASE_IMAGE_NAME, only pass the image name.
# The version must be specified separately in BASE_IMAGE_TAG.
#
# This script will not work with non-APT based Linux distributions.
ARG BASE_IMAGE_NAME

# Base Linux distribution version (one of "focal", "jammy")
# Base Linux distribution version (one of "focal", "jammy", "noble")

ARG BASE_IMAGE_TAG

Expand Down Expand Up @@ -44,4 +45,4 @@ RUN for i in $(echo ${EXTRA_APT_PACKAGES} | tr ',' ' '); do \
apt-get install --yes --no-install-recommends "$i"; \
done
# ROS 1 installations clobber this - it doesn't affect ROS 2
RUN pip3 install -U catkin_pkg
RUN if [ "noble" = "$(lsb_release -cs)" ]; then pip3 install -U catkin_pkg --break-system-packages; else pip3 install -U catkin_pkg; fi
38 changes: 20 additions & 18 deletions setup-ros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo 'Etc/UTC' > /etc/timezone
apt-get update

apt-get install --no-install-recommends --quiet --yes \
ca-certificates curl gnupg2 locales lsb-release
ca-certificates curl gnupg2 locales lsb-release

locale-gen en_US en_US.UTF-8
export LANG=en_US.UTF-8
Expand All @@ -36,16 +36,16 @@ curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr
ROS_VERSION="ros"
RTI_CONNEXT_DDS=""
case ${ROS_DISTRO} in
"noetic")
"noetic")
ROS_VERSION="ros"
;;
*)
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
;;
*)
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
ROS_VERSION="ros2"
;;
;;
esac
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/${ROS_VERSION}/ubuntu $(lsb_release -sc) main" |\
tee /etc/apt/sources.list.d/${ROS_VERSION}.list > /dev/null
tee /etc/apt/sources.list.d/${ROS_VERSION}.list > /dev/null

apt-get update

Expand Down Expand Up @@ -74,14 +74,8 @@ apt-get install --no-install-recommends --quiet --yes \
# install it, but won't fail if it does not suceed.
apt-get install --no-install-recommends --quiet --yes libopensplice69 || true

# Get the latest version of pip before installing dependencies,
# the version from apt can be very out of date (v8.0 on xenial)
# The latest version of pip doesn't support Python3.5 as of v21,
# but pip 8 doesn't understand the metadata that states this, so we must first
# make an intermediate upgrade to pip 20, which does understand that information
python3 -m pip install --upgrade pip==20.*
python3 -m pip install --upgrade pip

# Required to install pip packages outside a venv with pip >=23.0.1 (older versions will ignore it)
export PIP_BREAK_SYSTEM_PACKAGES=1
pip3 install --upgrade \
argcomplete \
catkin_pkg \
Expand Down Expand Up @@ -127,15 +121,23 @@ pip3 install --upgrade \
nose \
pep8 \
pydocstyle \
pyparsing \
pytest \
pytest-cov \
pytest-mock \
pytest-repeat \
pytest-rerunfailures \
pytest-runner \
setuptools \
wheel
setuptools
UBUNTU_VERSION=$(lsb_release -cs)
case ${UBUNTU_VERSION} in
"noble")
;;
*)
pip3 install --upgrade \
pyparsing \
wheel
;;
esac

rosdep init

Expand Down

0 comments on commit d8cf4bc

Please sign in to comment.