From 28a09ebefba4287d36b19c414db4e1b2efe10ac6 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Mon, 7 Jul 2025 10:53:40 +0200 Subject: [PATCH 01/26] Trying ci on other OSes Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test-win-mac.yaml diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml new file mode 100644 index 00000000..cbdcd435 --- /dev/null +++ b/.github/workflows/test-win-mac.yaml @@ -0,0 +1,34 @@ +name: Test diagnostics on windows and macos +on: + pull_request: + push: + branches: + - ros2-kilted + schedule: + # Run every week at 20:00 on Sunday + - cron: "0 20 * * 0" + +jobs: + build_and_test: + name: ${{ matrix.package }} on ${{ matrix.distro }} + strategy: + fail-fast: false + matrix: + package: [ + diagnostic_aggregator, + diagnostic_common_diagnostics, + diagnostic_remote_logging, + diagnostic_updater, + self_test, + ] + distro: [rolling] + os: [macOS-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: ros-tooling/setup-ros@master + with: + required-ros-distributions: ${{ matrix.distro }} + - uses: ros-tooling/action-ros-ci@master + with: + target-ros2-distro: ${{ matrix.distro }} + package-name: ${{ matrix.package }} From 14cf35ca1da72bf9d92a2adca9b8be23f166d1ad Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Mon, 7 Jul 2025 10:56:15 +0200 Subject: [PATCH 02/26] on / under Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index cbdcd435..12897a78 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -10,7 +10,7 @@ on: jobs: build_and_test: - name: ${{ matrix.package }} on ${{ matrix.distro }} + name: ${{ matrix.package }} on ${{ matrix.os }} under ${{ matrix.distro }} strategy: fail-fast: false matrix: From 0bc58cc7c7fd4ffd83c39747cc2386beb8e6237a Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Mon, 7 Jul 2025 11:04:00 +0200 Subject: [PATCH 03/26] windows-2019 Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 12897a78..3e774f98 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -22,7 +22,11 @@ jobs: self_test, ] distro: [rolling] - os: [macOS-latest, windows-latest] + # According to https://github.com/ros-tooling/action-ros-ci/blob/eed42df3e61c71e19310bcb06078bc63f629c59c/.github/workflows/test.yml#L70, only windows-2019 is supported. + os: [ + # macOS-latest, + windows-2019 + ] runs-on: ${{ matrix.os }} steps: - uses: ros-tooling/setup-ros@master From e0846a30161e36d0476741382b3273c6f592ed5d Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Thu, 10 Jul 2025 10:12:00 +0200 Subject: [PATCH 04/26] welcome to 2022 Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 3e774f98..d61ab2b8 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -22,10 +22,9 @@ jobs: self_test, ] distro: [rolling] - # According to https://github.com/ros-tooling/action-ros-ci/blob/eed42df3e61c71e19310bcb06078bc63f629c59c/.github/workflows/test.yml#L70, only windows-2019 is supported. os: [ # macOS-latest, - windows-2019 + windows-2022 ] runs-on: ${{ matrix.os }} steps: From 66c72c5b9ec911c0248b66e9df0e2d0341aa0edb Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Thu, 10 Jul 2025 14:19:21 +0200 Subject: [PATCH 05/26] push on ros2 branch .. Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index d61ab2b8..0f8b2fc2 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -3,7 +3,7 @@ on: pull_request: push: branches: - - ros2-kilted + - ros2 schedule: # Run every week at 20:00 on Sunday - cron: "0 20 * * 0" From 972b5f219873a0d4e6e5d309b9056b000d76c7e5 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Thu, 10 Jul 2025 14:20:03 +0200 Subject: [PATCH 06/26] using main branches Signed-off-by: Christian Henkel --- .github/workflows/lint.yaml | 4 ++-- .github/workflows/test-win-mac.yaml | 4 ++-- .github/workflows/test.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 28bcfcb2..6f42fc5f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -32,10 +32,10 @@ jobs: AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: 1 steps: - uses: actions/checkout@v1 - - uses: ros-tooling/setup-ros@master + - uses: ros-tooling/setup-ros@main with: required-ros-distributions: ${{ matrix.distro }} - - uses: ros-tooling/action-ros-lint@master + - uses: ros-tooling/action-ros-lint@main with: linter: ${{ matrix.linter }} package-name: | diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 0f8b2fc2..f27685a1 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -28,10 +28,10 @@ jobs: ] runs-on: ${{ matrix.os }} steps: - - uses: ros-tooling/setup-ros@master + - uses: ros-tooling/setup-ros@main with: required-ros-distributions: ${{ matrix.distro }} - - uses: ros-tooling/action-ros-ci@master + - uses: ros-tooling/action-ros-ci@main with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d92ce5f4..bd755b77 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,10 +27,10 @@ jobs: runs-on: ubuntu-latest container: ubuntu:${{ matrix.os }} steps: - - uses: ros-tooling/setup-ros@master + - uses: ros-tooling/setup-ros@main with: required-ros-distributions: ${{ matrix.distro }} - - uses: ros-tooling/action-ros-ci@master + - uses: ros-tooling/action-ros-ci@main with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} From 5cdacec6a280f9bcefc91b7f21826704120d5264 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Thu, 10 Jul 2025 14:21:32 +0200 Subject: [PATCH 07/26] master of lin Signed-off-by: Christian Henkel --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6f42fc5f..216ccc31 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -35,7 +35,7 @@ jobs: - uses: ros-tooling/setup-ros@main with: required-ros-distributions: ${{ matrix.distro }} - - uses: ros-tooling/action-ros-lint@main + - uses: ros-tooling/action-ros-lint@master with: linter: ${{ matrix.linter }} package-name: | From afc49d9d5c57625b008a77d656063022a3e8a3b4 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Thu, 10 Jul 2025 14:28:28 +0200 Subject: [PATCH 08/26] fixed setup version Signed-off-by: Christian Henkel --- .github/workflows/lint.yaml | 2 +- .github/workflows/test-win-mac.yaml | 2 +- .github/workflows/test.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 216ccc31..b90cd80f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -32,7 +32,7 @@ jobs: AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: 1 steps: - uses: actions/checkout@v1 - - uses: ros-tooling/setup-ros@main + - uses: ros-tooling/setup-ros@0.7.15 with: required-ros-distributions: ${{ matrix.distro }} - uses: ros-tooling/action-ros-lint@master diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index f27685a1..0cc390af 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -28,7 +28,7 @@ jobs: ] runs-on: ${{ matrix.os }} steps: - - uses: ros-tooling/setup-ros@main + - uses: ros-tooling/setup-ros@0.7.15 with: required-ros-distributions: ${{ matrix.distro }} - uses: ros-tooling/action-ros-ci@main diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bd755b77..90c04841 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -27,7 +27,7 @@ jobs: runs-on: ubuntu-latest container: ubuntu:${{ matrix.os }} steps: - - uses: ros-tooling/setup-ros@main + - uses: ros-tooling/setup-ros@0.7.15 with: required-ros-distributions: ${{ matrix.distro }} - uses: ros-tooling/action-ros-ci@main From 9684f4578e24dcb5912b9c332351cf3701e5ffc0 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Mon, 25 Aug 2025 15:32:57 +0200 Subject: [PATCH 09/26] windows-latest Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 0cc390af..b5f89654 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -24,7 +24,7 @@ jobs: distro: [rolling] os: [ # macOS-latest, - windows-2022 + windows-latest ] runs-on: ${{ matrix.os }} steps: From 0755473af3da7e1f5be2e9de0677aeff802af283 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Tue, 30 Sep 2025 09:15:39 +0200 Subject: [PATCH 10/26] Fix windows build --- diagnostic_remote_logging/CMakeLists.txt | 4 ++++ .../include/diagnostic_remote_logging/influxdb.hpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/diagnostic_remote_logging/CMakeLists.txt b/diagnostic_remote_logging/CMakeLists.txt index 4d103d19..0627da4c 100644 --- a/diagnostic_remote_logging/CMakeLists.txt +++ b/diagnostic_remote_logging/CMakeLists.txt @@ -9,6 +9,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) endif() +if(WIN32) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +endif() + set(dependencies ament_cmake rclcpp diff --git a/diagnostic_remote_logging/include/diagnostic_remote_logging/influxdb.hpp b/diagnostic_remote_logging/include/diagnostic_remote_logging/influxdb.hpp index cedc4e07..579d05b8 100644 --- a/diagnostic_remote_logging/include/diagnostic_remote_logging/influxdb.hpp +++ b/diagnostic_remote_logging/include/diagnostic_remote_logging/influxdb.hpp @@ -39,6 +39,10 @@ #ifndef DIAGNOSTIC_REMOTE_LOGGING__INFLUXDB_HPP_ #define DIAGNOSTIC_REMOTE_LOGGING__INFLUXDB_HPP_ +#if defined(_WIN32) +#define NOMINMAX +#endif + #include #include From d16759de9572182c7fdc0344e1f61420041b8f72 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Tue, 21 Oct 2025 15:02:34 +0200 Subject: [PATCH 11/26] different id Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index b5f89654..1fc635be 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -1,4 +1,4 @@ -name: Test diagnostics on windows and macos +name: Test diagnostics (win) on: pull_request: push: @@ -9,7 +9,7 @@ on: - cron: "0 20 * * 0" jobs: - build_and_test: + build_and_test_win: name: ${{ matrix.package }} on ${{ matrix.os }} under ${{ matrix.distro }} strategy: fail-fast: false From 17f45080e1b16e782396503c0fd74e70496e94ee Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Tue, 21 Oct 2025 17:18:11 +0200 Subject: [PATCH 12/26] one package with all distros Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 1fc635be..7b7fcf51 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -15,23 +15,24 @@ jobs: fail-fast: false matrix: package: [ - diagnostic_aggregator, - diagnostic_common_diagnostics, - diagnostic_remote_logging, + # diagnostic_aggregator, + # diagnostic_common_diagnostics, + # diagnostic_remote_logging, diagnostic_updater, - self_test, + # self_test, ] - distro: [rolling] + # distro: [rolling] + distro: [humble, jazzy, kilted, rolling] os: [ # macOS-latest, - windows-latest + windows-2022 ] runs-on: ${{ matrix.os }} steps: - uses: ros-tooling/setup-ros@0.7.15 with: required-ros-distributions: ${{ matrix.distro }} - - uses: ros-tooling/action-ros-ci@main + - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} From afd8115033533b029f1b869078661acb4b44de91 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Tue, 21 Oct 2025 17:41:43 +0200 Subject: [PATCH 13/26] upgrade colcon-meson Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 7b7fcf51..7ea2dcc9 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -32,7 +32,13 @@ jobs: - uses: ros-tooling/setup-ros@0.7.15 with: required-ros-distributions: ${{ matrix.distro }} + - name: Upgrade colcon-meson + # Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'" + run: | + python -m pip install -U + colcon-meson==0.5.0 - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} + vcs-repo-file-url: package-name: ${{ matrix.package }} From cc6fcb8748a0525bef805d23d8817d00a32cb30e Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Tue, 21 Oct 2025 17:47:30 +0200 Subject: [PATCH 14/26] \ Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 7ea2dcc9..92a1134d 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -35,10 +35,9 @@ jobs: - name: Upgrade colcon-meson # Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'" run: | - python -m pip install -U + python -m pip install -U \ colcon-meson==0.5.0 - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} - vcs-repo-file-url: package-name: ${{ matrix.package }} From 45fa261880377ca39a87a7a81423e743fbd08be2 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Tue, 21 Oct 2025 17:52:43 +0200 Subject: [PATCH 15/26] one line. welcome to windows Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 92a1134d..8da41f52 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -34,9 +34,7 @@ jobs: required-ros-distributions: ${{ matrix.distro }} - name: Upgrade colcon-meson # Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'" - run: | - python -m pip install -U \ - colcon-meson==0.5.0 + run: python -m pip install -U colcon-meson==0.5.0 - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} From 1c0b85378195b201a86786f2619efe54ffbf6d70 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 09:45:30 +0200 Subject: [PATCH 16/26] More packages Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index 8da41f52..b03b8487 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -15,11 +15,11 @@ jobs: fail-fast: false matrix: package: [ - # diagnostic_aggregator, - # diagnostic_common_diagnostics, - # diagnostic_remote_logging, + diagnostic_aggregator, + diagnostic_common_diagnostics, + diagnostic_remote_logging, diagnostic_updater, - # self_test, + self_test, ] # distro: [rolling] distro: [humble, jazzy, kilted, rolling] @@ -39,3 +39,5 @@ jobs: with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} + # All of this is quite unstable, atm: + continue-on-error: true From 1fee478e132734cefbba2c394423ad5c76618d55 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 09:54:08 +0200 Subject: [PATCH 17/26] being clever about branch Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 90c04841..0ede865e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,8 +9,31 @@ on: - cron: "0 20 * * 0" jobs: + ros_distro_from_branch_name: + runs-on: ubuntu-latest + outputs: + distro: ${{ steps.set-distro.outputs.distro }} + steps: + - name: Set ROS distro from branch name + id: set-distro + run: | + if [[ "${GITHUB_REF##*/}" == *"ros2"* ]]; then + distro="rolling" + elif [[ "${GITHUB_REF##*/}" == *"ros2-humble"* ]]; then + distro="humble" + elif [[ "${GITHUB_REF##*/}" == *"ros2-jazzy"* ]]; then + distro="jazzy" + elif [[ "${GITHUB_REF##*/}" == *"ros2-kilted"* ]]; then + distro="kilted" + else + echo "Unknown branch for determining ROS distro: ${GITHUB_REF##*/}" + exit 1 + fi + echo "Determined ROS distro to be: ${distro} :)" + echo "distro=$distro" >> $GITHUB_OUTPUT build_and_test: - name: ${{ matrix.package }} on ${{ matrix.distro }} + name: ${{ matrix.package }} on under ${{ matrix.distro }} + needs: ros_distro_from_branch_name strategy: fail-fast: false matrix: @@ -22,7 +45,7 @@ jobs: self_test, ] include: - - distro: rolling + - distro: ${{ needs.ros_distro_from_branch_name.outputs.distro }} os: 24.04 runs-on: ubuntu-latest container: ubuntu:${{ matrix.os }} From ff2044c793d04c0ffbf9a780b603f1d9a24c3355 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 09:56:29 +0200 Subject: [PATCH 18/26] Should work for both, push and PRs Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0ede865e..055e7a59 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,19 +17,28 @@ jobs: - name: Set ROS distro from branch name id: set-distro run: | - if [[ "${GITHUB_REF##*/}" == *"ros2"* ]]; then + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "This is a PR. Getting branch name from head ref." + branch_name="${{ github.event.pull_request.head.ref }}" + else + echo "This is a push. Getting branch name from GITHUB_REF." + branch_name="${GITHUB_REF##*/}" + fi + echo "> Branch name is: ${branch_name}" + + if [[ "${branch_name}" == *"ros2"* ]]; then distro="rolling" - elif [[ "${GITHUB_REF##*/}" == *"ros2-humble"* ]]; then + elif [[ "${branch_name}" == *"ros2-humble"* ]]; then distro="humble" - elif [[ "${GITHUB_REF##*/}" == *"ros2-jazzy"* ]]; then + elif [[ "${branch_name}" == *"ros2-jazzy"* ]]; then distro="jazzy" - elif [[ "${GITHUB_REF##*/}" == *"ros2-kilted"* ]]; then + elif [[ "${branch_name}" == *"ros2-kilted"* ]]; then distro="kilted" else - echo "Unknown branch for determining ROS distro: ${GITHUB_REF##*/}" + echo "! Unknown branch for determining ROS distro: ${GITHUB_REF##*/}" exit 1 fi - echo "Determined ROS distro to be: ${distro} :)" + echo "> Determined ROS distro to be: ${distro}!" echo "distro=$distro" >> $GITHUB_OUTPUT build_and_test: name: ${{ matrix.package }} on under ${{ matrix.distro }} From e0b9b690fd327b7d49e94de13e5d21ee1f6dafba Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 10:04:13 +0200 Subject: [PATCH 19/26] custom vsc file Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml index b03b8487..9cb3dad8 100644 --- a/.github/workflows/test-win-mac.yaml +++ b/.github/workflows/test-win-mac.yaml @@ -39,5 +39,6 @@ jobs: with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} + vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos # All of this is quite unstable, atm: - continue-on-error: true + # continue-on-error: true From d3c2fe487d0dcfbca1f9ade1366271c89a5d1411 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 10:08:59 +0200 Subject: [PATCH 20/26] Getting branch names differently Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 055e7a59..d7db7e34 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,11 +18,11 @@ jobs: id: set-distro run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "This is a PR. Getting branch name from head ref." - branch_name="${{ github.event.pull_request.head.ref }}" + echo "This is a PR. Getting branch name from base ref." + branch_name="${{ github.event.pull_request.base.ref }}" else - echo "This is a push. Getting branch name from GITHUB_REF." - branch_name="${GITHUB_REF##*/}" + echo "This is a push. Getting branch name from head ref." + branch_name="${{ github.head_ref }}" fi echo "> Branch name is: ${branch_name}" From 75c637b80bb0913b8d3b5a1788ed4c57217cef72 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 10:17:33 +0200 Subject: [PATCH 21/26] one yml file Signed-off-by: Christian Henkel --- .github/workflows/test-win-mac.yaml | 44 ----------------------------- .github/workflows/test.yaml | 32 ++++++++++++++++++++- 2 files changed, 31 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/test-win-mac.yaml diff --git a/.github/workflows/test-win-mac.yaml b/.github/workflows/test-win-mac.yaml deleted file mode 100644 index 9cb3dad8..00000000 --- a/.github/workflows/test-win-mac.yaml +++ /dev/null @@ -1,44 +0,0 @@ -name: Test diagnostics (win) -on: - pull_request: - push: - branches: - - ros2 - schedule: - # Run every week at 20:00 on Sunday - - cron: "0 20 * * 0" - -jobs: - build_and_test_win: - name: ${{ matrix.package }} on ${{ matrix.os }} under ${{ matrix.distro }} - strategy: - fail-fast: false - matrix: - package: [ - diagnostic_aggregator, - diagnostic_common_diagnostics, - diagnostic_remote_logging, - diagnostic_updater, - self_test, - ] - # distro: [rolling] - distro: [humble, jazzy, kilted, rolling] - os: [ - # macOS-latest, - windows-2022 - ] - runs-on: ${{ matrix.os }} - steps: - - uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: ${{ matrix.distro }} - - name: Upgrade colcon-meson - # Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'" - run: python -m pip install -U colcon-meson==0.5.0 - - uses: ros-tooling/action-ros-ci@0.4.5 - with: - target-ros2-distro: ${{ matrix.distro }} - package-name: ${{ matrix.package }} - vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos - # All of this is quite unstable, atm: - # continue-on-error: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d7db7e34..d6c9f600 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -41,7 +41,7 @@ jobs: echo "> Determined ROS distro to be: ${distro}!" echo "distro=$distro" >> $GITHUB_OUTPUT build_and_test: - name: ${{ matrix.package }} on under ${{ matrix.distro }} + name: ${{ matrix.package }} under ${{ matrix.distro }} needs: ros_distro_from_branch_name strategy: fail-fast: false @@ -68,3 +68,33 @@ jobs: package-name: ${{ matrix.package }} # vcs-repo-file-url: | # https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos + build_and_test_win: + name: ${{ matrix.package }} under ${{ matrix.distro }} (windows) + needs: ros_distro_from_branch_name + strategy: + fail-fast: false + matrix: + package: [ + diagnostic_aggregator, + diagnostic_common_diagnostics, + diagnostic_remote_logging, + diagnostic_updater, + self_test, + ] + include: + - distro: ${{ needs.ros_distro_from_branch_name.outputs.distro }} + runs-on: windows-2022 + steps: + - uses: ros-tooling/setup-ros@0.7.15 + with: + required-ros-distributions: ${{ matrix.distro }} + - name: Upgrade colcon-meson + # Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'" + run: python -m pip install -U colcon-meson==0.5.0 + - uses: ros-tooling/action-ros-ci@0.4.5 + with: + target-ros2-distro: ${{ matrix.distro }} + package-name: ${{ matrix.package }} + vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos + # All of this is quite unstable, atm: + # continue-on-error: true \ No newline at end of file From 3adeba4663be0c5ef0964f94c06b7a363eada083 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 12:02:02 +0200 Subject: [PATCH 22/26] catkin_pkg is still missing somehow Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d6c9f600..d1147c4a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -95,6 +95,6 @@ jobs: with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} - vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos + # vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos # All of this is quite unstable, atm: # continue-on-error: true \ No newline at end of file From 5ef50f87104c9249577a1cd77bf4737649115150 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 12:10:51 +0200 Subject: [PATCH 23/26] rosdep Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d1147c4a..40f235d4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -90,7 +90,11 @@ jobs: required-ros-distributions: ${{ matrix.distro }} - name: Upgrade colcon-meson # Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'" - run: python -m pip install -U colcon-meson==0.5.0 + run: python -m pip install -U colcon-meson==0.5.0 + - name: Install package dependencies + run: | + rosdep update + rosdep install --from-paths src/diagnostics/${{ matrix.package }} --ignore-src -r -y - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} From 90e08a8342b8b0222eeb5750fea2cd7fe2a4b4c2 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 12:30:56 +0200 Subject: [PATCH 24/26] --from-paths src Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 40f235d4..faff58cd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -62,7 +62,7 @@ jobs: - uses: ros-tooling/setup-ros@0.7.15 with: required-ros-distributions: ${{ matrix.distro }} - - uses: ros-tooling/action-ros-ci@main + - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} package-name: ${{ matrix.package }} @@ -94,7 +94,7 @@ jobs: - name: Install package dependencies run: | rosdep update - rosdep install --from-paths src/diagnostics/${{ matrix.package }} --ignore-src -r -y + rosdep install --from-paths src --ignore-src -r -y - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} From dde5f47fbb568b828defc2b9b944f20d2751d939 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 12:35:29 +0200 Subject: [PATCH 25/26] ? Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index faff58cd..699dabbe 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -94,7 +94,7 @@ jobs: - name: Install package dependencies run: | rosdep update - rosdep install --from-paths src --ignore-src -r -y + rosdep install --from-paths D:\a\diagnostics\diagnostics --ignore-src -r -y - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }} From 74cb3ec3a16e719766b8d79782d5585c4065eab4 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 22 Oct 2025 13:02:28 +0200 Subject: [PATCH 26/26] Just install for current package Signed-off-by: Christian Henkel --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 699dabbe..8ef934b6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -94,7 +94,7 @@ jobs: - name: Install package dependencies run: | rosdep update - rosdep install --from-paths D:\a\diagnostics\diagnostics --ignore-src -r -y + rosdep install ${{ matrix.package }} -r -y - uses: ros-tooling/action-ros-ci@0.4.5 with: target-ros2-distro: ${{ matrix.distro }}