Skip to content

Commit 67731c2

Browse files
authored
Cleanup (#86)
* CI: Switch to ubuntu-latest * Remove ros2 repository: Install rosdep and colcon from pypi instead of apt * Fix EXTRA_DEB_SOURCES
1 parent 021aab1 commit 67731c2

File tree

9 files changed

+27
-37
lines changed

9 files changed

+27
-37
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ env:
131131

132132
jobs:
133133
debs:
134-
runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-22.04' || (inputs.ARCH == 'arm64' && 'ubuntu-22.04-arm' || inputs.ARCH) }}
134+
runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-latest' || (inputs.ARCH == 'arm64' && 'ubuntu-22.04-arm' || inputs.ARCH) }}
135135
timeout-minutes: ${{ inputs.ARCH == 'x64' && 340 || 2880 }}
136136
name: build debs
137137
outputs:

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ concurrency:
2323

2424
jobs:
2525
sanity:
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v4
2929
with:
@@ -39,7 +39,7 @@ jobs:
3939
name: pre-commit
4040

4141
unittests:
42-
runs-on: ubuntu-22.04
42+
runs-on: ubuntu-latest
4343
steps:
4444
- uses: actions/checkout@v4
4545
with:

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ concurrency:
7676

7777
jobs:
7878
deploy:
79-
runs-on: ubuntu-22.04
79+
runs-on: ubuntu-latest
8080
if: (inputs.DEPLOY_URL || vars.DEPLOY_URL) && (inputs.DEBS_ARTIFACT_NAME != 'skip')
8181
env:
8282
DEBUG_BASH: ${{ secrets.ACTIONS_STEP_DEBUG && 'true' || 'false' }}

.github/workflows/docker.build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434

3535
jobs:
3636
build:
37-
runs-on: ubuntu-22.04
37+
runs-on: ubuntu-latest
3838

3939
steps:
4040
- uses: rhaschke/docker-run-action@main

.github/workflows/interactive.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ jobs:
8383
INSTALL_GPG_KEYS: |
8484
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
8585
EXTRA_DEB_SOURCES: >-
86-
"${{ inputs.CONTINUE_BUILD &&
87-
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
88-
inputs.DEB_DISTRO) || '' }}"
86+
${{ inputs.CONTINUE_BUILD &&
87+
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
88+
inputs.DEB_DISTRO) || '' }}
8989
EXTRA_ROSDEP_SOURCES: |
9090
rosdep.yaml
9191
https://ros.packages.techfak.net/ros-one.yaml
@@ -109,9 +109,9 @@ jobs:
109109
INSTALL_GPG_KEYS: |
110110
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
111111
EXTRA_DEB_SOURCES: >-
112-
"${{ inputs.CONTINUE_BUILD &&
113-
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
114-
inputs.DEB_DISTRO) || '' }}"
112+
${{ inputs.CONTINUE_BUILD &&
113+
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
114+
inputs.DEB_DISTRO) || '' }}
115115
EXTRA_ROSDEP_SOURCES: |
116116
rosdep.yaml
117117
https://ros.packages.techfak.net/ros-one.yaml
@@ -135,9 +135,9 @@ jobs:
135135
INSTALL_GPG_KEYS: |
136136
sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg
137137
EXTRA_DEB_SOURCES: >-
138-
"${{ inputs.CONTINUE_BUILD &&
139-
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
140-
inputs.DEB_DISTRO) || '' }}"
138+
${{ inputs.CONTINUE_BUILD &&
139+
format('deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net {0}-testing main',
140+
inputs.DEB_DISTRO) || '' }}
141141
EXTRA_ROSDEP_SOURCES: |
142142
rosdep.yaml
143143
https://ros.packages.techfak.net/ros-one.yaml

.github/workflows/packages.build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
jobs:
2020
build:
2121
name: "${{ inputs.DEB_DISTRO }}-${{ inputs.ARCH }}"
22-
runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-22.04' || (inputs.ARCH == 'arm64' && 'ubuntu-22.04-arm' || inputs.ARCH) }}
22+
runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-latest' || (inputs.ARCH == 'arm64' && 'ubuntu-22.04-arm' || inputs.ARCH) }}
2323

2424
steps:
2525
- run: pip install gitpython

src/README.md.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
## Install
44

