From c090aa5bb49f17f2872c9fc06c3203712eca8b3a Mon Sep 17 00:00:00 2001 From: Tyler Weaver Date: Sat, 29 Jan 2022 16:39:30 -0700 Subject: [PATCH 1/7] Don't cache docker builds Signed-off-by: Tyler Weaver --- .github/workflows/docker.yaml | 51 +++-------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 1fb1495eba..d78181f815 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -24,19 +24,8 @@ jobs: DH_IMAGE: moveit/moveit2:${{ matrix.ROS_DISTRO }}-${{ github.job }} steps: - - name: Check for apt updates - uses: addnab/docker-run-action@v3 - continue-on-error: true - id: apt - with: - image: ${{ env.GH_IMAGE }} - run: | - apt-get update - have_updates=$(apt-get --simulate upgrade | grep -q "^0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.$" && echo false || echo true) - echo "::set-output name=no_cache::$have_updates" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name != 'schedule' || steps.apt.outputs.no_cache }} - name: Login to Github Container Registry uses: docker/login-action@v1 with: @@ -50,14 +39,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and Push uses: docker/build-push-action@v2 - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name != 'schedule' || steps.apt.outputs.no_cache }} with: file: .docker/${{ github.job }}/Dockerfile build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} push: true - no-cache: ${{ steps.apt.outputs.no_cache || github.event_name == 'workflow_dispatch' }} - cache-from: type=registry,ref=${{ env.GH_IMAGE }} - cache-to: type=inline + no-cache: true tags: | ${{ env.GH_IMAGE }} ${{ env.DH_IMAGE }} @@ -76,19 +62,8 @@ jobs: DH_IMAGE: moveit/moveit2:${{ matrix.ROS_DISTRO }}-${{ github.job }} steps: - - name: Check for apt updates - uses: addnab/docker-run-action@v3 - continue-on-error: true - id: apt - with: - image: ${{ env.GH_IMAGE }} - run: | - apt-get update - have_updates=$(apt-get --simulate upgrade | grep -q "^0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.$" && echo false || echo true) - echo "::set-output name=no_cache::$have_updates" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name != 'schedule' || steps.apt.outputs.no_cache }} - name: Login to Github Container Registry uses: docker/login-action@v1 with: @@ -102,14 +77,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and Push uses: docker/build-push-action@v2 - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name != 'schedule' || steps.apt.outputs.no_cache }} with: file: .docker/${{ github.job }}/Dockerfile build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} push: true - no-cache: ${{ steps.apt.outputs.no_cache || github.event_name == 'workflow_dispatch' }} - cache-from: type=registry,ref=${{ env.GH_IMAGE }} - cache-to: type=inline + no-cache: true tags: | ${{ env.GH_IMAGE }} ${{ env.DH_IMAGE }} @@ -129,19 +101,8 @@ jobs: DH_IMAGE: moveit/moveit2:${{ matrix.ROS_DISTRO }}-${{ github.job }} steps: - - name: Check for apt updates - uses: addnab/docker-run-action@v3 - continue-on-error: true - id: apt - with: - image: ${{ env.GH_IMAGE }} - run: | - apt-get update - have_updates=$(apt-get --simulate upgrade | grep -q "^0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.$" && echo false || echo true) - echo "::set-output name=no_cache::$have_updates" - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name != 'schedule' || steps.apt.outputs.no_cache }} - name: Login to Github Container Registry uses: docker/login-action@v1 with: @@ -155,14 +116,11 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and Push uses: docker/build-push-action@v2 - if: ${{ github.event_name == 'workflow_dispatch' || github.event_name != 'schedule' || steps.apt.outputs.no_cache }} with: file: .docker/${{ github.job }}/Dockerfile build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} push: true - no-cache: ${{ steps.apt.outputs.no_cache || github.event_name == 'workflow_dispatch' }} - cache-from: type=registry,ref=${{ env.GH_IMAGE }} - cache-to: type=inline + no-cache: true tags: | ${{ env.GH_IMAGE }} ${{ env.DH_IMAGE }} @@ -205,8 +163,7 @@ jobs: file: .docker/${{ github.job }}/Dockerfile build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }} push: true - cache-from: type=registry,ref=${{ env.GH_IMAGE }} - cache-to: type=inline + no-cache: true tags: | ${{ env.GH_IMAGE }} ${{ env.DH_IMAGE }} From 2b67182cb5dd9ee0b038ad1c1f782bb05a4e4ed4 Mon Sep 17 00:00:00 2001 From: Vatan Aksoy Tezer Date: Mon, 31 Jan 2022 21:43:04 +0300 Subject: [PATCH 2/7] Don't cache upstream ws --- .github/workflows/ci.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 16937c6822..ffa866cb7e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,14 +79,14 @@ jobs: uses: JafarAbdi/latest-rosdistro-release-date-action@main with: rosdistro: ${{ matrix.env.ROS_DISTRO }} - - name: Cache upstream workspace - uses: pat-s/always-upload-cache@v2.1.5 - with: - path: ${{ env.BASEDIR }}/upstream_ws - key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }} - restore-keys: ${{ env.CACHE_PREFIX }} - env: - CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} + # - name: Cache upstream workspace + # uses: pat-s/always-upload-cache@v2.1.5 + # with: + # path: ${{ env.BASEDIR }}/upstream_ws + # key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }} + # restore-keys: ${{ env.CACHE_PREFIX }} + # env: + # CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} # 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 workspace From 23f809f5b8c1f813097427419e29bc0d51b408b7 Mon Sep 17 00:00:00 2001 From: Vatan Aksoy Tezer Date: Tue, 1 Feb 2022 14:55:30 +0000 Subject: [PATCH 3/7] Use new action for getting the latest timestamp .repos file has been edited --- .github/workflows/ci.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ffa866cb7e..1164498d23 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,14 +79,19 @@ jobs: uses: JafarAbdi/latest-rosdistro-release-date-action@main with: rosdistro: ${{ matrix.env.ROS_DISTRO }} - # - name: Cache upstream workspace - # uses: pat-s/always-upload-cache@v2.1.5 - # with: - # path: ${{ env.BASEDIR }}/upstream_ws - # key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }} - # restore-keys: ${{ env.CACHE_PREFIX }} - # env: - # CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} + - name: Get latest timestamp repos file has been edited + id: repos_timestamp + uses: vatanaksoytezer/latest-file-edit-timestamp-action@main + with: + file: moveit2/moveit2.repos + - name: Cache upstream workspace + uses: pat-s/always-upload-cache@v2.1.5 + with: + path: ${{ env.BASEDIR }}/upstream_ws + key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }} + restore-keys: ${{ env.CACHE_PREFIX }} + env: + CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ steps.repos_timestamp.outputs.timestamp }}-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} # 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 workspace From 0feb0ff5d45754975c14214dc80f2cb44070b801 Mon Sep 17 00:00:00 2001 From: Vatan Aksoy Tezer Date: Tue, 1 Feb 2022 15:06:21 +0000 Subject: [PATCH 4/7] Debug --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1164498d23..62a566ae4e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,6 +79,9 @@ jobs: uses: JafarAbdi/latest-rosdistro-release-date-action@main with: rosdistro: ${{ matrix.env.ROS_DISTRO }} + - name: Check directory + run: | + ls -la - name: Get latest timestamp repos file has been edited id: repos_timestamp uses: vatanaksoytezer/latest-file-edit-timestamp-action@main From cdefc3f7df1454cee05c51766f0ae2083d533dcd Mon Sep 17 00:00:00 2001 From: Vatan Aksoy Tezer Date: Tue, 1 Feb 2022 15:13:20 +0000 Subject: [PATCH 5/7] Fix repos path --- .github/workflows/ci.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 62a566ae4e..2a932f77b2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,14 +79,11 @@ jobs: uses: JafarAbdi/latest-rosdistro-release-date-action@main with: rosdistro: ${{ matrix.env.ROS_DISTRO }} - - name: Check directory - run: | - ls -la - name: Get latest timestamp repos file has been edited id: repos_timestamp uses: vatanaksoytezer/latest-file-edit-timestamp-action@main with: - file: moveit2/moveit2.repos + file: moveit2.repos - name: Cache upstream workspace uses: pat-s/always-upload-cache@v2.1.5 with: From 076510924d4c27e6217392b91812290694393a04 Mon Sep 17 00:00:00 2001 From: Vatan Aksoy Tezer Date: Wed, 2 Feb 2022 20:29:24 +0000 Subject: [PATCH 6/7] Disable hybrid planning test --- moveit_ros/hybrid_planning/test/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/moveit_ros/hybrid_planning/test/CMakeLists.txt b/moveit_ros/hybrid_planning/test/CMakeLists.txt index 2e53a722de..12bf3742a4 100644 --- a/moveit_ros/hybrid_planning/test/CMakeLists.txt +++ b/moveit_ros/hybrid_planning/test/CMakeLists.txt @@ -18,11 +18,12 @@ if(BUILD_TESTING) # Run all lint tests in package.xml except those listed above ament_lint_auto_find_test_dependencies() + # TODO (vatanaksoytezer / andyze: Flaky behaviour, investigate and re-enable this test asap) # Basic integration tests - ament_add_gtest_executable(test_basic_integration - test_basic_integration.cpp - ) - ament_target_dependencies(test_basic_integration ${THIS_PACKAGE_INCLUDE_DEPENDS}) - add_ros_test(launch/test_basic_integration.test.py TIMEOUT 50 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}") + # ament_add_gtest_executable(test_basic_integration + # test_basic_integration.cpp + # ) + # ament_target_dependencies(test_basic_integration ${THIS_PACKAGE_INCLUDE_DEPENDS}) + # add_ros_test(launch/test_basic_integration.test.py TIMEOUT 50 ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}") endif() From 6af80a7d7cb17a28cb6cd5654f77ef9cee83c6f6 Mon Sep 17 00:00:00 2001 From: Vatan Aksoy Tezer Date: Wed, 2 Feb 2022 21:00:11 +0000 Subject: [PATCH 7/7] Use more verbose name --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2a932f77b2..071a4b39ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -80,7 +80,7 @@ jobs: with: rosdistro: ${{ matrix.env.ROS_DISTRO }} - name: Get latest timestamp repos file has been edited - id: repos_timestamp + id: repos_edit_timestamp uses: vatanaksoytezer/latest-file-edit-timestamp-action@main with: file: moveit2.repos @@ -91,7 +91,7 @@ jobs: key: ${{ env.CACHE_PREFIX }}-${{ github.run_id }} restore-keys: ${{ env.CACHE_PREFIX }} env: - CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ steps.repos_timestamp.outputs.timestamp }}-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} + CACHE_PREFIX: ${{ steps.rosdistro_release_date.outputs.date }}-upstream_ws-${{ steps.repos_edit_timestamp.outputs.timestamp }}-${{ matrix.env.IMAGE }}-${{ hashFiles('moveit2*.repos', '.github/workflows/ci.yaml') }} # 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 workspace