diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c73456..1caf4da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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. @@ -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 diff --git a/Dockerfile b/Dockerfile index ed47d09..a1e5824 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ # 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. @@ -10,7 +11,7 @@ # 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 @@ -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 diff --git a/setup-ros.sh b/setup-ros.sh index cde107b..2ae4388 100755 --- a/setup-ros.sh +++ b/setup-ros.sh @@ -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 @@ -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 @@ -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 \ @@ -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