From e4d48052ce25e9cdfb02adb09471d52610f5d87e 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 | 22 --------- .github/workflows/build-jazzy.yml | 22 --------- .github/workflows/build-kilted.yml | 22 --------- .github/workflows/build-lyrical.yml | 22 --------- .github/workflows/build-rolling.yml | 22 --------- .github/workflows/ci.yml | 25 ++++++++++ .github/workflows/pre-commit.yml | 27 ---------- .github/workflows/reusable_ici.yml | 77 ----------------------------- README.md | 9 ++-- 9 files changed, 29 insertions(+), 219 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 372ab1d..0000000 --- a/.github/workflows/build-humble.yml +++ /dev/null @@ -1,22 +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: - humble_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: humble - ros_repo: main - upstream_workspace: '' - ref_for_scheduled_build: main diff --git a/.github/workflows/build-jazzy.yml b/.github/workflows/build-jazzy.yml deleted file mode 100644 index 646f953..0000000 --- a/.github/workflows/build-jazzy.yml +++ /dev/null @@ -1,22 +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 diff --git a/.github/workflows/build-kilted.yml b/.github/workflows/build-kilted.yml deleted file mode 100644 index 17cbcfa..0000000 --- a/.github/workflows/build-kilted.yml +++ /dev/null @@ -1,22 +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 diff --git a/.github/workflows/build-lyrical.yml b/.github/workflows/build-lyrical.yml deleted file mode 100644 index b7d4b49..0000000 --- a/.github/workflows/build-lyrical.yml +++ /dev/null @@ -1,22 +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: - lyrical_binary_main: - uses: ./.github/workflows/reusable_ici.yml - with: - ros_distro: lyrical - ros_repo: main - upstream_workspace: '' - ref_for_scheduled_build: main diff --git a/.github/workflows/build-rolling.yml b/.github/workflows/build-rolling.yml deleted file mode 100644 index 0ec9c36..0000000 --- a/.github/workflows/build-rolling.yml +++ /dev/null @@ -1,22 +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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4daea5f --- /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: a055d8ea7458cf656b2d3e4adc18ab8c + secrets: inherit diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 2ec15f8..0000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: pre-commit - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - pre_commit: - name: Format - runs-on: 'ubuntu-latest' - - steps: - - name: Checkout - uses: actions/checkout@v6 - - - name: Setup Python - uses: actions/setup-python@v6 - with: - python-version: '3.13' - - - name: Run pre-commit - 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 f886e00..0000000 --- a/.github/workflows/reusable_ici.yml +++ /dev/null @@ -1,77 +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 }} - BEFORE_INIT: 'apt-get update -qq && apt-get install -y -qq git && git config --global url."https://${{ secrets.token }}@github.com/".insteadOf "https://github.com/"' diff --git a/README.md b/README.md index 7847ad4..e1c5d63 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Duatic Control -[![Humble](https://github.com/Duatic/duatic_control/actions/workflows/build-humble.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_control/actions/workflows/build-humble.yml) -[![Jazzy](https://github.com/Duatic/duatic_control/actions/workflows/build-jazzy.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_control/actions/workflows/build-jazzy.yml) -[![Kilted](https://github.com/Duatic/duatic_control/actions/workflows/build-kilted.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_control/actions/workflows/build-kilted.yml) -[![Lyrical](https://github.com/Duatic/duatic_control/actions/workflows/build-lyrical.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_control/actions/workflows/build-lyrical.yml) -[![Rolling](https://github.com/Duatic/duatic_control/actions/workflows/build-rolling.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_control/actions/workflows/build-rolling.yml) +[![Jazzy](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/a055d8ea7458cf656b2d3e4adc18ab8c/raw/duatic_control-jazzy.json)](https://github.com/Duatic/duatic_control/actions/workflows/ci.yml) +[![Kilted](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/a055d8ea7458cf656b2d3e4adc18ab8c/raw/duatic_control-kilted.json)](https://github.com/Duatic/duatic_control/actions/workflows/ci.yml) +[![Lyrical](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/a055d8ea7458cf656b2d3e4adc18ab8c/raw/duatic_control-lyrical.json)](https://github.com/Duatic/duatic_control/actions/workflows/ci.yml) +[![Rolling](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/a055d8ea7458cf656b2d3e4adc18ab8c/raw/duatic_control-rolling.json)](https://github.com/Duatic/duatic_control/actions/workflows/ci.yml) Compact ros2_control integration for Duatic robots.