From 6b31992d94fc71ef1f4118bf4726b02409888e23 Mon Sep 17 00:00:00 2001 From: mbloechli Date: Tue, 14 Jul 2026 17:33:23 +0200 Subject: [PATCH] feat(ci): migrate to reusable orchestrator with gist badges Replace the per-distro build-*.yml workflows and local reusable_ici.yml/ pre-commit.yml with a single ci.yml calling ci_orchestrator.yml@v1, and switch the README CI badges to gist-backed status endpoints. Drop the ROS Humble build; the orchestrator matrix covers jazzy/kilted/lyrical/rolling only. --- .github/workflows/build-humble.yml | 23 --------- .github/workflows/build-jazzy.yml | 23 --------- .github/workflows/build-kilted.yml | 23 --------- .github/workflows/build-lyrical.yml | 23 --------- .github/workflows/build-rolling.yml | 23 --------- .github/workflows/ci.yml | 25 ++++++++++ .github/workflows/pre-commit.yml | 21 --------- .github/workflows/reusable_ici.yml | 72 ----------------------------- README.md | 5 +- 9 files changed, 29 insertions(+), 209 deletions(-) delete mode 100644 .github/workflows/build-humble.yml delete mode 100644 .github/workflows/build-jazzy.yml delete mode 100644 .github/workflows/build-kilted.yml delete mode 100644 .github/workflows/build-lyrical.yml delete mode 100644 .github/workflows/build-rolling.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/pre-commit.yml delete mode 100644 .github/workflows/reusable_ici.yml diff --git a/.github/workflows/build-humble.yml b/.github/workflows/build-humble.yml deleted file mode 100644 index 5833eaa..0000000 --- a/.github/workflows/build-humble.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Humble -on: - workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main - schedule: - # Run every morning at 01:00 to detect flakiness and broken dependencies - - cron: '0 1 * * *' - timezone: "Europe/Zurich" - -jobs: - jazzy_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: humble - ros_repo: main - upstream_workspace: '' - ref_for_scheduled_build: main - before_install_upstream_dependencies: 'sudo apt install -y libboost-regex-dev' diff --git a/.github/workflows/build-jazzy.yml b/.github/workflows/build-jazzy.yml deleted file mode 100644 index 3229af8..0000000 --- a/.github/workflows/build-jazzy.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Jazzy -on: - workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main - schedule: - # Run every morning at 01:00 to detect flakiness and broken dependencies - - cron: '0 1 * * *' - timezone: "Europe/Zurich" - -jobs: - jazzy_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: jazzy - ros_repo: main - upstream_workspace: '' - ref_for_scheduled_build: main - before_install_upstream_dependencies: 'sudo apt install -y libboost-regex-dev' diff --git a/.github/workflows/build-kilted.yml b/.github/workflows/build-kilted.yml deleted file mode 100644 index cc728d5..0000000 --- a/.github/workflows/build-kilted.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Kilted -on: - workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main - schedule: - # Run every morning at 01:00 to detect flakiness and broken dependencies - - cron: '0 1 * * *' - timezone: "Europe/Zurich" - -jobs: - kilted_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: kilted - ros_repo: main - upstream_workspace: '' - ref_for_scheduled_build: main - before_install_upstream_dependencies: 'sudo apt install -y libboost-regex-dev' diff --git a/.github/workflows/build-lyrical.yml b/.github/workflows/build-lyrical.yml deleted file mode 100644 index b17102f..0000000 --- a/.github/workflows/build-lyrical.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Lyrical -on: - workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main - schedule: - # Run every morning at 01:00 to detect flakiness and broken dependencies - - cron: '0 1 * * *' - timezone: "Europe/Zurich" - -jobs: - kilted_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: lyrical - ros_repo: main - upstream_workspace: '' - ref_for_scheduled_build: main - before_install_upstream_dependencies: 'sudo apt install -y libboost-regex-dev' diff --git a/.github/workflows/build-rolling.yml b/.github/workflows/build-rolling.yml deleted file mode 100644 index 7097b00..0000000 --- a/.github/workflows/build-rolling.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Rolling -on: - workflow_dispatch: - pull_request: - branches: - - main - push: - branches: - - main - schedule: - # Run every morning at 01:00 to detect flakiness and broken dependencies - - cron: '0 1 * * *' - timezone: "Europe/Zurich" - -jobs: - rolling_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: rolling - ros_repo: testing - upstream_workspace: '' - ref_for_scheduled_build: main - before_install_upstream_dependencies: 'sudo apt install -y libboost-regex-dev' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e4ccf73 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI +on: + workflow_dispatch: + inputs: + ros_distro: + description: 'Distro to build' + type: choice + options: [all, jazzy, kilted, lyrical, rolling] + default: all + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + push: + branches: [main] + schedule: + # Run every morning at 01:00 to detect flakiness and broken dependencies + - cron: '0 1 * * *' + timezone: "Europe/Zurich" + +jobs: + ci: + uses: Duatic/ci-workflows/.github/workflows/ci_orchestrator.yml@v1 + with: + ros_distro: ${{ inputs.ros_distro }} + badge_gist_id: fc9d126a4ab745f8a8d37f9b6b6c83a9 + secrets: inherit diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 88cd711..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: pre-commit - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - pre-commit: - name: Format - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 - with: - python-version: '3.10' - - uses: pre-commit/action@v3.0.1 - with: - extra_args: --all-files --hook-stage manual diff --git a/.github/workflows/reusable_ici.yml b/.github/workflows/reusable_ici.yml deleted file mode 100644 index 18bf735..0000000 --- a/.github/workflows/reusable_ici.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Reusable industrial_ci workflow -# original author: Denis Štogl - -on: - workflow_call: - inputs: - timeout_minutes: - description: 'Maximum time the job is allowed to run.' - default: 30 - required: false - type: number - ref_for_scheduled_build: - description: 'Reference on which the repo should be checkout for scheduled build. Usually is this name of a branch or a tag.' - default: '' - required: false - type: string - - upstream_workspace: - description: 'UPSTREAM_WORKSPACE variable for industrial_ci. Usually path to local .repos file.' - required: true - type: string - ros_distro: - description: 'ROS_DISTRO variable for industrial_ci' - required: true - type: string - ros_repo: - description: 'ROS_REPO to run for industrial_ci. Possible values: "main", "testing"' - default: 'main' - required: false - type: string - before_install_upstream_dependencies: - description: 'BEFORE_INSTALL_UPSTREAM_DEPENDENCIES variable for industrial_ci' - default: '' - required: false - type: string - ccache_dir: - description: 'CCache dir that should be used. Relative to github.workspace' - default: '.ccache' - required: false - type: string - -jobs: - reusable_ici: - name: ${{ inputs.ros_distro }} ${{ inputs.ros_repo }} - timeout-minutes: ${{ inputs.timeout_minutes }} - runs-on: ubuntu-latest - env: - CCACHE_DIR: ${{ github.workspace }}/${{ inputs.ccache_dir }} - CACHE_PREFIX: ${{ inputs.ros_distro }}-${{ inputs.upstream_workspace }}-${{ inputs.ros_repo }}-${{ github.job }} - steps: - - name: Checkout ${{ github.ref_name }} since build is not scheduled - if: ${{ github.event_name != 'schedule' }} - uses: actions/checkout@v6 - - name: Checkout ${{ inputs.ref_for_scheduled_build }} on scheduled build - if: ${{ github.event_name == 'schedule' }} - uses: actions/checkout@v6 - with: - ref: ${{ inputs.ref_for_scheduled_build }} - - name: Cache ccache - uses: actions/cache@v5 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: - UPSTREAM_WORKSPACE: ${{ inputs.upstream_workspace }} - ROS_DISTRO: ${{ inputs.ros_distro }} - ROS_REPO: ${{ inputs.ros_repo }} - BEFORE_INSTALL_UPSTREAM_DEPENDENCIES: ${{ inputs.before_install_upstream_dependencies }} diff --git a/README.md b/README.md index f3031ef..dcaf2a4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ A modern c++20 logging solution which can either log to a ROS2 backend or be used standalone -[![Humble](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-humble.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-humble.yml) [![Jazzy](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-jazzy.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-jazzy.yml) [![Kilted](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-kilted.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-kilted.yml) [![Lyrical](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-lyrical.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-lyrical.yml) [![Rolling](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-rolling.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_message_logger/actions/workflows/build-rolling.yml) +[![Jazzy](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/fc9d126a4ab745f8a8d37f9b6b6c83a9/raw/duatic_message_logger-jazzy.json)](https://github.com/Duatic/duatic_message_logger/actions/workflows/ci.yml) +[![Kilted](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/fc9d126a4ab745f8a8d37f9b6b6c83a9/raw/duatic_message_logger-kilted.json)](https://github.com/Duatic/duatic_message_logger/actions/workflows/ci.yml) +[![Lyrical](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/fc9d126a4ab745f8a8d37f9b6b6c83a9/raw/duatic_message_logger-lyrical.json)](https://github.com/Duatic/duatic_message_logger/actions/workflows/ci.yml) +[![Rolling](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/fc9d126a4ab745f8a8d37f9b6b6c83a9/raw/duatic_message_logger-rolling.json)](https://github.com/Duatic/duatic_message_logger/actions/workflows/ci.yml) It provides a compat header with the old `MELO` style logging macros.