55
```bash
6-
# Configure ROS 2 apt repository
7-
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /etc/apt/keyrings/ros-archive-keyring.gpg
8-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list
9-
106
# Configure custom ROS repository
117
echo "deb [trusted=yes] @REPO_URL@ ./" | sudo tee /etc/apt/sources.list.d/@DISTRO_NAME@.list
128

src/prepare.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ function create_chroot {
8888

8989

9090
local tmp; tmp=$(mktemp "/tmp/ros-builder-XXXXXX.sh")
91+
# shellcheck disable=SC2001
9192
cat <<- EOF > "$tmp"
93+
set -x # bash debug mode
9294
mkdir -p /etc/apt/keyrings
93-
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /etc/apt/keyrings/ros-archive-keyring.gpg
94-
$INSTALL_GPG_KEYS
95+
$(echo "$INSTALL_GPG_KEYS" | sed 's/sudo //')
9596
echo "Acquire::http::Proxy \"http://127.0.0.1:3142\";" > tee /etc/apt/apt.conf.d/01acng
9697
EOF
9798

@@ -104,13 +105,12 @@ EOF
104105
local chroot_folder="/var/cache/sbuild-chroot"
105106
# shellcheck disable=SC2016
106107
ici_cmd ici_asroot mmdebstrap \
107-
--variant=buildd --include=apt,apt-utils,ccache,ca-certificates,curl,build-essential,debhelper,fakeroot,cmake,git,python3-rosdep,python3-catkin-pkg \
108+
--variant=buildd --include=apt,apt-utils,ccache,ca-certificates,curl,build-essential,debhelper,fakeroot,cmake,git \
108109
--customize-hook="upload $tmp $tmp" \
109110
--customize-hook="chroot \$1 chmod 755 $tmp" \
110111
--customize-hook="chroot \$1 sh -c $tmp" \
111112
"$DEB_DISTRO" "$chroot_folder" \
112-
"deb $DISTRIBUTION_REPO $DEB_DISTRO main universe" \
113-
"deb [signed-by=/etc/apt/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $DEB_DISTRO main"
113+
"deb $DISTRIBUTION_REPO $DEB_DISTRO main universe"
114114

115115
ici_log
116116
ici_color_output BOLD "Write schroot config"

src/scripts/prepare.sh

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ ici_append INSTALL_HOST_GPG_KEYS "sudo apt-key adv --keyserver keyserver.ubuntu.
1414
ici_append EXTRA_HOST_SOURCES "deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/sbuild/ubuntu jammy main"
1515
ici_cmd restrict_src_to_packages "release o=v-launchpad-jochen-sprickerhof-de" "mmdebstrap sbuild"
1616

17-
# ROS for python3-rosdep, python3-colcon-*
18-
ros_key_file="/etc/apt/keyrings/ros-archive-keyring.gpg"
19-
ici_append INSTALL_HOST_GPG_KEYS "sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o $ros_key_file"
20-
ici_append EXTRA_HOST_SOURCES "deb [signed-by=$ros_key_file] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main"
21-
2217
# Configure sources
2318
ici_hook INSTALL_HOST_GPG_KEYS
2419
ici_timed "Configure EXTRA_HOST_SOURCES" configure_extra_host_sources
@@ -30,19 +25,18 @@ echo apt-cacher-ng apt-cacher-ng/tunnelenable boolean true | ici_asroot debconf-
3025

3126
# Install packages on host
3227
DEBIAN_FRONTEND=noninteractive ici_timed "Install build packages" ici_cmd "${APT_QUIET[@]}" ici_apt_install \
33-
mmdebstrap sbuild schroot devscripts ccache apt-cacher-ng python3-pip python3-rosdep libxml2-utils libarchive-tools \
34-
python3-colcon-package-information python3-colcon-package-selection python3-colcon-ros python3-colcon-cmake \
35-
python3-stdeb python3-all dh-python build-essential
28+
mmdebstrap sbuild schroot devscripts ccache apt-cacher-ng python3-pip libxml2-utils libarchive-tools \
29+
debhelper python3-all dh-python build-essential
3630

31+
export PIP_BREAK_SYSTEM_PACKAGES=1
3732
# Install patched bloom to handle ROS "one" distro key when resolving python and ROS version
3833
ici_timed "Install bloom" ici_asroot pip install -U git+https://github.com/rhaschke/bloom.git@ros-one
3934
# Install patched vcstool to allow for treeless clones
4035
ici_timed "Install vcstool" ici_asroot pip install -U git+https://github.com/rhaschke/vcstool.git@master
41-
42-
# Remove ros2 package repository, now that rosdep and colcon are installed
43-
# This repo might have newer versions, e.g. of colcon, than the ones to be built
44-
ici_asroot sed -i '/packages.ros.org\/ros2\/ubuntu/d' "$REPOS_LIST_FILE"
45-
ici_timed "Update apt package list" ici_asroot apt-get update
36+
# Install latest stdeb
37+
ici_timed "Install stdeb" ici_asroot pip install -U git+https://github.com/astraw/stdeb@master
38+
# Install colcon and rosdep from pypi
39+
ici_timed "Install rosdep and colcon" ici_asroot pip install -U rosdep colcon-package-information colcon-package-selection colcon-ros colcon-cmake
4640

4741
# remove existing rosdep config to avoid conflicts with rosdep init
4842
ici_asroot rm -f /etc/ros/rosdep/sources.list.d/20-default.list

0 commit comments

Comments
 (0)