Skip to content

Commit 28292a7

Browse files
committed
try ghcr.io
1 parent 58388d5 commit 28292a7

File tree

3 files changed

+24
-34
lines changed

3 files changed

+24
-34
lines changed

.github/workflows/debian-packages.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ jobs:
5656
5757
generate-debian:
5858
name: Generate Debian packages for ROS2 ${{ matrix.ros_distro }}
59-
runs-on: ubuntu-${{ matrix.ubuntu_distro }}
59+
runs-on: ubuntu-latest
6060
needs: [determine-distros]
6161
if: always() && (needs.check-tests.result == 'success' || needs.check-tests.result == 'skipped')
62+
container: ghcr.io/ros/ros:${{ matrix.ros_distro }}-ros-base-${{ matrix.ubuntu_distro }}
6263

6364
strategy:
6465
fail-fast: false
@@ -83,14 +84,10 @@ jobs:
8384
submodules: recursive
8485
token: ${{ secrets.GITHUB_TOKEN }}
8586

86-
- name: Setup ROS2 ${{ matrix.ros_distro }}
87-
uses: ros-tooling/[email protected]
88-
with:
89-
required-ros-distributions: ${{ matrix.ros_distro }}
90-
9187
- name: Setup build environment
9288
run: |
93-
sudo apt-get update -qq && sudo apt-get install -y build-essential python3-pip python3-bloom python3-rosdep git lsb-release devscripts debhelper fakeroot
89+
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
90+
apt-get update -qq && apt-get install -y build-essential python3-pip python3-bloom python3-rosdep git lsb-release devscripts debhelper fakeroot
9491
9592
- name: Install Python dependencies
9693
run: |
@@ -113,8 +110,8 @@ jobs:
113110
- name: Setup rosdep mappings
114111
run: |
115112
echo "Adding local rosdep mappings..."
116-
sudo mkdir -p /root/.ros/rosdep
117-
sudo tee /root/.ros/rosdep/local.yaml > /dev/null <<EOF
113+
mkdir -p /root/.ros/rosdep
114+
cat >/root/.ros/rosdep/local.yaml <<EOF
118115
greenwave_monitor_interfaces:
119116
ubuntu:
120117
jammy: [ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces]
@@ -124,9 +121,9 @@ jobs:
124121
jammy: [ros-${{ matrix.ros_distro }}-greenwave-monitor]
125122
noble: [ros-${{ matrix.ros_distro }}-greenwave-monitor]
126123
EOF
127-
sudo mkdir -p /etc/ros/rosdep/sources.list.d
128-
echo "yaml file:///root/.ros/rosdep/local.yaml" | sudo tee /etc/ros/rosdep/sources.list.d/99-local.list > /dev/null
129-
sudo rosdep init || true
124+
mkdir -p /etc/ros/rosdep/sources.list.d
125+
echo "yaml file:///root/.ros/rosdep/local.yaml" > /etc/ros/rosdep/sources.list.d/99-local.list
126+
rosdep init || true
130127
rosdep update --include-eol-distros
131128
132129
- name: Generate Debian packages
@@ -137,26 +134,26 @@ jobs:
137134
# Generate debian packages for greenwave_monitor_interfaces
138135
echo "Generating debian for greenwave_monitor_interfaces..."
139136
cd greenwave_monitor_interfaces
140-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && sudo apt-get build-dep . -y && fakeroot debian/rules binary
137+
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
141138
cp ../ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb ../debian_packages/${{ matrix.ros_distro }}/
142139
cd ..
143140
144141
# Install interfaces package
145142
echo "Installing greenwave_monitor_interfaces..."
146-
sudo apt-get update && sudo apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb
143+
apt-get update && apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb
147144
148145
# Generate debian packages for greenwave_monitor
149146
echo "Generating debian for greenwave_monitor..."
150147
cd greenwave_monitor
151-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && sudo apt-get build-dep . -y && fakeroot debian/rules binary
148+
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
152149
cp ../ros-${{ matrix.ros_distro }}-greenwave-monitor_*.deb ../debian_packages/${{ matrix.ros_distro }}/
153150
cd ..
154-
sudo apt-get update && sudo apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor*.deb
151+
apt-get update && apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor*.deb
155152
156153
# Generate debian packages for r2s_gw
157154
echo "Generating debian for r2s_gw..."
158155
cd r2s_gw
159-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && sudo apt-get build-dep . -y && fakeroot debian/rules binary
156+
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
160157
cp ../ros-${{ matrix.ros_distro }}-r2s-gw_*.deb ../debian_packages/${{ matrix.ros_distro }}/
161158
cd ..
162159

