Skip to content

Commit

Permalink
Add Ubuntu 24.04 Noble and switch Rolling to it (#658)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
  • Loading branch information
christophebedard committed Mar 27, 2024
1 parent ec1b086 commit 326be42
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 19 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ jobs:

test_environment_linux:
name: "Check development tools"
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
docker_image:
- ubuntu:20.04
- ubuntu:22.04
- ubuntu:24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
Expand Down Expand Up @@ -123,7 +126,7 @@ jobs:
ros_version: 2

# Rolling Ridley (see REP 2002: https://www.ros.org/reps/rep-2002.html)
- docker_image: ubuntu:jammy
- docker_image: ubuntu:noble
ros_distribution: rolling
ros_version: 2

Expand All @@ -148,7 +151,9 @@ jobs:

test_repo_with_root_setup_cfg:
name: "Test with setup.cfg file in root directory (Linux only)"
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
Expand All @@ -163,7 +168,7 @@ jobs:
name: "Test on a setup-ros-docker container"
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-jammy-latest
image: rostooling/setup-ros-docker:ubuntu-noble-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
Expand All @@ -174,12 +179,14 @@ jobs:

test_install_connext:
name: "Test with RTI Connext DDS"
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.docker_image }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
docker_image:
- ubuntu:24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.2
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
build_docker:
runs-on: ubuntu-latest
container:
image: ubuntu:jammy
image: ubuntu:noble
steps:
- name: Setup ROS
uses: ros-tooling/setup-ros@v0.7
Expand Down Expand Up @@ -185,7 +185,7 @@ The workflow `test` is iterating on all ROS 2 distributions, on macOS, and Windo
The workflow `test_docker` is iterating on all ROS and ROS 2 distributions, for all supported Ubuntu distributions, using Docker.
The test matrix associates each distribution with one Docker image.
This is required to ensure that the appropriate Ubuntu container is used.
For example, Noetic requires `focal`, Humble requires `jammy`, etc.
For example, Noetic requires `focal`, Humble requires `jammy`, Jazzy requires `noble`, etc.

