From 10fa223977c2c5fd4f1b08838a29ee49df04b36d Mon Sep 17 00:00:00 2001 From: 25kgozon <2025215scprep.org@gmail.com> Date: Thu, 5 Mar 2026 16:24:48 -0500 Subject: [PATCH 1/4] m --- .github/workflows/ros2-ci.yml | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/ros2-ci.yml diff --git a/.github/workflows/ros2-ci.yml b/.github/workflows/ros2-ci.yml new file mode 100644 index 0000000..da916c9 --- /dev/null +++ b/.github/workflows/ros2-ci.yml @@ -0,0 +1,82 @@ +name: ROS 2 Full Stack CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + # ----------------------------------------------------------------------- + # 1. Checkout the release repo + all 12 submodules recursively + # ----------------------------------------------------------------------- + - name: Checkout repository with submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + # ----------------------------------------------------------------------- + # 2. Install ROS 2 Humble + # ----------------------------------------------------------------------- + - name: Setup ROS 2 Humble + uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: humble + + # ----------------------------------------------------------------------- + # 3. System dependencies not covered by rosdep + # (hardware drivers, serial libs, Qt5 for RViz plugins, etc.) + # ----------------------------------------------------------------------- + - name: Install extra system dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libusb-1.0-0-dev \ + libserial-dev \ + python3-vcstool \ + python3-colcon-common-extensions \ + libqt5widgets5 \ + qtbase5-dev \ + qtbase5-dev-tools + + # ----------------------------------------------------------------------- + # 4. Install all ROS dep from every package in src/ + # ----------------------------------------------------------------------- + - name: Install ROS dependencies via rosdep + run: | + sudo rosdep init || true + rosdep update + rosdep install \ + --from-paths src \ + --ignore-src \ + --rosdistro humble \ + -r -y + + # ----------------------------------------------------------------------- + # 5. Build the full workspace + # - tensor_detector skipped: requires CUDA/GPU (not on GH runners) + # ----------------------------------------------------------------------- + - name: Build workspace with colcon + run: | + source /opt/ros/humble/setup.bash + colcon build \ + --packages-skip tensor_detector \ + --cmake-args -DCMAKE_BUILD_TYPE=Release \ + --event-handlers console_cohesion+ + + # ----------------------------------------------------------------------- + # 6. Upload build logs on failure for easy diagnosis + # ----------------------------------------------------------------------- + - name: Upload build logs on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: build-logs + path: | + log/ + build/*/stderr.log + retention-days: 7 From d7d5d467938954924752a954bd5a757edef78ae2 Mon Sep 17 00:00:00 2001 From: 25kgozon <2025215scprep.org@gmail.com> Date: Thu, 5 Mar 2026 16:33:10 -0500 Subject: [PATCH 2/4] m --- .github/workflows/ros2-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ros2-ci.yml b/.github/workflows/ros2-ci.yml index da916c9..13cd0b3 100644 --- a/.github/workflows/ros2-ci.yml +++ b/.github/workflows/ros2-ci.yml @@ -18,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 # ----------------------------------------------------------------------- # 2. Install ROS 2 Humble From 38cefb81403d79a900d3cc783224ae5403a0c439 Mon Sep 17 00:00:00 2001 From: 25kgozon <2025215scprep.org@gmail.com> Date: Thu, 5 Mar 2026 16:46:09 -0500 Subject: [PATCH 3/4] m --- .github/workflows/ros2-ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ros2-ci.yml b/.github/workflows/ros2-ci.yml index 13cd0b3..f58186f 100644 --- a/.github/workflows/ros2-ci.yml +++ b/.github/workflows/ros2-ci.yml @@ -12,14 +12,28 @@ jobs: steps: # ----------------------------------------------------------------------- - # 1. Checkout the release repo + all 12 submodules recursively + # 1. Checkout the release repo (no submodules yet) # ----------------------------------------------------------------------- - - name: Checkout repository with submodules + - name: Checkout repository uses: actions/checkout@v4 with: - submodules: recursive fetch-depth: 0 + # ----------------------------------------------------------------------- + # 2. Initialize submodules with fallback for stale pinned commits + # Some pinned commits may have been removed from the remote (e.g. after + # a force-push). We try the pinned commit first; if the remote no longer + # has it we fall back to the tracked branch tip so CI stays green. + # ----------------------------------------------------------------------- + - name: Checkout submodules (with stale-ref fallback) + run: | + git submodule init + git submodule foreach --quiet 'echo $displaypath' | while read sm; do + echo "--- Updating submodule: $sm" + git submodule update --init --no-recommend-shallow "$sm" \ + || git submodule update --init --remote --no-recommend-shallow "$sm" + done + # ----------------------------------------------------------------------- # 2. Install ROS 2 Humble # ----------------------------------------------------------------------- From 318fd8bb99e73f2fbb00ec486ecb0b29fdbdb5ab Mon Sep 17 00:00:00 2001 From: 25kgozon <2025215scprep.org@gmail.com> Date: Tue, 10 Mar 2026 18:35:57 -0400 Subject: [PATCH 4/4] ci: remove section divider comments from ros2-ci workflow --- .github/workflows/ros2-ci.yml | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ros2-ci.yml b/.github/workflows/ros2-ci.yml index f58186f..c9ecacc 100644 --- a/.github/workflows/ros2-ci.yml +++ b/.github/workflows/ros2-ci.yml @@ -11,20 +11,13 @@ jobs: runs-on: ubuntu-22.04 steps: - # ----------------------------------------------------------------------- - # 1. Checkout the release repo (no submodules yet) - # ----------------------------------------------------------------------- + - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - # ----------------------------------------------------------------------- - # 2. Initialize submodules with fallback for stale pinned commits - # Some pinned commits may have been removed from the remote (e.g. after - # a force-push). We try the pinned commit first; if the remote no longer - # has it we fall back to the tracked branch tip so CI stays green. - # ----------------------------------------------------------------------- + - name: Checkout submodules (with stale-ref fallback) run: | git submodule init @@ -34,18 +27,13 @@ jobs: || git submodule update --init --remote --no-recommend-shallow "$sm" done - # ----------------------------------------------------------------------- - # 2. Install ROS 2 Humble - # ----------------------------------------------------------------------- + - name: Setup ROS 2 Humble uses: ros-tooling/setup-ros@v0.7 with: required-ros-distributions: humble - # ----------------------------------------------------------------------- - # 3. System dependencies not covered by rosdep - # (hardware drivers, serial libs, Qt5 for RViz plugins, etc.) - # ----------------------------------------------------------------------- + - name: Install extra system dependencies run: | sudo apt-get update @@ -58,9 +46,6 @@ jobs: qtbase5-dev \ qtbase5-dev-tools - # ----------------------------------------------------------------------- - # 4. Install all ROS dep from every package in src/ - # ----------------------------------------------------------------------- - name: Install ROS dependencies via rosdep run: | sudo rosdep init || true @@ -71,10 +56,6 @@ jobs: --rosdistro humble \ -r -y - # ----------------------------------------------------------------------- - # 5. Build the full workspace - # - tensor_detector skipped: requires CUDA/GPU (not on GH runners) - # ----------------------------------------------------------------------- - name: Build workspace with colcon run: | source /opt/ros/humble/setup.bash @@ -83,9 +64,7 @@ jobs: --cmake-args -DCMAKE_BUILD_TYPE=Release \ --event-handlers console_cohesion+ - # ----------------------------------------------------------------------- - # 6. Upload build logs on failure for easy diagnosis - # ----------------------------------------------------------------------- + - name: Upload build logs on failure if: failure() uses: actions/upload-artifact@v4