From 3aca8910f1eccbb1e526eafa8b411ddead17fa35 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 11 Feb 2024 21:09:56 +0000 Subject: [PATCH 1/5] Use workflows from ros2_control_ci --- .github/workflows/build-binary.yml | 2 +- .github/workflows/build-source.yml | 2 +- .github/workflows/debian-build.yml | 2 +- .github/workflows/reusable-debian-build.yml | 78 ------------------ .../workflows/reusable-rhel-binary-build.yml | 82 ------------------- .../reusable-ros-tooling-source-build.yml | 50 ----------- .github/workflows/rhel-semi-binary-build.yml | 2 +- 7 files changed, 4 insertions(+), 214 deletions(-) delete mode 100644 .github/workflows/reusable-debian-build.yml delete mode 100644 .github/workflows/reusable-rhel-binary-build.yml delete mode 100644 .github/workflows/reusable-ros-tooling-source-build.yml diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml index 1c54e87e..a060097b 100644 --- a/.github/workflows/build-binary.yml +++ b/.github/workflows/build-binary.yml @@ -14,7 +14,7 @@ on: jobs: binary: - uses: ros-controls/ros2_control/.github/workflows/reusable-industrial-ci-with-cache.yml@master + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master strategy: matrix: ROS_DISTRO: [rolling, iron, humble] diff --git a/.github/workflows/build-source.yml b/.github/workflows/build-source.yml index 3a31aa8c..202b111b 100644 --- a/.github/workflows/build-source.yml +++ b/.github/workflows/build-source.yml @@ -10,7 +10,7 @@ on: jobs: source_build: - uses: ./.github/workflows/reusable-ros-tooling-source-build.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-ros-tooling-source-build.yml@master strategy: matrix: ROS_DISTRO: [rolling, iron, humble] diff --git a/.github/workflows/debian-build.yml b/.github/workflows/debian-build.yml index bd54edfd..2049ef8c 100644 --- a/.github/workflows/debian-build.yml +++ b/.github/workflows/debian-build.yml @@ -11,7 +11,7 @@ on: jobs: debian_source_build: - uses: ./.github/workflows/reusable-debian-build.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-debian-build.yml@master strategy: matrix: ROS_DISTRO: [rolling, iron, humble] diff --git a/.github/workflows/reusable-debian-build.yml b/.github/workflows/reusable-debian-build.yml deleted file mode 100644 index 7bf53f57..00000000 --- a/.github/workflows/reusable-debian-build.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: Reusable Debian Source Build -# Reusable action to simplify dealing with debian source builds -# author: Christoph Froehlich - -on: - workflow_call: - inputs: - ros_distro: - description: 'ROS2 distribution name' - required: true - type: string - 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: 'Path to local .repos file.' - default: '' - required: false - type: string - skip_packages: - description: 'Packages to skip from build and test' - default: '' - required: false - type: string - skip_packages_test: - description: 'Packages to skip from test additionally to skip_packages' - default: '' - required: false - type: string - - -jobs: - debian_source: - name: ${{ inputs.ros_distro }} debian build - runs-on: ubuntu-latest - env: - ROS_DISTRO: ${{ inputs.ros_distro }} - container: ghcr.io/ros-controls/ros:${{ inputs.ros_distro }}-debian - steps: - - name: Get repository name - # Extract the repository name from the GITHUB_REPOSITORY environment variable - # ${{ github.event.repository.name }} seems to be not working with act - run: echo "path=src/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV - - name: Checkout default ref when build is not scheduled - if: ${{ github.event_name != 'schedule' }} - uses: actions/checkout@v4 - with: - path: ${{ env.path }} - - name: Checkout ${{ inputs.ref_for_scheduled_build }} on scheduled build - if: ${{ github.event_name == 'schedule' }} - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref_for_scheduled_build }} - path: ${{ env.path }} - - name: Import upstream workspace - shell: bash - run: | - if [[ -n "${{ inputs.upstream_workspace }}" ]]; then - vcs import src < ${{ env.path }}/${{ inputs.upstream_workspace }} - fi - - name: Get list of packages - # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time - run: | - echo "package_list=$(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only)" >> $GITHUB_ENV - - name: Build workspace - shell: bash - run: | - source /opt/ros2_ws/install/setup.bash - colcon build --packages-up-to ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} - - name: Test workspace - shell: bash - continue-on-error: true - run: | - source /opt/ros2_ws/install/setup.bash - colcon test --packages-select ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} ${{ inputs.skip_packages_test }} - colcon test-result --verbose diff --git a/.github/workflows/reusable-rhel-binary-build.yml b/.github/workflows/reusable-rhel-binary-build.yml deleted file mode 100644 index 4dcdad00..00000000 --- a/.github/workflows/reusable-rhel-binary-build.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Reusable RHEL Binary Build -# Reusable action to simplify dealing with RHEL binary builds -# author: Christoph Froehlich - -on: - workflow_call: - inputs: - ros_distro: - description: 'ROS2 distribution name' - required: true - type: string - 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: 'Path to local .repos file.' - default: '' - required: false - type: string - skip_packages: - description: 'Packages to skip from build and test' - default: '' - required: false - type: string - skip_packages_test: - description: 'Packages to skip from test additionally to skip_packages' - default: '' - required: false - type: string - -jobs: - rhel_binary: - name: ${{ inputs.ros_distro }} RHEL binary build - runs-on: ubuntu-latest - container: ghcr.io/ros-controls/ros:${{ inputs.ros_distro }}-rhel - steps: - - name: Get repository name - # Extract the repository name from the GITHUB_REPOSITORY environment variable - # ${{ github.event.repository.name }} seems to be not working with act - run: echo "path=src/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV - - name: Checkout default ref when build is not scheduled - if: ${{ github.event_name != 'schedule' }} - uses: actions/checkout@v4 - with: - path: ${{ env.path }} - - name: Checkout ${{ inputs.ref_for_scheduled_build }} on scheduled build - if: ${{ github.event_name == 'schedule' }} - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref_for_scheduled_build }} - path: ${{ env.path }} - - name: Install dependencies - shell: bash - run: | - source /opt/ros/${{ inputs.ros_distro }}/setup.bash - source /opt/ros2_ws/install/local_setup.bash - if [[ -n "${{ inputs.upstream_workspace }}" ]]; then - vcs import src < ${{ env.path }}/${{ inputs.upstream_workspace }} - fi - rosdep update - rosdep install -iyr --from-path src || true - - name: Get list of packages - # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time - run: | - echo "package_list=$(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only)" >> $GITHUB_ENV - - name: Build workspace - shell: bash - # source also underlay workspace with generate_parameter_library on rhel9 - run: | - source /opt/ros/${{ inputs.ros_distro }}/setup.bash - source /opt/ros2_ws/install/local_setup.bash - colcon build --packages-up-to ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} - - name: Test workspace - shell: bash - continue-on-error: true - run: | - source /opt/ros/${{ inputs.ros_distro }}/setup.bash - source /opt/ros2_ws/install/local_setup.bash - colcon test --packages-select ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} ${{ inputs.skip_packages_test }} - colcon test-result --verbose diff --git a/.github/workflows/reusable-ros-tooling-source-build.yml b/.github/workflows/reusable-ros-tooling-source-build.yml deleted file mode 100644 index e717a245..00000000 --- a/.github/workflows/reusable-ros-tooling-source-build.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Reusable industrial_ci Workflow with Cache -# Reusable action to simplify dealing with ROS/ROS2 industrial_ci builds with cache -# author: Denis Štogl - -on: - workflow_call: - inputs: - ros_distro: - description: 'ROS2 distribution name' - required: true - type: string - ref: - description: 'Reference on which the repo should be checkout. Usually is this name of a branch or a tag.' - required: true - type: string - ros2_repo_branch: - description: 'Branch in the ros2/ros2 repozitory from which ".repos" should be used. Possible values: master (Rolling), humble.' - default: 'master' - required: false - type: string - -jobs: - reusable_ros_tooling_source_build: - name: ${{ inputs.ros_distro }} ubuntu-22.04 - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - steps: - - uses: ros-tooling/setup-ros@0.7.1 - with: - required-ros-distributions: ${{ inputs.ros_distro }} - - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - - uses: ros-tooling/action-ros-ci@0.3.6 - with: - target-ros2-distro: ${{ inputs.ros_distro }} - ref: ${{ inputs.ref }} - # build all packages listed in the meta package - package-name: - control_toolbox - - vcs-repo-file-url: | - https://raw.githubusercontent.com/ros2/ros2/${{ inputs.ros2_repo_branch }}/ros2.repos - https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/control_toolbox.${{ inputs.ros_distro }}.repos?token=${{ secrets.GITHUB_TOKEN }} - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - uses: actions/upload-artifact@v4.3.0 - with: - name: colcon-logs-ubuntu-22.04 - path: ros_ws/log diff --git a/.github/workflows/rhel-semi-binary-build.yml b/.github/workflows/rhel-semi-binary-build.yml index b80f2f6b..15d696f8 100644 --- a/.github/workflows/rhel-semi-binary-build.yml +++ b/.github/workflows/rhel-semi-binary-build.yml @@ -11,7 +11,7 @@ on: jobs: rhel_semi_binary_build: - uses: ./.github/workflows/reusable-rhel-binary-build.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-rhel-binary-build.yml@master strategy: matrix: ROS_DISTRO: [rolling, iron, humble] From 7469c1d16bfe474b4791fa11d9712a9d65acfe33 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 11 Feb 2024 21:18:07 +0000 Subject: [PATCH 2/5] fail-fast: false --- .github/workflows/build-binary.yml | 1 + .github/workflows/build-source.yml | 1 + .github/workflows/debian-build.yml | 1 + .github/workflows/rhel-semi-binary-build.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml index a060097b..657a1799 100644 --- a/.github/workflows/build-binary.yml +++ b/.github/workflows/build-binary.yml @@ -16,6 +16,7 @@ jobs: binary: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [rolling, iron, humble] ROS_REPO: [main, testing] diff --git a/.github/workflows/build-source.yml b/.github/workflows/build-source.yml index 202b111b..662a3338 100644 --- a/.github/workflows/build-source.yml +++ b/.github/workflows/build-source.yml @@ -12,6 +12,7 @@ jobs: source_build: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-ros-tooling-source-build.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [rolling, iron, humble] with: diff --git a/.github/workflows/debian-build.yml b/.github/workflows/debian-build.yml index 2049ef8c..ff3e5f66 100644 --- a/.github/workflows/debian-build.yml +++ b/.github/workflows/debian-build.yml @@ -13,6 +13,7 @@ jobs: debian_source_build: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-debian-build.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [rolling, iron, humble] with: diff --git a/.github/workflows/rhel-semi-binary-build.yml b/.github/workflows/rhel-semi-binary-build.yml index 15d696f8..ce84552f 100644 --- a/.github/workflows/rhel-semi-binary-build.yml +++ b/.github/workflows/rhel-semi-binary-build.yml @@ -13,6 +13,7 @@ jobs: rhel_semi_binary_build: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-rhel-binary-build.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [rolling, iron, humble] with: From ed31ee44fa13ff80b66cfe405e23517061108f09 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 11 Feb 2024 22:13:24 +0000 Subject: [PATCH 3/5] Fix readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 78833bc7..56d88916 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ See the documentation of [ros2_control](http://control.ros.org) and release info ## Build status ROS2 Distro | Branch | Build status | Documentation | Released packages :---------: | :----: | :----------: | :-----------: | :---------------: -**Rolling** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Build rolling](https://github.com/ros-controls/control_toolbox/actions/workflows/build-rolling.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-rolling.yml)
[![Rolling Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source_rollling.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source_rollling.yml) | [API](http://docs.ros.org/en/rolling/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#rolling) -**Iron** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Build iron](https://github.com/ros-controls/control_toolbox/actions/workflows/build-iron.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-iron.yml)
[![Iron Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source_iron.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source_iron.yml) | [API](http://docs.ros.org/en/iron/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#iron) -**Humble** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Build humble](https://github.com/ros-controls/control_toolbox/actions/workflows/build-humble.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-humble.yml)
[![Humble Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source_humble.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source_humble.yml) | [API](http://docs.ros.org/en/humble/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#humble) +**Rolling** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Binary Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml)
[![Rolling Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml) | [API](http://docs.ros.org/en/rolling/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#rolling) +**Iron** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [control_toolbox](https://index.ros.org/p/control_toolbox/#iron) +**Humble** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [API](http://docs.ros.org/en/humble/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#humble) ## Publication From bf4a0be7a204dfc2412ea5731fdfd6a00e3c1af3 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 11 Feb 2024 22:15:22 +0000 Subject: [PATCH 4/5] Fix md markup --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56d88916..168e7d98 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ See the documentation of [ros2_control](http://control.ros.org) and release info ROS2 Distro | Branch | Build status | Documentation | Released packages :---------: | :----: | :----------: | :-----------: | :---------------: **Rolling** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Binary Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml)
[![Rolling Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml) | [API](http://docs.ros.org/en/rolling/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#rolling) -**Iron** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [control_toolbox](https://index.ros.org/p/control_toolbox/#iron) +**Iron** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [API](http://docs.ros.org/en/iron/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#iron) **Humble** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [API](http://docs.ros.org/en/humble/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#humble) ## Publication From 1547aa06971fe85b83fafab02d3bdad906291b87 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sun, 11 Feb 2024 22:19:15 +0000 Subject: [PATCH 5/5] Show badges from master branch only (no PRs) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 168e7d98..86659601 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ See the documentation of [ros2_control](http://control.ros.org) and release info ## Build status ROS2 Distro | Branch | Build status | Documentation | Released packages :---------: | :----: | :----------: | :-----------: | :---------------: -**Rolling** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Binary Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml)
[![Rolling Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml/badge.svg)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml) | [API](http://docs.ros.org/en/rolling/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#rolling) +**Rolling** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | [![Binary Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml/badge.svg?branch=master)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-binary.yml?branch=master)
[![Rolling Source Build](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml/badge.svg?branch=master)](https://github.com/ros-controls/control_toolbox/actions/workflows/build-source.yml?branch=master) | [API](http://docs.ros.org/en/rolling/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#rolling) **Iron** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [API](http://docs.ros.org/en/iron/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#iron) **Humble** | [`master`](https://github.com/ros-controls/control_toolbox/tree/master) | see above | [API](http://docs.ros.org/en/humble/p/control_toolbox/) | [control_toolbox](https://index.ros.org/p/control_toolbox/#humble)