Skip to content

Commit

Permalink
Merge branch 'main' into pr-catch_segfault_for_better_error_handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahr authored Oct 24, 2023
2 parents d0b54d2 + cc98099 commit bf3c6e6
Show file tree
Hide file tree
Showing 350 changed files with 7,703 additions and 7,165 deletions.
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ SpaceBeforeAssignmentOperators: true
# Configure each individual brace in BraceWrapping
BreakBeforeBraces: Custom

# Qualifiers (const, volatile, static, etc)
QualifierAlignment: Custom
QualifierOrder: ['static', 'inline', 'constexpr', 'const', 'volatile', 'type']

# Control of individual brace wrapping cases
BraceWrapping:
AfterCaseLabel: true
Expand Down
2 changes: 2 additions & 0 deletions .codespell_words
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ uint
whis
sinic
padd
brin
aas
42 changes: 42 additions & 0 deletions .docker/tutorial-source/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# syntax = docker/dockerfile:1.3

# ghcr.io/ros-planning/moveit2:main-${ROS_DISTRO}-tutorial-source
# Source build of the repos file from the tutorail site

ARG ROS_DISTRO=rolling
FROM moveit/moveit2:${ROS_DISTRO}-ci
LABEL maintainer Tyler Weaver [email protected]

# Export ROS_UNDERLAY for downstream docker containers
ENV ROS_UNDERLAY /root/ws_moveit/install
WORKDIR $ROS_UNDERLAY/..

# Copy MoveIt sources from docker context
COPY . src/moveit2

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
RUN --mount=type=cache,target=/root/.ccache/,sharing=locked \
# Enable ccache
PATH=/usr/lib/ccache:$PATH && \
# Checkout the tutorial repo
git clone https://github.com/ros-planning/moveit2_tutorials src/moveit2_tutorials && \
# Fetch required upstream sources for building
vcs import --skip-existing src < src/moveit2_tutorials/moveit2_tutorials.repos && \
# Source ROS install
. "/opt/ros/${ROS_DISTRO}/setup.sh" &&\
# Install dependencies from rosdep
apt-get -q update && \
rosdep update && \
DEBIAN_FRONTEND=noninteractive \
rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \
rm -rf /var/lib/apt/lists/* && \
# Build the workspace
colcon build \
--cmake-args "-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli" \
--ament-cmake-args -DCMAKE_BUILD_TYPE=Release \
--event-handlers desktop_notification- status- && \
ccache -s && \
#
# Update /ros_entrypoint.sh to source our new workspace
sed -i "s#/opt/ros/\$ROS_DISTRO/setup.bash#$ROS_UNDERLAY/setup.sh#g" /ros_entrypoint.sh
9 changes: 9 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ pull_request_rules:
branches:
- humble

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

- name: ask to resolve conflict
conditions:
- conflict
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
ROS_DISTRO: rolling
IKFAST_TEST: true
CLANG_TIDY: pedantic
# Silent gmock/gtest warnings: https://github.com/ament/googletest/pull/21
AFTER_BUILD_UPSTREAM_WORKSPACE: |
git clone --quiet --branch clalancette/update-to-gtest-1.11 https://github.com/ament/googletest "${BASEDIR}/upstream_ws/src/googletest"
builder_run_build "/opt/ros/${ROS_DISTRO}" "${BASEDIR}/upstream_ws" --packages-select gtest_vendor gmock_vendor
- IMAGE: humble-ci
ROS_DISTRO: humble
- IMAGE: humble-ci-testing
Expand Down Expand Up @@ -85,7 +81,7 @@ jobs:
# free up a lot of stuff from /usr/local
sudo rm -rf /usr/local
df -h
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: testspace-com/setup-testspace@v1
if: github.repository == 'ros-planning/moveit2'
with:
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble, rolling]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -31,22 +31,22 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: .docker/${{ github.job }}/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
Expand All @@ -60,7 +60,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble, rolling]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -72,22 +72,22 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: .docker/${{ github.job }}/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
Expand All @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble, rolling]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -113,22 +113,22 @@ jobs:

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: .docker/${{ github.job }}/Dockerfile
build-args: OUR_ROS_DISTRO=${{ matrix.ROS_DISTRO }}
Expand All @@ -143,7 +143,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [humble, rolling]
ROS_DISTRO: [rolling]
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -154,26 +154,26 @@ jobs:
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'ros-planning/moveit2') }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: env.PUSH == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: "Remove .dockerignore"
run: rm .dockerignore # enforce full source context
- name: Build and Push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
file: .docker/${{ github.job }}/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: Lint Dockerfiles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: hadolint/[email protected]
with:
dockerfile: .docker/${{ matrix.DOCKERFILE_PATH }}/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [humble, rolling]
distro: [rolling]

env:
ROS_DISTRO: ${{ matrix.distro }}
Expand All @@ -21,6 +21,6 @@ jobs:
name: "${{ matrix.distro }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: industrial_ci
uses: ros-industrial/industrial_ci@master
4 changes: 2 additions & 2 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# free up a lot of stuff from /usr/local
sudo rm -rf /usr/local
df -h
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: testspace-com/setup-testspace@v1
if: github.repository == 'ros-planning/moveit2'
with:
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
run: cat ${{ github.workspace }}/.work/target_ws/coverage.info
- name: Install sonar-scanner
if: steps.ici.outputs.target_test_results == '0'
uses: SonarSource/sonarcloud-github-c-cpp@v1
uses: SonarSource/sonarcloud-github-c-cpp@v2
- name: Run sonar-scanner
if: steps.ici.outputs.target_test_results == '0'
env:
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/tutorial_docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: "Tutorial Docker Images"

on:
schedule:
# 5 PM UTC every Sunday
- cron: '0 17 * * 6'
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
tutorial-source:
strategy:
fail-fast: false
matrix:
ROS_DISTRO: [rolling, humble, iron]
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
env:
GH_IMAGE: ghcr.io/ros-planning/moveit2:main-${{ matrix.ROS_DISTRO }}-${{ github.job }}
DH_IMAGE: moveit/moveit2:main-${{ matrix.ROS_DISTRO }}-${{ github.job }}
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'ros-planning/moveit2') }}

steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
if: env.PUSH == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: env.PUSH == 'true'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: "Remove .dockerignore"
run: rm .dockerignore # enforce full source context
- name: Cache ccache
uses: actions/cache@v3
with:
path: .ccache
key: docker-tutorial-ccache-${{ matrix.ROS_DISTRO }}-${{ hashFiles( '.docker/tutorial-source/Dockerfile' ) }}
- name: inject ccache into docker
uses: reproducible-containers/[email protected]
with:
cache-source: .ccache
cache-target: /root/.ccache/
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: .docker/${{ github.job }}/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
push: ${{ env.PUSH }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
${{ env.GH_IMAGE }}
${{ env.DH_IMAGE }}
delete_untagged:
runs-on: ubuntu-latest
needs:
- tutorial-source
steps:
- name: Delete Untagged Images
if: (github.event_name != 'pull_request') && (github.repository == 'ros-planning/moveit2')
uses: actions/github-script@v6
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 bf3c6e6

Please sign in to comment.