.github/workflows/ros-tests.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ env:
1313
jobs:
1414
test:
1515
name: Test ROS2 ${{ matrix.ros_distro }}
16-
runs-on: ubuntu-${{ matrix.ubuntu_distro }}
16+
runs-on: ubuntu-latest
17+
container: ghcr.io/ros/ros:${{ matrix.ros_distro }}-ros-base-${{ matrix.ubuntu_distro }}
1718

1819
strategy:
1920
fail-fast: false
@@ -37,14 +38,10 @@ jobs:
3738
submodules: recursive
3839
token: ${{ secrets.GITHUB_TOKEN }}
3940

40-
- name: Setup ROS2 ${{ matrix.ros_distro }}
41-
uses: ros-tooling/[email protected]
42-
with:
43-
required-ros-distributions: ${{ matrix.ros_distro }}
44-
45-
- name: Install build dependencies
41+
- name: Setup ROS environment
4642
run: |
47-
sudo apt-get update -qq && sudo apt-get install -y build-essential python3-pip
43+
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
44+
apt-get update -qq && apt-get install -y build-essential python3-pip
4845
4946
- name: Install Python dependencies
5047
run: |

.github/workflows/smoke-tests.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ jobs:
3838
3939
smoke-test:
4040
name: Smoke test ROS2 ${{ matrix.ros_distro }}
41-
runs-on: ubuntu-${{ matrix.ubuntu_distro }}
41+
runs-on: ubuntu-latest
4242
needs: [determine-distros]
43+
container: ghcr.io/ros/ros:${{ matrix.ros_distro }}-ros-base-${{ matrix.ubuntu_distro }}
4344

4445
strategy:
4546
fail-fast: false
@@ -58,14 +59,9 @@ jobs:
5859
ubuntu_distro: noble
5960

6061
steps:
61-
- name: Setup ROS2 ${{ matrix.ros_distro }}
62-
uses: ros-tooling/[email protected]
63-
with:
64-
required-ros-distributions: ${{ matrix.ros_distro }}
65-
6662
- name: Setup environment
6763
run: |
68-
sudo apt-get update -qq
64+
apt-get update -qq
6965
7066
- name: Download Debian packages
7167
uses: actions/download-artifact@v4
@@ -80,13 +76,13 @@ jobs:
8076
ls -la debian_packages/${{ matrix.ros_distro }}/
8177
8278
# Install the debian packages
83-
sudo apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor_*.deb ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-r2s-gw_*.deb
79+
apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor_*.deb ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-r2s-gw_*.deb
8480
8581
# Verify packages are installed
8682
dpkg -s ros-${{ matrix.ros_distro }}-r2s-gw ros-${{ matrix.ros_distro }}-greenwave-monitor ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces
8783
8884
# Install Python dependencies
89-
sudo apt-get install -y python3-pip || true
85+
apt-get install -y python3-pip || true
9086
if [[ "${{ matrix.ros_distro }}" == "jazzy" || \
9187
"${{ matrix.ros_distro }}" == "kilted" || \
9288
"${{ matrix.ros_distro }}" == "rolling" ]]; then

0 commit comments

Comments
 (0)