```yaml
jobs:
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
ros_version: 2

# Rolling Ridley (No End-Of-Life)
- docker_image: ubuntu:jammy
- docker_image: ubuntu:noble
ros_distribution: rolling
ros_version: 2

Expand Down
38 changes: 35 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6650,9 +6650,29 @@ const distributionSpecificAptDependencies = {
// libc++-dev and libc++abi-dev installs intentionally removed because:
// https://github.com/ros-tooling/setup-ros/issues/506
],
noble: [
// Basic development packages (from ROS 2 source/development setup instructions)
// ros-dev-tools includes many packages that we needed to include manually in Focal & older
"python3-pip",
"python3-pytest-cov",
"python3-flake8-blind-except",
"python3-flake8-class-newline",
"python3-flake8-deprecated",
"python3-pytest-repeat",
"python3-pytest-rerunfailures",
"ros-dev-tools",
// Additional colcon packages (not included in ros-dev-tools)
"python3-colcon-coveragepy-result",
"python3-colcon-lcov-result",
"python3-colcon-meson",
"python3-colcon-mixin",
// Others
"python3-importlib-metadata",
],
};
const aptRtiConnextDds = {
jammy: "rti-connext-dds-6.0.1",
noble: "rti-connext-dds-6.0.1",
};
/**
* Run apt-get install on list of specified packages.
Expand Down Expand Up @@ -7254,11 +7274,23 @@ function runLinux() {
yield addAptRepoKey();
const ubuntuCodename = yield utils.determineDistribCodename();
yield addAptRepo(ubuntuCodename, use_ros2_testing);
// Temporary fix to avoid error mount: /var/lib/grub/esp: special device (...) does not exist.
yield utils.exec("sudo", ["apt-mark", "hold", "grub-efi-amd64-signed"]);
yield utils.exec("sudo", ["apt-get", "upgrade", "-y"]);
if ("noble" !== ubuntuCodename) {
// Temporary fix to avoid error mount: /var/lib/grub/esp: special device (...) does not exist.
yield utils.exec("sudo", ["apt-mark", "hold", "grub-efi-amd64-signed"]);
yield utils.exec("sudo", ["apt-get", "upgrade", "-y"]);
}
// Install development-related packages and some common dependencies
yield apt.installAptDependencies(installConnext);
// Workaround for Noble: we need a newer version of python3-flake8
if ("noble" == ubuntuCodename) {
yield utils.exec("sudo", [
"bash",
"-c",
`echo "deb http://archive.ubuntu.com/ubuntu/ ${ubuntuCodename}-proposed restricted main multiverse universe" >> /etc/apt/sources.list.d/ubuntu-${ubuntuCodename}-proposed.list`,
]);
yield utils.exec("sudo", ["apt-get", "update"]);
yield apt.runAptGetInstall([`python3-flake8/${ubuntuCodename}-proposed`]);
}
// We don't use pip here to install dependencies for ROS 2
if (ubuntuCodename === ros1UbuntuVersion) {
/* pip3 dependencies need to be installed after the APT ones, as pip3
Expand Down
20 changes: 20 additions & 0 deletions src/package_manager/apt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,30 @@ const distributionSpecificAptDependencies = {
// libc++-dev and libc++abi-dev installs intentionally removed because:
// https://github.com/ros-tooling/setup-ros/issues/506
],
noble: [
// Basic development packages (from ROS 2 source/development setup instructions)
// ros-dev-tools includes many packages that we needed to include manually in Focal & older
"python3-pip",
"python3-pytest-cov",
"python3-flake8-blind-except",
"python3-flake8-class-newline",
"python3-flake8-deprecated",
"python3-pytest-repeat",
"python3-pytest-rerunfailures",
"ros-dev-tools",
// Additional colcon packages (not included in ros-dev-tools)
"python3-colcon-coveragepy-result",
"python3-colcon-lcov-result",
"python3-colcon-meson",
"python3-colcon-mixin",
// Others
"python3-importlib-metadata",
],
};

const aptRtiConnextDds = {
jammy: "rti-connext-dds-6.0.1",
noble: "rti-connext-dds-6.0.1",
};

/**
Expand Down
19 changes: 16 additions & 3 deletions src/setup-ros-linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,26 @@ export async function runLinux(): Promise<void> {
const ubuntuCodename = await utils.determineDistribCodename();
await addAptRepo(ubuntuCodename, use_ros2_testing);

// Temporary fix to avoid error mount: /var/lib/grub/esp: special device (...) does not exist.
await utils.exec("sudo", ["apt-mark", "hold", "grub-efi-amd64-signed"]);
await utils.exec("sudo", ["apt-get", "upgrade", "-y"]);
if ("noble" !== ubuntuCodename) {
// Temporary fix to avoid error mount: /var/lib/grub/esp: special device (...) does not exist.
await utils.exec("sudo", ["apt-mark", "hold", "grub-efi-amd64-signed"]);
await utils.exec("sudo", ["apt-get", "upgrade", "-y"]);
}

// Install development-related packages and some common dependencies
await apt.installAptDependencies(installConnext);

// Workaround for Noble: we need a newer version of python3-flake8
if ("noble" == ubuntuCodename) {
await utils.exec("sudo", [
"bash",
"-c",
`echo "deb http://archive.ubuntu.com/ubuntu/ ${ubuntuCodename}-proposed restricted main multiverse universe" >> /etc/apt/sources.list.d/ubuntu-${ubuntuCodename}-proposed.list`,
]);
await utils.exec("sudo", ["apt-get", "update"]);
await apt.runAptGetInstall([`python3-flake8/${ubuntuCodename}-proposed`]);
}

// We don't use pip here to install dependencies for ROS 2
if (ubuntuCodename === ros1UbuntuVersion) {
/* pip3 dependencies need to be installed after the APT ones, as pip3
Expand Down

0 comments on commit 326be42

Please sign in to comment.