From f64ff97c37320ec8d1e1d1e2d91d7f5db1bd50d9 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Mon, 11 Nov 2024 08:37:08 +0100 Subject: [PATCH] Cleanup workflows (#1177) * Remove superflous branch specification for workflow_dispatch * Give clear names to all jobs * Add realtime_tools to rolling and jazzy upstream workspaces * Do not create docker subnet when running in ACT * Cleanup reusable_ici * Add ccache for ici flow * Add MoveIt to upstream workspace This way, ros2_control will not be shadowed by installed binary dependencies. --- .github/workflows/humble-binary-main.yml | 5 +---- .github/workflows/humble-binary-testing.yml | 4 +--- .github/workflows/humble-semi-binary-main.yml | 4 +--- .../workflows/humble-semi-binary-testing.yml | 4 +--- .github/workflows/iron-binary-main.yml | 4 +--- .github/workflows/iron-binary-testing.yml | 4 +--- .github/workflows/iron-semi-binary-main.yml | 4 +--- .../workflows/iron-semi-binary-testing.yml | 4 +--- .github/workflows/jazzy-binary-main.yml | 4 +--- .github/workflows/jazzy-binary-testing.yml | 4 +--- .github/workflows/jazzy-semi-binary-main.yml | 4 +--- .../workflows/jazzy-semi-binary-testing.yml | 4 +--- .github/workflows/reusable_ici.yml | 22 ++++++++++++++++--- .github/workflows/rolling-binary-main.yml | 4 +--- .github/workflows/rolling-binary-testing.yml | 4 +--- .../workflows/rolling-semi-binary-main.yml | 4 +--- .../workflows/rolling-semi-binary-testing.yml | 4 +--- Universal_Robots_ROS2_Driver.jazzy.repos | 16 ++++++++++++++ Universal_Robots_ROS2_Driver.rolling.repos | 16 ++++++++++++++ 19 files changed, 67 insertions(+), 52 deletions(-) diff --git a/.github/workflows/humble-binary-main.yml b/.github/workflows/humble-binary-main.yml index af1e46ef7..a3a052d98 100644 --- a/.github/workflows/humble-binary-main.yml +++ b/.github/workflows/humble-binary-main.yml @@ -1,15 +1,12 @@ name: Humble Binary Build Main on: workflow_dispatch: - branches: - - humble schedule: # Run every morning to detect flakiness and broken dependencies - cron: '03 5 * * *' - jobs: - binary: + humble_binary_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: humble diff --git a/.github/workflows/humble-binary-testing.yml b/.github/workflows/humble-binary-testing.yml index e670e7295..4d8434c6a 100644 --- a/.github/workflows/humble-binary-testing.yml +++ b/.github/workflows/humble-binary-testing.yml @@ -1,15 +1,13 @@ name: Humble Binary Build Testing on: workflow_dispatch: - branches: - - humble schedule: # Run every morning to detect flakiness and broken dependencies - cron: '03 5 * * *' jobs: - binary: + humble_binary_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: humble diff --git a/.github/workflows/humble-semi-binary-main.yml b/.github/workflows/humble-semi-binary-main.yml index a42d19c9e..6ba0af5c7 100644 --- a/.github/workflows/humble-semi-binary-main.yml +++ b/.github/workflows/humble-semi-binary-main.yml @@ -1,15 +1,13 @@ name: Humble Semi Binary Build Main on: workflow_dispatch: - branches: - - humble schedule: # Run every morning to detect flakiness and broken dependencies - cron: '03 5 * * *' jobs: - binary: + humble_semi_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: humble diff --git a/.github/workflows/humble-semi-binary-testing.yml b/.github/workflows/humble-semi-binary-testing.yml index 141eb71f2..63a1de1ed 100644 --- a/.github/workflows/humble-semi-binary-testing.yml +++ b/.github/workflows/humble-semi-binary-testing.yml @@ -1,15 +1,13 @@ name: Humble Semi Binary Build Testing on: workflow_dispatch: - branches: - - humble schedule: # Run every morning to detect flakiness and broken dependencies - cron: '03 5 * * *' jobs: - binary: + humble_semi_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: humble diff --git a/.github/workflows/iron-binary-main.yml b/.github/workflows/iron-binary-main.yml index d089e1dc6..0794b21df 100644 --- a/.github/workflows/iron-binary-main.yml +++ b/.github/workflows/iron-binary-main.yml @@ -1,8 +1,6 @@ name: Iron Binary Build Main on: workflow_dispatch: - branches: - - iron pull_request: branches: - iron @@ -14,7 +12,7 @@ on: - cron: '13 5 * * *' jobs: - binary: + iron_binary_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: iron diff --git a/.github/workflows/iron-binary-testing.yml b/.github/workflows/iron-binary-testing.yml index ba8918604..7c9d272e7 100644 --- a/.github/workflows/iron-binary-testing.yml +++ b/.github/workflows/iron-binary-testing.yml @@ -1,8 +1,6 @@ name: Iron Binary Build Testing on: workflow_dispatch: - branches: - - iron pull_request: branches: - iron @@ -14,7 +12,7 @@ on: - cron: '13 5 * * *' jobs: - binary: + iron_binary_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: iron diff --git a/.github/workflows/iron-semi-binary-main.yml b/.github/workflows/iron-semi-binary-main.yml index 01340fd50..ca5c47d0b 100644 --- a/.github/workflows/iron-semi-binary-main.yml +++ b/.github/workflows/iron-semi-binary-main.yml @@ -1,8 +1,6 @@ name: Iron Semi Binary Build Main on: workflow_dispatch: - branches: - - iron pull_request: branches: - iron @@ -14,7 +12,7 @@ on: - cron: '13 5 * * *' jobs: - binary: + iron_semi_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: iron diff --git a/.github/workflows/iron-semi-binary-testing.yml b/.github/workflows/iron-semi-binary-testing.yml index 809cea567..04b02d293 100644 --- a/.github/workflows/iron-semi-binary-testing.yml +++ b/.github/workflows/iron-semi-binary-testing.yml @@ -1,8 +1,6 @@ name: Iron Semi Binary Build Testing on: workflow_dispatch: - branches: - - iron pull_request: branches: - iron @@ -14,7 +12,7 @@ on: - cron: '13 5 * * *' jobs: - binary: + iron_semi_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: iron diff --git a/.github/workflows/jazzy-binary-main.yml b/.github/workflows/jazzy-binary-main.yml index 5b8912f7a..9a5d52e3b 100644 --- a/.github/workflows/jazzy-binary-main.yml +++ b/.github/workflows/jazzy-binary-main.yml @@ -1,8 +1,6 @@ name: Jazzy Binary Build Main on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + jazzy_binary_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: jazzy diff --git a/.github/workflows/jazzy-binary-testing.yml b/.github/workflows/jazzy-binary-testing.yml index ed4bb7f09..e8a0e3a4e 100644 --- a/.github/workflows/jazzy-binary-testing.yml +++ b/.github/workflows/jazzy-binary-testing.yml @@ -1,8 +1,6 @@ name: Jazzy Binary Build Testing on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + jazzy_binary_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: jazzy diff --git a/.github/workflows/jazzy-semi-binary-main.yml b/.github/workflows/jazzy-semi-binary-main.yml index 26fc5b8e7..006291bf8 100644 --- a/.github/workflows/jazzy-semi-binary-main.yml +++ b/.github/workflows/jazzy-semi-binary-main.yml @@ -1,8 +1,6 @@ name: Jazzy Semi Binary Build Main on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + jazzy_semi_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: jazzy diff --git a/.github/workflows/jazzy-semi-binary-testing.yml b/.github/workflows/jazzy-semi-binary-testing.yml index e423d0ef6..b66ce4807 100644 --- a/.github/workflows/jazzy-semi-binary-testing.yml +++ b/.github/workflows/jazzy-semi-binary-testing.yml @@ -1,8 +1,6 @@ name: Jazzy Semi Binary Build Testing on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + jazzy_semi_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: jazzy diff --git a/.github/workflows/reusable_ici.yml b/.github/workflows/reusable_ici.yml index 3a39b4c92..b19f1c433 100644 --- a/.github/workflows/reusable_ici.yml +++ b/.github/workflows/reusable_ici.yml @@ -28,23 +28,39 @@ on: 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 }} ${{ inputs.os_code_name }} + name: ${{ inputs.ros_distro }} ${{ inputs.ros_repo }} runs-on: ubuntu-latest env: DOCKER_RUN_OPTS: '-v /var/run/docker.sock:/var/run/docker.sock --network ursim_net' + CCACHE_DIR: ${{ github.workspace }}/${{ inputs.ccache_dir }} + CACHE_PREFIX: ${{ inputs.ros_distro }}-${{ inputs.upstream_workspace }}-${{ inputs.ros_repo }}-${{ github.job }} steps: - - name: Checkout ${{ inputs.ref }} when build is not scheduled + - name: Checkout ${{ github.ref_name }} since build is not scheduled if: ${{ github.event_name != 'schedule' }} uses: actions/checkout@v4 - - name: Checkout ${{ inputs.ref }} on scheduled build + - 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 }} - run: docker network create --subnet=192.168.56.0/24 ursim_net + if: ${{ !env.ACT }} + - name: Cache ccache + uses: actions/cache@v4 + 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 }} diff --git a/.github/workflows/rolling-binary-main.yml b/.github/workflows/rolling-binary-main.yml index 342c857d4..3ca974841 100644 --- a/.github/workflows/rolling-binary-main.yml +++ b/.github/workflows/rolling-binary-main.yml @@ -1,8 +1,6 @@ name: Rolling Binary Build Main on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + rolling_binary_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: rolling diff --git a/.github/workflows/rolling-binary-testing.yml b/.github/workflows/rolling-binary-testing.yml index 54384986c..0d042012e 100644 --- a/.github/workflows/rolling-binary-testing.yml +++ b/.github/workflows/rolling-binary-testing.yml @@ -1,8 +1,6 @@ name: Rolling Binary Build Testing on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + rolling_binary_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: rolling diff --git a/.github/workflows/rolling-semi-binary-main.yml b/.github/workflows/rolling-semi-binary-main.yml index c5399e376..743918c62 100644 --- a/.github/workflows/rolling-semi-binary-main.yml +++ b/.github/workflows/rolling-semi-binary-main.yml @@ -1,8 +1,6 @@ name: Rolling Semi Binary Build Main on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + rolling_semi_main: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: rolling diff --git a/.github/workflows/rolling-semi-binary-testing.yml b/.github/workflows/rolling-semi-binary-testing.yml index c4d06bf8c..0c9507809 100644 --- a/.github/workflows/rolling-semi-binary-testing.yml +++ b/.github/workflows/rolling-semi-binary-testing.yml @@ -1,8 +1,6 @@ name: Rolling Semi Binary Build Testing on: workflow_dispatch: - branches: - - main pull_request: branches: - main @@ -14,7 +12,7 @@ on: - cron: '13 4 * * *' jobs: - binary: + rolling_semi_testing: uses: ./.github/workflows/reusable_ici.yml with: ros_distro: rolling diff --git a/Universal_Robots_ROS2_Driver.jazzy.repos b/Universal_Robots_ROS2_Driver.jazzy.repos index c85d2328f..96305e3a3 100644 --- a/Universal_Robots_ROS2_Driver.jazzy.repos +++ b/Universal_Robots_ROS2_Driver.jazzy.repos @@ -27,3 +27,19 @@ repositories: type: git url: https://github.com/ros-controls/control_msgs.git version: master + realtime_tools: + type: git + url: https://github.com/ros-controls/realtime_tools.git + version: master + moveit2: + type: git + url: https://github.com/ros-planning/moveit2.git + version: main + moveit_msgs: + type: git + url: https://github.com/ros-planning/moveit_msgs.git + version: ros2 + srdfdom: + type: git + url: https://github.com/moveit/srdfdom.git + version: ros2 diff --git a/Universal_Robots_ROS2_Driver.rolling.repos b/Universal_Robots_ROS2_Driver.rolling.repos index c85d2328f..96305e3a3 100644 --- a/Universal_Robots_ROS2_Driver.rolling.repos +++ b/Universal_Robots_ROS2_Driver.rolling.repos @@ -27,3 +27,19 @@ repositories: type: git url: https://github.com/ros-controls/control_msgs.git version: master + realtime_tools: + type: git + url: https://github.com/ros-controls/realtime_tools.git + version: master + moveit2: + type: git + url: https://github.com/ros-planning/moveit2.git + version: main + moveit_msgs: + type: git + url: https://github.com/ros-planning/moveit_msgs.git + version: ros2 + srdfdom: + type: git + url: https://github.com/moveit/srdfdom.git + version: ros2