Skip to content

Commit

Permalink
Disable hybrid planning test, don't cache ci docker at all and don't …
Browse files Browse the repository at this point in the history
…cache upstream_ws if repos file is changed (#1051)

* Don't cache docker builds

Signed-off-by: Tyler Weaver <[email protected]>

* Don't cache upstream ws

* Use new action for getting the latest timestamp .repos file has been edited

* Debug

* Fix repos path

* Disable hybrid planning test

* Use more verbose name

Co-authored-by: Tyler Weaver <[email protected]>
  • Loading branch information
Vatan Aksoy Tezer and tylerjw authored Feb 2, 2022
1 parent 5c40566 commit 1c5cd5c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 53 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,19 @@ jobs:
uses: JafarAbdi/latest-rosdistro-release-date-action@main
with:
rosdistro: ${{ matrix.env.ROS_DISTRO }}
- name: Get latest timestamp repos file has been edited
id: repos_edit_timestamp
uses: vatanaksoytezer/latest-file-edit-timestamp-action@main
with:
file: moveit2.repos
- name: Cache upstream workspace
uses: pat-s/[email protected]
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') }}
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
Expand Down
51 changes: 4 additions & 47 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
11 changes: 6 additions & 5 deletions moveit_ros/hybrid_planning/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 1c5cd5c

Please sign in to comment.