From bfd3f0344c8562e2615a477829ead7e42f142740 Mon Sep 17 00:00:00 2001 From: SamuelFoo Date: Sun, 24 May 2026 23:57:10 +0200 Subject: [PATCH 1/3] fix: update CI configuration to use ubuntu-22.04 and streamline build steps --- .github/workflows/build.yml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 339942f..4ef8c7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,25 +9,14 @@ on: jobs: build: - runs-on: [self-hosted, ros2-humble] + runs-on: ubuntu-22.04 steps: - - name: Setup colcon workspace - run: source /opt/ros/humble/setup.bash - - - name: Check out repo - uses: actions/checkout@v3 + - name: Setup ROS + uses: ros-tooling/setup-ros@v0.7 with: - path: src/bb_msgs - - - name: Install dependencies - run: source /opt/ros/humble/setup.bash && rosdep update && rosdep install --from-paths src -i -r -y + required-ros-distributions: humble - - name: Build - run: source /opt/ros/humble/setup.bash && colcon build --merge-install - - - name: Test - run: source /opt/ros/humble/setup.bash && colcon test --merge-install - - - name: Log Tests if failed - if: failure() - run: colcon test-result --verbose + - name: Build and test + uses: ros-tooling/action-ros-ci@v0.4 + with: + target-ros2-distro: humble From 13b1b4ef37b065a586ef3b2d8351b2aefd5bf341 Mon Sep 17 00:00:00 2001 From: SamuelFoo Date: Mon, 25 May 2026 00:17:45 +0200 Subject: [PATCH 2/3] fix: add package discovery step and update build configuration --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ef8c7e..c5c97dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,20 @@ jobs: with: required-ros-distributions: humble + - name: Checkout + uses: actions/checkout@v4 + with: + path: src/repo + + - name: Discover packages + id: pkgs + run: | + names=$(colcon list --names-only --base-paths src/repo | tr '\n' ' ') + echo "names=$names" >> "$GITHUB_OUTPUT" + echo "Found: $names" + - name: Build and test uses: ros-tooling/action-ros-ci@v0.4 with: target-ros2-distro: humble + package-name: ${{ steps.pkgs.outputs.names }} From 4cf0b10b3c8a9367bfe1ad7db9d610d01e8431d5 Mon Sep 17 00:00:00 2001 From: SamuelFoo Date: Mon, 25 May 2026 00:19:53 +0200 Subject: [PATCH 3/3] fix: use docker image instead --- .github/workflows/build.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5c97dd..7795ca1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,26 +10,30 @@ on: jobs: build: runs-on: ubuntu-22.04 + container: + image: ros:humble-ros-base + defaults: + run: + shell: bash steps: - - name: Setup ROS - uses: ros-tooling/setup-ros@v0.7 - with: - required-ros-distributions: humble - - name: Checkout uses: actions/checkout@v4 with: path: src/repo - - name: Discover packages - id: pkgs + - name: Install rosdeps run: | - names=$(colcon list --names-only --base-paths src/repo | tr '\n' ' ') - echo "names=$names" >> "$GITHUB_OUTPUT" - echo "Found: $names" + apt-get update + rosdep update + rosdep install --from-paths src/repo --ignore-src -y - - name: Build and test - uses: ros-tooling/action-ros-ci@v0.4 - with: - target-ros2-distro: humble - package-name: ${{ steps.pkgs.outputs.names }} + - name: Build + run: | + source /opt/ros/humble/setup.bash + colcon build --event-handlers console_direct+ + + - name: Test + run: | + source /opt/ros/humble/setup.bash + colcon test --event-handlers console_direct+ + colcon test-result --verbose