From a0bb3378a16160034e1b94b6190ad66e8676b840 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. --- .github/workflows/build-jazzy.yml | 20 -------- .github/workflows/build-kilted.yml | 20 -------- .github/workflows/build-lyrical.yml | 20 -------- .github/workflows/build-rolling.yml | 20 -------- .github/workflows/ci.yml | 25 ++++++++++ .github/workflows/pre-commit.yml | 27 ---------- .github/workflows/reusable_ici.yml | 76 ----------------------------- README.md | 8 +-- 8 files changed, 29 insertions(+), 187 deletions(-) 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-jazzy.yml b/.github/workflows/build-jazzy.yml deleted file mode 100644 index be9faae..0000000 --- a/.github/workflows/build-jazzy.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Jazzy -on: - workflow_dispatch: - pull_request: - 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: 'repos.list' - ref_for_scheduled_build: main diff --git a/.github/workflows/build-kilted.yml b/.github/workflows/build-kilted.yml deleted file mode 100644 index e682b8e..0000000 --- a/.github/workflows/build-kilted.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Kilted -on: - workflow_dispatch: - pull_request: - 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: 'repos.list' - ref_for_scheduled_build: main diff --git a/.github/workflows/build-lyrical.yml b/.github/workflows/build-lyrical.yml deleted file mode 100644 index 45d33f2..0000000 --- a/.github/workflows/build-lyrical.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Lyrical -on: - workflow_dispatch: - pull_request: - 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: 'repos.list' - ref_for_scheduled_build: main diff --git a/.github/workflows/build-rolling.yml b/.github/workflows/build-rolling.yml deleted file mode 100644 index 5816780..0000000 --- a/.github/workflows/build-rolling.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Rolling -on: - workflow_dispatch: - pull_request: - 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: 'repos.list' - ref_for_scheduled_build: main diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ad5efdf --- /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: 06f17a22e665926311f010c778ea2391 + secrets: inherit diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 7eb6ae7..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@v7 - - - 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 7621a94..0000000 --- a/.github/workflows/reusable_ici.yml +++ /dev/null @@ -1,76 +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@v7 - - - name: Checkout ${{ inputs.ref_for_scheduled_build }} on scheduled build - if: ${{ github.event_name == 'schedule' }} - uses: actions/checkout@v7 - with: - ref: ${{ inputs.ref_for_scheduled_build }} - - - name: Cache ccache - uses: actions/cache@v6 - 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 23cf7ca..0be4bce 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # duatic_gamepad_interface -[![Jazzy](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-jazzy.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-jazzy.yml) -[![Kilted](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-kilted.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-kilted.yml) -[![Lyrical](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-lyrical.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-lyrical.yml) -[![Rolling](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-rolling.yml/badge.svg?branch=main)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/build-rolling.yml) +[![Jazzy](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/06f17a22e665926311f010c778ea2391/raw/duatic_gamepad_interface-jazzy.json)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/ci.yml) +[![Kilted](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/06f17a22e665926311f010c778ea2391/raw/duatic_gamepad_interface-kilted.json)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/ci.yml) +[![Lyrical](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/06f17a22e665926311f010c778ea2391/raw/duatic_gamepad_interface-lyrical.json)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/ci.yml) +[![Rolling](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mbloechli/06f17a22e665926311f010c778ea2391/raw/duatic_gamepad_interface-rolling.json)](https://github.com/Duatic/duatic_gamepad_interface/actions/workflows/ci.yml) This repository provides a modular gamepad interface for Duatic products, enabling intuitive control of robots like the DynaArm. It supports various controller types and features a dynamic focus mechanism for controlling different robotic components (e.g., arms, hip, platform).