From 02e20ea3945f0cb666d94caa813ec29ce2e507d7 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 19 Aug 2021 11:22:51 +0200 Subject: [PATCH] Combine CI configs for galactic + rolling - Use minimal moveit2.repos and additional version-specific *.repos - Simplify naming of jobs --- .../workflows/build_and_test_galactic.yaml | 76 ------------------- .../{build_and_test_rolling.yaml => ci.yaml} | 12 ++- .github/workflows/docker.yaml | 1 - moveit2.repos | 20 ----- moveit2_rolling.repos | 13 ---- 5 files changed, 8 insertions(+), 114 deletions(-) delete mode 100644 .github/workflows/build_and_test_galactic.yaml rename .github/workflows/{build_and_test_rolling.yaml => ci.yaml} (92%) delete mode 100644 moveit2_rolling.repos diff --git a/.github/workflows/build_and_test_galactic.yaml b/.github/workflows/build_and_test_galactic.yaml deleted file mode 100644 index 3366fe4d70..0000000000 --- a/.github/workflows/build_and_test_galactic.yaml +++ /dev/null @@ -1,76 +0,0 @@ -# This config uses industrial_ci (/~https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (/~https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build and Test (galactic) - -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - industrial_ci: - strategy: - matrix: - env: - - ROS_DISTRO: galactic - ROS_REPO: main - - ROS_DISTRO: galactic - ROS_REPO: testing - env: - # The released versions of all upstream repos are current - UPSTREAM_WORKSPACE: moveit2.repos - AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src - TARGET_CMAKE_ARGS: -DCMAKE_BUILD_TYPE=Release - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - CLANG_TIDY_BASE_REF: ${{ github.base_ref || github.ref }} - - name: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - # The released versions of all upstream repos are current - - name: cache upstream_ws - uses: pat-s/always-upload-cache@v2.1.5 - with: - path: ${{ env.BASEDIR }}/upstream_ws - key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2.repos') }}-${{ github.run_id }} - restore-keys: | - upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2.repos') }} - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - uses: pat-s/always-upload-cache@v2.1.5 - 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 - uses: pat-s/always-upload-cache@v2.1.5 - 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 }} - - name: industrial_ci - uses: 'ros-industrial/industrial_ci@master' - env: ${{ matrix.env }} - - name: upload test artifacts (on failure) - uses: actions/upload-artifact@v2 - if: failure() - with: - name: test-results - path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml - - name: prepare target_ws for cache - if: always() - 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 diff --git a/.github/workflows/build_and_test_rolling.yaml b/.github/workflows/ci.yaml similarity index 92% rename from .github/workflows/build_and_test_rolling.yaml rename to .github/workflows/ci.yaml index 38055e85ba..8ac7c04844 100644 --- a/.github/workflows/build_and_test_rolling.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ # This config uses industrial_ci (/~https://github.com/ros-industrial/industrial_ci.git). # For troubleshooting, see readme (/~https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) -name: Build and Test (rolling) +name: CI on: workflow_dispatch: @@ -22,8 +22,12 @@ jobs: ROS_REPO: testing IKFAST_TEST: true CLANG_TIDY: true + - ROS_DISTRO: galactic + ROS_REPO: main + - ROS_DISTRO: galactic + ROS_REPO: testing env: - UPSTREAM_WORKSPACE: moveit2_rolling.repos + UPSTREAM_WORKSPACE: moveit2.repos moveit2_${{ matrix.env.ROS_DISTRO }}.repos AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src BEFORE_TARGET_TEST_EMBED: ${{ matrix.env.IKFAST_TEST && 'set +u && source moveit_kinematics/test/test_ikfast_plugins.sh && set -u' || '' }} AFTER_RUN_TARGET_TEST: ${{ matrix.env.CCOV && './.ci.prepare_codecov' || '' }} @@ -57,9 +61,9 @@ jobs: uses: pat-s/always-upload-cache@v2.1.5 with: path: ${{ env.BASEDIR }}/upstream_ws - key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2_rolling.repos') }}-${{ github.run_id }} + key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles(env.UPSTREAM_WORKSPACE) }}-${{ github.run_id }} restore-keys: | - upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2_rolling.repos') }} + upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles(env.UPSTREAM_WORKSPACE) }} # The target directory cache doesn't include the source directory because # that comes from the checkout. See "prepare target_ws for cache" task below - name: cache target_ws diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 09d1f240df..c8cc87778e 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -2,7 +2,6 @@ name: docker on: workflow_dispatch: - pull_request: push: branches: - main diff --git a/moveit2.repos b/moveit2.repos index b7c72382ca..ef51fc88be 100644 --- a/moveit2.repos +++ b/moveit2.repos @@ -1,28 +1,8 @@ repositories: - moveit_msgs: - type: git - url: /~https://github.com/ros-planning/moveit_msgs - version: ros2 - moveit_resources: - type: git - url: /~https://github.com/ros-planning/moveit_resources - version: ros2 geometric_shapes: type: git url: /~https://github.com/ros-planning/geometric_shapes version: ros2 - srdfdom: - type: git - url: /~https://github.com/ros-planning/srdfdom - version: ros2 - ros2_control: - type: git - url: /~https://github.com/ros-controls/ros2_control - version: master - ros2_controllers: - type: git - url: /~https://github.com/ros-controls/ros2_controllers - version: master warehouse_ros: type: git url: /~https://github.com/ros-planning/warehouse_ros diff --git a/moveit2_rolling.repos b/moveit2_rolling.repos deleted file mode 100644 index ef51fc88be..0000000000 --- a/moveit2_rolling.repos +++ /dev/null @@ -1,13 +0,0 @@ -repositories: - geometric_shapes: - type: git - url: /~https://github.com/ros-planning/geometric_shapes - version: ros2 - warehouse_ros: - type: git - url: /~https://github.com/ros-planning/warehouse_ros - version: ros2 - warehouse_ros_mongo: - type: git - url: /~https://github.com/ros-planning/warehouse_ros_mongo - version: ros2