Skip to content

Commit

Permalink
Merge pull request moveit#5 from galou/ge/main
Browse files Browse the repository at this point in the history
Ge/main branch as of 20220406 (a lot of upstream changes from main branch and other Gael's changes)
  • Loading branch information
jmarsik committed Apr 12, 2022
2 parents 3602b67 + 4cdda2b commit 3916051
Show file tree
Hide file tree
Showing 499 changed files with 8,434 additions and 6,270 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Checks: '-*,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
misc-unused-parameters,
readability-named-parameter,
readability-redundant-smartptr-get,
readability-redundant-string-cstr,
Expand All @@ -25,6 +26,8 @@ CheckOptions:
value: '10'
- key: llvm-namespace-comment.SpacesBeforeComments
value: '2'
- key: misc-unused-parameters.StrictMode
value: '1'
- key: readability-braces-around-statements.ShortStatementLines
value: '2'
# type names
Expand Down
4 changes: 2 additions & 2 deletions .docker/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ROS base image augmented with all MoveIt dependencies to use for CI

ARG ROS_DISTRO=rolling
FROM ros:${ROS_DISTRO}-ros-base-focal
FROM ros:${ROS_DISTRO}-ros-base
MAINTAINER Robert Haschke rhaschke@techfak.uni-bielefeld.de

ENV TERM xterm
Expand All @@ -25,7 +25,7 @@ RUN \
# Some basic requirements
wget git sudo curl \
# Preferred build tools
clang clang-format-10 clang-tidy clang-tools \
clang clang-format-12 clang-tidy clang-tools \
ccache && \
#
# Fetch all dependencies from moveit2.repos
Expand Down
2 changes: 1 addition & 1 deletion .docker/release/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Full debian-based install of MoveIt using apt-get

ARG ROS_DISTRO=rolling
FROM ros:${ROS_DISTRO}-ros-base-focal
FROM ros:${ROS_DISTRO}-ros-base
MAINTAINER Robert Haschke rhaschke@techfak.uni-bielefeld.de

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
/moveit_plugins/moveit_simple_controller_manager/ @mikeferguson @v4hn
/moveit_plugins/moveit_controller_manager_example/ @v4hn

/moveit_core/background_processing/ @tylerjw
/moveit_core/backtrace/ @tylerjw
/moveit_core/collision_detection/ @j-petit
/moveit_core/collision_detection_fcl/ @j-petit
/moveit_core/collision_distance_field/ @j-petit
Expand All @@ -53,7 +51,6 @@
/moveit_core/planning_interface/ @rhaschke @felixvd
/moveit_core/planning_request_adapter/ @rhaschke
/moveit_core/planning_scene/ @rhaschke @felixvd
/moveit_core/profiler/ @tylerjw
/moveit_core/robot_model/ @tylerjw
/moveit_core/robot_state/ @rhaschke @mlautman @felixvd
/moveit_core/robot_trajectory/ @mlautman
Expand Down
9 changes: 9 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ pull_request_rules:
branches:
- foxy

- name: backport to galactic at reviewers discretion
conditions:
- base=main
- "label=backport-galactic"
actions:
backport:
branches:
- galactic

- name: ask to resolve conflict
conditions:
- conflict
Expand Down
51 changes: 37 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,52 @@ on:
pull_request:
push:
branches:
- galactic
- main

jobs:
default:
strategy:
fail-fast: false
matrix:
env:
- IMAGE: galactic-ci
ROS_DISTRO: galactic
CLANG_TIDY: pedantic
- IMAGE: galactic-ci-testing
ROS_DISTRO: galactic
- IMAGE: rolling-ci
CCOV: true
ROS_DISTRO: rolling
- IMAGE: rolling-ci-testing
ROS_DISTRO: rolling
IKFAST_TEST: true
CLANG_TIDY: pedantic
env:
CXXFLAGS: "-Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls -Wno-deprecated-copy"
CXXFLAGS: >-
-Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls
CLANG_TIDY_ARGS: --fix --fix-errors --format-style=file
DOCKER_IMAGE: ghcr.io/ros-planning/moveit2:${{ matrix.env.IMAGE }}
UPSTREAM_WORKSPACE: moveit2.repos $(f="moveit2_$(sed 's/-.*$//' <<< "${{ matrix.env.IMAGE }}").repos"; test -r $f && echo $f)
# Pull any updates to the upstream workspace (after restoring it from cache)
AFTER_SETUP_UPSTREAM_WORKSPACE: vcs pull $BASEDIR/upstream_ws/src
AFTER_SETUP_DOWNSTREAM_WORKSPACE: vcs pull $BASEDIR/downstream_ws/src
# Clear the ccache stats before and log the stats after the build
AFTER_SETUP_CCACHE: ccache --zero-stats --max-size=10.0G
BEFORE_BUILD_UPSTREAM_WORKSPACE: ccache -z
AFTER_BUILD_TARGET_WORKSPACE: ccache -s
# Changing linker to lld as ld has a behavior where it takes a long time to finish
# Compile CCOV with Debug. Enable -Werror (except CLANG_TIDY=pedantic, which makes the clang-tidy step fail on warnings)
TARGET_CMAKE_ARGS: >
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_MODULE_LINKER_FLAGS=-fuse-ld=lld
-DCMAKE_BUILD_TYPE=${{ matrix.env.CCOV && 'Debug' || 'Release'}}
-DCMAKE_CXX_FLAGS="${{ matrix.env.CLANG_TIDY != 'pedantic' && '-Werror ' || '' }}${{ matrix.env.CCOV && ' --coverage -O2 -fno-omit-frame-pointer'}}"
-DCMAKE_CXX_FLAGS="${{ matrix.env.CLANG_TIDY != 'pedantic' && '-Werror ' || '' }}$CXXFLAGS${{ matrix.env.CCOV && ' --coverage -O2 -fno-omit-frame-pointer'}}"
UPSTREAM_CMAKE_ARGS: "-DCMAKE_CXX_FLAGS=''"
DOWNSTREAM_CMAKE_ARGS: -DCMAKE_CXX_FLAGS="-Wall -Wextra"
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CLANG_TIDY_BASE_REF: ${{ github.event_name != 'workflow_dispatch' && (github.base_ref || github.ref) || '' }}
BEFORE_CLANG_TIDY_CHECKS: (cd $TARGET_REPO_PATH; clang-tidy --list-checks)
BEFORE_CLANG_TIDY_CHECKS: |
# Show list of applied checks
(cd $TARGET_REPO_PATH; clang-tidy --list-checks)
# Disable clang-tidy for ikfast plugins as we cannot fix the generated code
find $BASEDIR/target_ws/build -iwholename "*_ikfast_plugin/compile_commands.json" -exec rm {} \;
CC: ${{ matrix.env.CLANG_TIDY && 'clang' }}
CXX: ${{ matrix.env.CLANG_TIDY && 'clang++' }}
ADDITIONAL_DEBS: lld
Expand All @@ -65,19 +76,27 @@ jobs:
sudo rm -rf /usr/local
df -h
- uses: actions/checkout@v2
- uses: testspace-com/setup-testspace@v1
with:
domain: ros-planning
- name: Get latest release date for rosdistro
id: rosdistro_release_date
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/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') }}
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 Expand Up @@ -110,6 +129,10 @@ jobs:
name: Run industrial_ci
uses: ros-industrial/industrial_ci@master
env: ${{ matrix.env }}
- name: Push result to Testspace
if: always()
run: |
testspace "[ ${{ matrix.env.IMAGE }} ]${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml"
- name: Upload test artifacts (on failure)
uses: actions/upload-artifact@v2
if: failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
Expand All @@ -118,24 +141,24 @@ jobs:
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: Generate codecov report
uses: rhaschke/lcov-action@main
if: matrix.env.CCOV && steps.ici.outputs.target_test_results == '0'
if: always() && matrix.env.CCOV && steps.ici.outputs.target_test_results == '0'
with:
docker: $DOCKER_IMAGE
workdir: ${{ env.BASEDIR }}/target_ws
ignore: '"*/target_ws/build/*" "*/target_ws/install/*" "*/test/*"'
- name: Upload codecov report
uses: codecov/codecov-action@v2
if: matrix.env.CCOV && steps.ici.outputs.target_test_results == '0'
if: always() && matrix.env.CCOV && steps.ici.outputs.target_test_results == '0'
with:
files: ${{ env.BASEDIR }}/target_ws/coverage.info
- name: Upload clang-tidy changes
uses: rhaschke/upload-git-patch-action@main
if: matrix.env.CLANG_TIDY
if: always() && matrix.env.CLANG_TIDY
with:
name: clang-tidy
path: ${{ env.BASEDIR }}/target_ws/src/$(basename $(pwd))
- name: Prepare target_ws for cache
if: "!matrix.env.CCOV"
if: always() && !matrix.env.CCOV
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
Expand Down
87 changes: 35 additions & 52 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
workflow_dispatch:
push:
branches:
- galactic
- main

jobs:
release:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [galactic]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -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 @@ -66,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [galactic]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
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 @@ -119,7 +91,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [galactic]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
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 All @@ -172,7 +130,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [galactic]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down Expand Up @@ -205,8 +163,33 @@ 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 }}
delete_untagged:
runs-on: ubuntu-latest
needs:
- release
- source
steps:
- name: Delete Untagged Images
uses: actions/github-script@v5
with:
github-token: ${{ secrets.DELETE_PACKAGES_TOKEN }}
script: |
const response = await github.request("GET /orgs/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions", {
per_page: ${{ env.PER_PAGE }}
});
for(version of response.data) {
if (version.metadata.container.tags.length == 0) {
console.log("delete " + version.id)
const deleteResponse = await github.request("DELETE /orgs/${{ env.OWNER }}/packages/container/${{ env.PACKAGE_NAME }}/versions/" + version.id, { });
console.log("status " + deleteResponse.status)
}
}
env:
OWNER: ros-planning
PACKAGE_NAME: moveit2
PER_PAGE: 100
Loading

0 comments on commit 3916051

Please sign in to comment.