From cd381116eeae4a843c2d5364545bbe82cb867798 Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Tue, 1 Sep 2026 09:46:55 +0200 Subject: [PATCH 1/9] Bump CI actions Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 14 +++++++++----- .github/workflows/nightly.yml | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83b5fe4..323df60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,11 +21,12 @@ jobs: container: image: ${{ matrix.docker_image }} steps: - - uses: actions/checkout@v3 - - uses: ros-tooling/setup-ros@0.7.13 + #- run: apt-get update && apt-get install -y curl gnupg + - uses: actions/checkout@v7 + - uses: ros-tooling/setup-ros@0.7.19 with: required-ros-distributions: ${{ matrix.ros_distribution }} - - uses : ros-tooling/action-ros-ci@0.4.3 + - uses : ros-tooling/action-ros-ci@0.4.8 with: package-name: "micro_ros_utilities" target-ros2-distro: ${{ matrix.ros_distribution }} @@ -36,6 +37,9 @@ jobs: } } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v5 with: - file: ros_ws/lcov/total_coverage.info + files: ros_ws/lcov/total_coverage.info + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 8da5668..849f81d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -27,11 +27,12 @@ jobs: container: image: ${{ matrix.docker_image }} steps: - - uses: actions/checkout@v3 - - uses: ros-tooling/setup-ros@0.7.13 + #- run: apt-get update && apt-get install -y curl gnupg + - uses: actions/checkout@v7 + - uses: ros-tooling/setup-ros@0.7.19 with: required-ros-distributions: ${{ matrix.ros_distribution }} - - uses : ros-tooling/action-ros-ci@0.4.3 + - uses : ros-tooling/action-ros-ci@0.4.8 with: package-name: "micro_ros_utilities" target-ros2-distro: ${{ matrix.ros_distribution }} @@ -42,6 +43,9 @@ jobs: } } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v5 with: - file: ros_ws/lcov/total_coverage.info + files: ros_ws/lcov/total_coverage.info + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false From f0e30a10eba51e465207ab4091cdad19569759b4 Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Tue, 1 Sep 2026 10:31:37 +0200 Subject: [PATCH 2/9] Fix codecov Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 15 ++++++++++++++- .github/workflows/nightly.yml | 27 +++++++++++++++++++++------ 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 323df60..f8c486d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,16 +20,19 @@ jobs: ros_distribution: rolling container: image: ${{ matrix.docker_image }} + steps: - #- run: apt-get update && apt-get install -y curl gnupg - uses: actions/checkout@v7 + - uses: ros-tooling/setup-ros@0.7.19 with: required-ros-distributions: ${{ matrix.ros_distribution }} + - uses : ros-tooling/action-ros-ci@0.4.8 with: package-name: "micro_ros_utilities" target-ros2-distro: ${{ matrix.ros_distribution }} + coverage-result: false colcon-defaults: | { "build": { @@ -37,6 +40,16 @@ jobs: } } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + + - name: Coverage results + working-directory: ros_ws + run: | + . /opt/ros/${{ matrix.ros_distribution }}/setup.sh + colcon lcov-result --initial --lcov-args " --ignore-errors" mismatch + colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args " --ignore-errors" mismatch + + - run: apt-get update && apt-get install -y gnupg # Needed for codecov action + - uses: codecov/codecov-action@v5 with: files: ros_ws/lcov/total_coverage.info diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 849f81d..9989575 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,26 +16,31 @@ jobs: fail-fast: false matrix: include: - - docker_image: ubuntu:24.04 + - docker_image: ubuntu:26.04 ros_distribution: rolling - - docker_image: ubuntu:jammy - ros_distribution: iron - - docker_image: ubuntu:jammy - ros_distribution: humble + - docker_image: ubuntu:26.04 + ros_distribution: lyrical + - docker_image: ubuntu:24.04 + ros_distribution: kilted - docker_image: ubuntu:24.04 ros_distribution: jazzy + - docker_image: ubuntu:jammy + ros_distribution: humble container: image: ${{ matrix.docker_image }} + steps: - #- run: apt-get update && apt-get install -y curl gnupg - uses: actions/checkout@v7 + - uses: ros-tooling/setup-ros@0.7.19 with: required-ros-distributions: ${{ matrix.ros_distribution }} + - uses : ros-tooling/action-ros-ci@0.4.8 with: package-name: "micro_ros_utilities" target-ros2-distro: ${{ matrix.ros_distribution }} + coverage-result: false colcon-defaults: | { "build": { @@ -43,6 +48,16 @@ jobs: } } colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml + + - name: Coverage results + working-directory: ros_ws + run: | + . /opt/ros/${{ matrix.ros_distribution }}/setup.sh + colcon lcov-result --initial --lcov-args " --ignore-errors" mismatch + colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args " --ignore-errors" mismatch + + - run: apt-get update && apt-get install -y gnupg # Needed for codecov action + - uses: codecov/codecov-action@v5 with: files: ros_ws/lcov/total_coverage.info From 02aa56c3d81ba9e2a47c1eb4748eb97dbdc0fbee Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Tue, 1 Sep 2026 10:50:38 +0200 Subject: [PATCH 3/9] Fix codecov 2 Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 4 ++-- .github/workflows/nightly.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8c486d..d5d4026 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,8 +45,8 @@ jobs: working-directory: ros_ws run: | . /opt/ros/${{ matrix.ros_distribution }}/setup.sh - colcon lcov-result --initial --lcov-args " --ignore-errors" mismatch - colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args " --ignore-errors" mismatch + colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" + colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" - run: apt-get update && apt-get install -y gnupg # Needed for codecov action diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9989575..a4b5913 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -53,8 +53,8 @@ jobs: working-directory: ros_ws run: | . /opt/ros/${{ matrix.ros_distribution }}/setup.sh - colcon lcov-result --initial --lcov-args " --ignore-errors" mismatch - colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args " --ignore-errors" mismatch + colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" + colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" - run: apt-get update && apt-get install -y gnupg # Needed for codecov action From e1d2ed37618c55ac9479a5ff87b6c6ebc140ad59 Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Thu, 10 Sep 2026 15:21:04 +0200 Subject: [PATCH 4/9] Remove coverage from nightly Signed-off-by: David Laseca Perez --- .github/workflows/nightly.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a4b5913..90a546b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -41,26 +41,3 @@ jobs: package-name: "micro_ros_utilities" target-ros2-distro: ${{ matrix.ros_distribution }} coverage-result: false - colcon-defaults: | - { - "build": { - "mixin": [ "coverage-gcc" ] - } - } - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - - name: Coverage results - working-directory: ros_ws - run: | - . /opt/ros/${{ matrix.ros_distribution }}/setup.sh - colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" - colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" - - - run: apt-get update && apt-get install -y gnupg # Needed for codecov action - - - uses: codecov/codecov-action@v5 - with: - files: ros_ws/lcov/total_coverage.info - disable_search: true - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false From 70f60a46550dc31922dad42fb3711dab11c97a28 Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Thu, 10 Sep 2026 15:21:44 +0200 Subject: [PATCH 5/9] Update CI Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5d4026..7c55501 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,9 @@ name: CI micro_ros_utilities on: + push: + branches: + - rolling pull_request: branches: - '**' @@ -16,7 +19,7 @@ jobs: fail-fast: false matrix: include: - - docker_image: ubuntu:24.04 + - docker_image: ubuntu:26.04 ros_distribution: rolling container: image: ${{ matrix.docker_image }} @@ -48,6 +51,15 @@ jobs: colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" + echo "===== Check that the coverage report exists and is non-empty =====" + test -s lcov/total_coverage.info + + echo "===== Overall coverage summary =====" + lcov --summary lcov/total_coverage.info + + echo "===== Coverage breakdown by file =====" + lcov --list lcov/total_coverage.info + - run: apt-get update && apt-get install -y gnupg # Needed for codecov action - uses: codecov/codecov-action@v5 @@ -55,4 +67,5 @@ jobs: files: ros_ws/lcov/total_coverage.info disable_search: true token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: false + fail_ci_if_error: true + verbose: true From 02f3ea41836aa457ac542c76001828fdabc452ed Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Thu, 10 Sep 2026 15:34:10 +0200 Subject: [PATCH 6/9] Set 'rolling' to 'ubuntu:24' Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 2 +- .github/workflows/nightly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c55501..c85fdb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: include: - - docker_image: ubuntu:26.04 + - docker_image: ubuntu:24.04 ros_distribution: rolling container: image: ${{ matrix.docker_image }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 90a546b..3605e2b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: include: - - docker_image: ubuntu:26.04 + - docker_image: ubuntu:24.04 ros_distribution: rolling - docker_image: ubuntu:26.04 ros_distribution: lyrical From 5e17d8a556dc7ce5cb085562936ce1b3539380c5 Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Thu, 10 Sep 2026 15:47:46 +0200 Subject: [PATCH 7/9] Fix coverage 3 Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c85fdb1..bd2a293 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,23 +48,36 @@ jobs: working-directory: ros_ws run: | . /opt/ros/${{ matrix.ros_distribution }}/setup.sh + colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" - echo "===== Check that the coverage report exists and is non-empty =====" + echo "=============== LCOV version ===========================================================" + lcov --version + + echo "\n=============== Check that the coverage report exists and is non-empty ===============" test -s lcov/total_coverage.info - echo "===== Overall coverage summary =====" - lcov --summary lcov/total_coverage.info + echo "\n=============== Keep coverage for library source and headers =========================" + lcov --branch-coverage --extract lcov/total_coverage.info \ + '*/micro_ros_utilities/src/*' \ + '*/micro_ros_utilities/include/*' \ + --output-file lcov/micro_ros_utilities_coverage.info + + echo "\n=============== Check that the library coverage report exists and is non-empty =======" + test -s lcov/micro_ros_utilities_coverage.info + + echo "\n=============== Library coverage summary, including branches =========================" + lcov --branch-coverage --summary lcov/micro_ros_utilities_coverage.info - echo "===== Coverage breakdown by file =====" - lcov --list lcov/total_coverage.info + echo "\n=============== Source files included in the coverage upload (SF records) ============" + grep '^SF:' lcov/micro_ros_utilities_coverage.info - run: apt-get update && apt-get install -y gnupg # Needed for codecov action - uses: codecov/codecov-action@v5 with: - files: ros_ws/lcov/total_coverage.info + files: ros_ws/lcov/micro_ros_utilities_coverage.info disable_search: true token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true From 754e327c788942e654b546036d2e35d952d527b3 Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Thu, 10 Sep 2026 15:57:07 +0200 Subject: [PATCH 8/9] Fix coverage 4 Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd2a293..9a0055b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,25 +52,26 @@ jobs: colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" - echo "=============== LCOV version ===========================================================" + printf '\n%s\n' "=============== LCOV version ===========================================================" lcov --version - echo "\n=============== Check that the coverage report exists and is non-empty ===============" + printf '\n%s\n' "=============== Check that the coverage report exists and is non-empty ===============" test -s lcov/total_coverage.info - echo "\n=============== Keep coverage for library source and headers =========================" - lcov --branch-coverage --extract lcov/total_coverage.info \ + printf '\n%s\n' "=============== Keep coverage for library source and headers =========================" + # Headers may have no instrumented code, leaving their pattern unused. + lcov --branch-coverage --ignore-errors unused --extract lcov/total_coverage.info \ '*/micro_ros_utilities/src/*' \ '*/micro_ros_utilities/include/*' \ --output-file lcov/micro_ros_utilities_coverage.info - echo "\n=============== Check that the library coverage report exists and is non-empty =======" + printf '\n%s\n' "=============== Check that the library coverage report exists and is non-empty =======" test -s lcov/micro_ros_utilities_coverage.info - echo "\n=============== Library coverage summary, including branches =========================" + printf '\n%s\n' "=============== Library coverage summary, including branches =========================" lcov --branch-coverage --summary lcov/micro_ros_utilities_coverage.info - echo "\n=============== Source files included in the coverage upload (SF records) ============" + printf '\n%s\n' "=============== Source files included in the coverage upload (SF records) ============" grep '^SF:' lcov/micro_ros_utilities_coverage.info - run: apt-get update && apt-get install -y gnupg # Needed for codecov action From 11a6e3693de36dd45cecaea29862f1e7b1270a3d Mon Sep 17 00:00:00 2001 From: David Laseca Perez Date: Thu, 10 Sep 2026 16:30:46 +0200 Subject: [PATCH 9/9] Clean debugging options Signed-off-by: David Laseca Perez --- .github/workflows/ci.yml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a0055b..a3c1b7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,36 +50,26 @@ jobs: . /opt/ros/${{ matrix.ros_distribution }}/setup.sh colcon lcov-result --initial --lcov-args="--ignore-errors=mismatch" - colcon lcov-result --packages-select micro_ros_utilities --verbose --lcov-args="--ignore-errors=mismatch" - - printf '\n%s\n' "=============== LCOV version ===========================================================" - lcov --version - - printf '\n%s\n' "=============== Check that the coverage report exists and is non-empty ===============" + colcon lcov-result --packages-select micro_ros_utilities --lcov-args="--ignore-errors=mismatch" test -s lcov/total_coverage.info - printf '\n%s\n' "=============== Keep coverage for library source and headers =========================" # Headers may have no instrumented code, leaving their pattern unused. lcov --branch-coverage --ignore-errors unused --extract lcov/total_coverage.info \ '*/micro_ros_utilities/src/*' \ '*/micro_ros_utilities/include/*' \ --output-file lcov/micro_ros_utilities_coverage.info - printf '\n%s\n' "=============== Check that the library coverage report exists and is non-empty =======" test -s lcov/micro_ros_utilities_coverage.info - - printf '\n%s\n' "=============== Library coverage summary, including branches =========================" - lcov --branch-coverage --summary lcov/micro_ros_utilities_coverage.info - - printf '\n%s\n' "=============== Source files included in the coverage upload (SF records) ============" - grep '^SF:' lcov/micro_ros_utilities_coverage.info + # --ignore-errors unused means lcov stays quiet if 'src/*' also stops + # matching, so assert both library sources actually survived the extract. + test "$(grep -c '^SF:' lcov/micro_ros_utilities_coverage.info)" -ge 2 - run: apt-get update && apt-get install -y gnupg # Needed for codecov action - - uses: codecov/codecov-action@v5 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 with: files: ros_ws/lcov/micro_ros_utilities_coverage.info disable_search: true token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - verbose: true + fail_ci_if_error: false