From 1da071b58a20b2bfe69093dcc8171eb0e0e60b9d Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 15 Feb 2024 08:15:42 +0000 Subject: [PATCH 1/5] Use reviewer database from ros2_control_ci --- .github/reviewer-lottery.yml | 33 -------------------------- .github/workflows/reviewer_lottery.yml | 1 + 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 .github/reviewer-lottery.yml diff --git a/.github/reviewer-lottery.yml b/.github/reviewer-lottery.yml deleted file mode 100644 index c34543a19..000000000 --- a/.github/reviewer-lottery.yml +++ /dev/null @@ -1,33 +0,0 @@ -groups: - # Default reviewers for all pull requests. - # Usually, at least on of the maintainers should approve PR before merging. - # The best is if two maintainers do that. - - name: maintainers # name of the group - reviewers: 3 # how many reviewers do you want to assign? - internal_reviewers: 1 # how many reviewers do you want to assign when the PR author belongs to this group? - usernames: # github usernames of the reviewers - - bmagyar - - destogl - - christophfroehlich - - # Reviewers group to get broader feedback. - - name: reviewers - reviewers: 5 - usernames: - - aprotyas - - arne48 - - bijoua29 - - DasRoteSkelett - - duringhof - - erickisos - - fmauch - - jaron-l - - livanov93 - - mcbed - - moriarty - - olivier-stasse - - peterdavidfagan - - progtologist - - saikishor - - VanshGehlot - - VX792 diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml index 7b85e7957..ac0af040f 100644 --- a/.github/workflows/reviewer_lottery.yml +++ b/.github/workflows/reviewer_lottery.yml @@ -12,3 +12,4 @@ jobs: - uses: uesteibar/reviewer-lottery@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + config: ros-controls/ros2_control_ci/.github/reviewer-lottery.yml From 823a5b2eec9f91b061b53226491039f6bbeaa020 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 15 Feb 2024 08:18:14 +0000 Subject: [PATCH 2/5] Use industrial_ci from ros2_control_ci --- .github/workflows/humble-binary-build.yml | 11 +- .github/workflows/iron-binary-build.yml | 11 +- .../reusable-industrial-ci-with-cache.yml | 106 ------------------ .github/workflows/rolling-binary-build.yml | 11 +- 4 files changed, 24 insertions(+), 115 deletions(-) delete mode 100644 .github/workflows/reusable-industrial-ci-with-cache.yml diff --git a/.github/workflows/humble-binary-build.yml b/.github/workflows/humble-binary-build.yml index 6270c36be..dff05715e 100644 --- a/.github/workflows/humble-binary-build.yml +++ b/.github/workflows/humble-binary-build.yml @@ -14,8 +14,13 @@ on: jobs: binary: - uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [humble] + ROS_REPO: [main, testing] with: - ros_distro: humble - upstream_workspace: ros2_control_demos-not-released.humble.repos + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos ref_for_scheduled_build: humble diff --git a/.github/workflows/iron-binary-build.yml b/.github/workflows/iron-binary-build.yml index 99e75bd01..fedc90805 100644 --- a/.github/workflows/iron-binary-build.yml +++ b/.github/workflows/iron-binary-build.yml @@ -15,8 +15,13 @@ on: jobs: binary: - uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [iron] + ROS_REPO: [main, testing] with: - ros_distro: iron + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} upstream_workspace: ros2_control_demos-not-released.iron.repos - ref_for_scheduled_build: master + ref_for_scheduled_build: iron diff --git a/.github/workflows/reusable-industrial-ci-with-cache.yml b/.github/workflows/reusable-industrial-ci-with-cache.yml deleted file mode 100644 index a157ccbd6..000000000 --- a/.github/workflows/reusable-industrial-ci-with-cache.yml +++ /dev/null @@ -1,106 +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: - 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: "all", "main", "testing"' - default: 'all' - required: false - type: string - os_code_name: - description: 'OS_CODE_NAME variable for industrial_ci' - default: '' - 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: 'Local path to store cache (from "github.workspace"). For standard industrial_ci configuration do not have to be changed' - default: '.ccache' - required: false - type: string - basedir: - description: 'Local path to workspace base directory to cache (from "github.workspace"). For standard industrial_ci configuration do not have to be changed' - default: '.work' - required: false - type: string - - -jobs: - reusable_industrial_ci_with_cache: - name: ${{ matrix.ROS_REPO }} ${{ inputs.ros_distro }} ${{ inputs.os_code_name }} - strategy: - fail-fast: false - matrix: - ROS_REPO: [ main, testing ] - runs-on: ubuntu-latest - env: - CCACHE_DIR: ${{ github.workspace }}/${{ inputs.ccache_dir }} - BASEDIR: ${{ github.workspace }}/${{ inputs.basedir }} - CACHE_PREFIX: ${{ inputs.ros_distro }}-${{ inputs.os_code_name }}-${{ matrix.ROS_REPO }}-${{ github.job }} - steps: - - name: Checkout ${{ inputs.ref }} when build is not scheduled - if: ${{ (inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO) && github.event_name != 'schedule' }} - uses: actions/checkout@v4 - - name: Checkout ${{ inputs.ref }} on scheduled build - if: ${{ (inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO) && github.event_name == 'schedule' }} - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref_for_scheduled_build }} - - name: cache target_ws - if: ${{ ! matrix.env.CCOV && (inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO) }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - if: ${{ inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO }} - uses: pat-s/always-upload-cache@v3.0.11 - 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 }} - - if: ${{ inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO }} - uses: 'ros-industrial/industrial_ci@master' - env: - UPSTREAM_WORKSPACE: ${{ inputs.upstream_workspace }} - ROS_DISTRO: ${{ inputs.ros_distro }} - ROS_REPO: ${{ matrix.ROS_REPO }} - OS_CODE_NAME: ${{ inputs.os_code_name }} - BEFORE_INSTALL_UPSTREAM_DEPENDENCIES: ${{ inputs.before_install_upstream_dependencies }} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV && (inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO) }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws - - name: Is job skipped? - if: ${{ ! (inputs.ros_repo == 'all' || inputs.ros_repo == matrix.ROS_REPO) }} - run: | - echo "This job is skpped!" diff --git a/.github/workflows/rolling-binary-build.yml b/.github/workflows/rolling-binary-build.yml index f3d89c288..6a71fcdee 100644 --- a/.github/workflows/rolling-binary-build.yml +++ b/.github/workflows/rolling-binary-build.yml @@ -15,8 +15,13 @@ on: jobs: binary: - uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [rolling] + ROS_REPO: [main, testing] with: - ros_distro: rolling - upstream_workspace: ros2_control_demos-not-released.rolling.repos + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos ref_for_scheduled_build: master From c26b4e9e676e2e2477e1b70436bb0375fa30f8a1 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 15 Feb 2024 08:26:41 +0000 Subject: [PATCH 3/5] Also update semi-binary workflows --- .github/workflows/humble-semi-binary-build.yml | 11 ++++++++--- .github/workflows/iron-binary-build.yml | 2 +- .github/workflows/iron-semi-binary-build.yml | 13 +++++++++---- .github/workflows/rolling-semi-binary-build.yml | 11 ++++++++--- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/humble-semi-binary-build.yml b/.github/workflows/humble-semi-binary-build.yml index 3def6c31a..f24ac5569 100644 --- a/.github/workflows/humble-semi-binary-build.yml +++ b/.github/workflows/humble-semi-binary-build.yml @@ -14,8 +14,13 @@ on: jobs: semi_binary: - uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [humble] + ROS_REPO: [main, testing] with: - ros_distro: humble - upstream_workspace: ros2_control_demos.humble.repos + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos ref_for_scheduled_build: humble diff --git a/.github/workflows/iron-binary-build.yml b/.github/workflows/iron-binary-build.yml index fedc90805..ffea11d1c 100644 --- a/.github/workflows/iron-binary-build.yml +++ b/.github/workflows/iron-binary-build.yml @@ -23,5 +23,5 @@ jobs: with: ros_distro: ${{ matrix.ROS_DISTRO }} ros_repo: ${{ matrix.ROS_REPO }} - upstream_workspace: ros2_control_demos-not-released.iron.repos + upstream_workspace: ros2_control_demos-not-released.${{ matrix.ROS_DISTRO }}.repos ref_for_scheduled_build: iron diff --git a/.github/workflows/iron-semi-binary-build.yml b/.github/workflows/iron-semi-binary-build.yml index 7f7396e8a..abb42ddf2 100644 --- a/.github/workflows/iron-semi-binary-build.yml +++ b/.github/workflows/iron-semi-binary-build.yml @@ -14,8 +14,13 @@ on: jobs: semi_binary: - uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [iron] + ROS_REPO: [main, testing] with: - ros_distro: iron - upstream_workspace: ros2_control_demos.iron.repos - ref_for_scheduled_build: master + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos + ref_for_scheduled_build: iron diff --git a/.github/workflows/rolling-semi-binary-build.yml b/.github/workflows/rolling-semi-binary-build.yml index ed527fea3..19d98c114 100644 --- a/.github/workflows/rolling-semi-binary-build.yml +++ b/.github/workflows/rolling-semi-binary-build.yml @@ -14,8 +14,13 @@ on: jobs: semi_binary: - uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [rolling] + ROS_REPO: [main, testing] with: - ros_distro: rolling - upstream_workspace: ros2_control_demos.rolling.repos + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + upstream_workspace: ros2_control_demos.${{ matrix.ROS_DISTRO }}.repos ref_for_scheduled_build: master From b6b2ae5f1935b7047eb3b5132bc7d76bf953be48 Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Thu, 15 Feb 2024 12:13:53 +0000 Subject: [PATCH 4/5] fail-fast: false --- .github/workflows/humble-binary-build.yml | 1 + .github/workflows/humble-semi-binary-build.yml | 1 + .github/workflows/iron-binary-build.yml | 1 + .github/workflows/iron-semi-binary-build.yml | 1 + .github/workflows/rolling-binary-build.yml | 1 + .github/workflows/rolling-semi-binary-build.yml | 1 + 6 files changed, 6 insertions(+) diff --git a/.github/workflows/humble-binary-build.yml b/.github/workflows/humble-binary-build.yml index dff05715e..4a9ec535b 100644 --- a/.github/workflows/humble-binary-build.yml +++ b/.github/workflows/humble-binary-build.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: [humble] ROS_REPO: [main, testing] diff --git a/.github/workflows/humble-semi-binary-build.yml b/.github/workflows/humble-semi-binary-build.yml index f24ac5569..49cba23a3 100644 --- a/.github/workflows/humble-semi-binary-build.yml +++ b/.github/workflows/humble-semi-binary-build.yml @@ -16,6 +16,7 @@ jobs: semi_binary: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [humble] ROS_REPO: [main, testing] diff --git a/.github/workflows/iron-binary-build.yml b/.github/workflows/iron-binary-build.yml index ffea11d1c..40d20d218 100644 --- a/.github/workflows/iron-binary-build.yml +++ b/.github/workflows/iron-binary-build.yml @@ -17,6 +17,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: [iron] ROS_REPO: [main, testing] diff --git a/.github/workflows/iron-semi-binary-build.yml b/.github/workflows/iron-semi-binary-build.yml index abb42ddf2..0b69b6c3c 100644 --- a/.github/workflows/iron-semi-binary-build.yml +++ b/.github/workflows/iron-semi-binary-build.yml @@ -16,6 +16,7 @@ jobs: semi_binary: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [iron] ROS_REPO: [main, testing] diff --git a/.github/workflows/rolling-binary-build.yml b/.github/workflows/rolling-binary-build.yml index 6a71fcdee..6ee9eb369 100644 --- a/.github/workflows/rolling-binary-build.yml +++ b/.github/workflows/rolling-binary-build.yml @@ -17,6 +17,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] ROS_REPO: [main, testing] diff --git a/.github/workflows/rolling-semi-binary-build.yml b/.github/workflows/rolling-semi-binary-build.yml index 19d98c114..737f35e9d 100644 --- a/.github/workflows/rolling-semi-binary-build.yml +++ b/.github/workflows/rolling-semi-binary-build.yml @@ -16,6 +16,7 @@ jobs: semi_binary: uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master strategy: + fail-fast: false matrix: ROS_DISTRO: [rolling] ROS_REPO: [main, testing] From 521f724fa0adedd8d62aeddc60894d551b688ddb Mon Sep 17 00:00:00 2001 From: Christoph Froehlich Date: Sat, 17 Feb 2024 14:24:29 +0000 Subject: [PATCH 5/5] Use reviewer lottery from ros2_control_ci --- .github/workflows/reviewer_lottery.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml index ac0af040f..0584f4a7f 100644 --- a/.github/workflows/reviewer_lottery.yml +++ b/.github/workflows/reviewer_lottery.yml @@ -1,15 +1,10 @@ name: Reviewer lottery +# pull_request_target takes the same events as pull_request, +# but it runs on the base branch instead of the head branch. on: pull_request_target: types: [opened, ready_for_review, reopened] jobs: - reviewer-lottery: - runs-on: ubuntu-latest - if: ${{ ! contains(fromJSON('["dependabot[bot]", "mergify[bot]"]'), github.actor) }} - steps: - - uses: actions/checkout@v4 - - uses: uesteibar/reviewer-lottery@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - config: ros-controls/ros2_control_ci/.github/reviewer-lottery.yml + assign_reviewers: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-reviewer-lottery.yml@master