Skip to content

Commit 58388d5

Browse files
committed
try ros tools?
1 parent dbdbb1c commit 58388d5

File tree

3 files changed

+34
-24
lines changed

3 files changed

+34
-24
lines changed

.github/workflows/debian-packages.yml

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

6463
strategy:
6564
fail-fast: false
@@ -84,10 +83,14 @@ jobs:
8483
submodules: recursive
8584
token: ${{ secrets.GITHUB_TOKEN }}
8685

86+
- name: Setup ROS2 ${{ matrix.ros_distro }}
87+
uses: ros-tooling/[email protected]
88+
with:
89+
required-ros-distributions: ${{ matrix.ros_distro }}
90+
8791
- name: Setup build environment
8892
run: |
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
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
9194
9295
- name: Install Python dependencies
9396
run: |
@@ -110,8 +113,8 @@ jobs:
110113
- name: Setup rosdep mappings
111114
run: |
112115
echo "Adding local rosdep mappings..."
113-
mkdir -p /root/.ros/rosdep
114-
cat >/root/.ros/rosdep/local.yaml <<EOF
116+
sudo mkdir -p /root/.ros/rosdep
117+
sudo tee /root/.ros/rosdep/local.yaml > /dev/null <<EOF
115118
greenwave_monitor_interfaces:
116119
ubuntu:
117120
jammy: [ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces]
@@ -121,9 +124,9 @@ jobs:
121124
jammy: [ros-${{ matrix.ros_distro }}-greenwave-monitor]
122125
noble: [ros-${{ matrix.ros_distro }}-greenwave-monitor]
123126
EOF
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
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
127130
rosdep update --include-eol-distros
128131
129132
- name: Generate Debian packages
@@ -134,26 +137,26 @@ jobs:
134137
# Generate debian packages for greenwave_monitor_interfaces
135138
echo "Generating debian for greenwave_monitor_interfaces..."
136139
cd greenwave_monitor_interfaces
137-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
140+
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && sudo apt-get build-dep . -y && fakeroot debian/rules binary
138141
cp ../ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb ../debian_packages/${{ matrix.ros_distro }}/
139142
cd ..
140143
141144
# Install interfaces package
142145
echo "Installing greenwave_monitor_interfaces..."
143-
apt-get update && apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb
146+
sudo apt-get update && sudo apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb
144147
145148
# Generate debian packages for greenwave_monitor
146149
echo "Generating debian for greenwave_monitor..."
147150
cd greenwave_monitor
148-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
151+
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && sudo apt-get build-dep . -y && fakeroot debian/rules binary
149152
cp ../ros-${{ matrix.ros_distro }}-greenwave-monitor_*.deb ../debian_packages/${{ matrix.ros_distro }}/
150153
cd ..
151-
apt-get update && apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor*.deb
154+
sudo apt-get update && sudo apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor*.deb
152155
153156
# Generate debian packages for r2s_gw
154157
echo "Generating debian for r2s_gw..."
155158
cd r2s_gw
156-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
159+
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && sudo apt-get build-dep . -y && fakeroot debian/rules binary
157160
cp ../ros-${{ matrix.ros_distro }}-r2s-gw_*.deb ../debian_packages/${{ matrix.ros_distro }}/
158161
cd ..
159162

.github/workflows/ros-tests.yml

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

1918
strategy:
2019
fail-fast: false
@@ -38,10 +37,14 @@ jobs:
3837
submodules: recursive
3938
token: ${{ secrets.GITHUB_TOKEN }}
4039

41-
- name: Setup ROS environment
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
4246
run: |
43-
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
44-
apt-get update -qq && apt-get install -y build-essential python3-pip
47+
sudo apt-get update -qq && sudo apt-get install -y build-essential python3-pip
4548
4649
- name: Install Python dependencies
4750
run: |

.github/workflows/smoke-tests.yml

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

4544
strategy:
4645
fail-fast: false
@@ -59,9 +58,14 @@ jobs:
5958
ubuntu_distro: noble
6059

6160
steps:
61+
- name: Setup ROS2 ${{ matrix.ros_distro }}
62+
uses: ros-tooling/[email protected]
63+
with:
64+
required-ros-distributions: ${{ matrix.ros_distro }}
65+
6266
- name: Setup environment
6367
run: |
64-
apt-get update -qq
68+
sudo apt-get update -qq
6569
6670
- name: Download Debian packages
6771
uses: actions/download-artifact@v4
@@ -76,13 +80,13 @@ jobs:
7680
ls -la debian_packages/${{ matrix.ros_distro }}/
7781
7882
# Install the debian packages
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
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
8084
8185
# Verify packages are installed
8286
dpkg -s ros-${{ matrix.ros_distro }}-r2s-gw ros-${{ matrix.ros_distro }}-greenwave-monitor ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces
8387
8488
# Install Python dependencies
85-
apt-get install -y python3-pip || true
89+
sudo apt-get install -y python3-pip || true
8690
if [[ "${{ matrix.ros_distro }}" == "jazzy" || \
8791
"${{ matrix.ros_distro }}" == "kilted" || \
8892
"${{ matrix.ros_distro }}" == "rolling" ]]; then

0 commit comments

Comments
 (0)