Skip to content

Commit 6dde49d

Browse files
committed
move to local workflow script
1 parent 3c80444 commit 6dde49d

File tree

2 files changed

+7
-80
lines changed

2 files changed

+7
-80
lines changed

.github/workflows/debian-packages.yml

Lines changed: 4 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -84,86 +84,13 @@ jobs:
8484
steps:
8585
- name: Checkout code
8686
uses: actions/checkout@v4
87-
88-
- name: Setup build environment
89-
run: |
90-
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
91-
apt-get update -qq && apt-get install -y build-essential python3-pip python3-bloom python3-rosdep git lsb-release devscripts debhelper fakeroot
92-
shell: bash
93-
94-
- name: Install Python dependencies
95-
run: |
96-
if [[ "${{ matrix.ros_distro }}" == "jazzy" || \
97-
"${{ matrix.ros_distro }}" == "kilted" || \
98-
"${{ matrix.ros_distro }}" == "rolling" ]]; then
99-
pip3 install --break-system-packages -I pygments -r requirements.txt
100-
python3 -m pip install -U --break-system-packages bloom
101-
else
102-
pip3 install -r requirements.txt
103-
python3 -m pip install -U bloom
104-
fi
105-
shell: bash
106-
107-
- name: Build workspace
87+
88+
- name: Build Debian packages
10889
run: |
109-
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
110-
colcon build --packages-up-to r2s_gw
111-
source install/setup.bash
90+
chmod +x scripts/build_debian_packages.sh
91+
./scripts/build_debian_packages.sh ${{ matrix.ros_distro }} ${{ matrix.ubuntu_distro }}
11292
shell: bash
11393

114-
- name: Setup rosdep mappings
115-
run: |
116-
echo "Adding local rosdep mappings..."
117-
mkdir -p /root/.ros/rosdep
118-
cat >/root/.ros/rosdep/local.yaml <<EOF
119-
greenwave_monitor_interfaces:
120-
ubuntu:
121-
jammy: [ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces]
122-
noble: [ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces]
123-
greenwave_monitor:
124-
ubuntu:
125-
jammy: [ros-${{ matrix.ros_distro }}-greenwave-monitor]
126-
noble: [ros-${{ matrix.ros_distro }}-greenwave-monitor]
127-
EOF
128-
mkdir -p /etc/ros/rosdep/sources.list.d
129-
echo "yaml file:///root/.ros/rosdep/local.yaml" > /etc/ros/rosdep/sources.list.d/99-local.list
130-
rosdep init || true
131-
rosdep update --include-eol-distros
132-
133-
- name: Generate Debian packages
134-
run: |
135-
set -eo pipefail
136-
mkdir -p debian_packages/${{ matrix.ros_distro }}
137-
138-
# Generate debian packages for greenwave_monitor_interfaces
139-
echo "Generating debian for greenwave_monitor_interfaces..."
140-
cd greenwave_monitor_interfaces
141-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
142-
cp ../ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb ../debian_packages/${{ matrix.ros_distro }}/
143-
cd ..
144-
145-
# Install interfaces package
146-
echo "Installing greenwave_monitor_interfaces..."
147-
apt-get update && apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor-interfaces_*.deb
148-
149-
# Generate debian packages for greenwave_monitor
150-
echo "Generating debian for greenwave_monitor..."
151-
cd greenwave_monitor
152-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
153-
cp ../ros-${{ matrix.ros_distro }}-greenwave-monitor_*.deb ../debian_packages/${{ matrix.ros_distro }}/
154-
cd ..
155-
apt-get update && apt-get install -y ./debian_packages/${{ matrix.ros_distro }}/ros-${{ matrix.ros_distro }}-greenwave-monitor*.deb
156-
157-
# Generate debian packages for r2s_gw
158-
echo "Generating debian for r2s_gw..."
159-
cd r2s_gw
160-
bloom-generate rosdebian --ros-distro ${{ matrix.ros_distro }} && apt-get build-dep . -y && fakeroot debian/rules binary
161-
cp ../ros-${{ matrix.ros_distro }}-r2s-gw_*.deb ../debian_packages/${{ matrix.ros_distro }}/
162-
cd ..
163-
164-
echo "Generated debian packages:"
165-
ls -la debian_packages/${{ matrix.ros_distro }}/
166-
16794
- name: Upload Debian packages
16895
uses: actions/upload-artifact@v4
16996
with:

.github/workflows/ros-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ jobs:
7575
with:
7676
name: test-results-${{ matrix.ros_distro }}
7777
path: |
78-
build/
79-
install/
80-
log/
78+
build/*/test_results/**/*.xml
79+
log/latest_test/**/*.xml
80+
log/*/test_results/**/*.xml
8181
retention-days: 7
8282

8383
- name: Publish test results

0 commit comments

Comments
 (0)