Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI for Rolling / Ubuntu Noble #2793

Merged
merged 7 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .docker/source/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Downloads the moveit source code and install remaining debian dependencies

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

# Export ROS_UNDERLAY for downstream docker containers
Expand All @@ -16,7 +16,7 @@

# 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/ \

Check failure on line 19 in .docker/source/Dockerfile

View workflow job for this annotation

GitHub Actions / Lint Dockerfiles (source)

SC2086 info: Double quote to prevent globbing and word splitting.
# Enable ccache
PATH=/usr/lib/ccache:$PATH && \
# Fetch required upstream sources for building
Expand Down
76 changes: 31 additions & 45 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ jobs:
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'ros-planning/moveit2') }}

steps:
- uses: rhaschke/docker-run-action@v5
name: Check for apt updates
continue-on-error: true
id: apt
with:
image: ${{ env.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 "no_cache=$have_updates" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
Expand All @@ -51,7 +61,9 @@ jobs:
file: .docker/${{ github.job }}/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
push: ${{ env.PUSH }}
no-cache: 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
tags: |
${{ env.GH_IMAGE }}
${{ env.DH_IMAGE }}
Expand All @@ -71,47 +83,16 @@ jobs:
PUSH: ${{ (github.event_name != 'pull_request') && (github.repository == 'ros-planning/moveit2') }}

steps:
- 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: Build and Push
uses: docker/build-push-action@v5
- uses: rhaschke/docker-run-action@v5
name: Check for apt updates
continue-on-error: true
id: apt
with:
file: .docker/${{ github.job }}/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
push: ${{ env.PUSH }}
no-cache: true
tags: |
${{ env.GH_IMAGE }}
${{ env.DH_IMAGE }}

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

steps:
image: ${{ env.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 "no_cache=$have_updates" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
Expand All @@ -131,15 +112,19 @@ jobs:
uses: docker/build-push-action@v5
with:
file: .docker/${{ github.job }}/Dockerfile
build-args: OUR_ROS_DISTRO=${{ matrix.ROS_DISTRO }}
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
push: ${{ env.PUSH }}
no-cache: 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
tags: |
${{ env.GH_IMAGE }}
${{ env.GH_IMAGE }}-testing
${{ env.DH_IMAGE }}
${{ env.DH_IMAGE }}-testing

source:
needs: ci-testing
needs: ci
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -179,7 +164,8 @@ jobs:
file: .docker/${{ github.job }}/Dockerfile
build-args: ROS_DISTRO=${{ matrix.ROS_DISTRO }}
push: ${{ env.PUSH }}
no-cache: true
cache-from: type=registry,ref=${{ env.GH_IMAGE }}
cache-to: type=inline
tags: |
${{ env.GH_IMAGE }}
${{ env.DH_IMAGE }}
Expand Down
9 changes: 9 additions & 0 deletions moveit2_rolling.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
octomap:
type: git
url: https://github.com/octomap/octomap.git
version: devel
geometric_shapes:
type: git
url: https://github.com/ros-planning/geometric_shapes.git
version: ros2
17 changes: 14 additions & 3 deletions moveit_ros/benchmarks/src/BenchmarkExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,21 @@
#include <tf2_eigen/tf2_eigen.hpp>
#include <moveit/utils/logger.hpp>

#define BOOST_ALLOW_DEPRECATED_HEADERS
#include <boost/regex.hpp>
#undef BOOST_ALLOW_DEPRECATED_HEADERS

#if __has_include(<boost/timer/progress_display.hpp>)
#include <boost/timer/progress_display.hpp>
using boost_progress_display = boost::timer::progress_display;
#else
// boost < 1.72
#define BOOST_TIMER_ENABLE_DEPRECATED 1
#include <boost/progress.hpp>
#undef BOOST_TIMER_ENABLE_DEPRECATED
using boost_progress_display = boost::progress_display;
#endif

#include <boost/math/constants/constants.hpp>
#include <boost/filesystem.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <math.h>
#include <limits>
Expand Down Expand Up @@ -773,7 +784,7 @@ void BenchmarkExecutor::runBenchmark(moveit_msgs::msg::MotionPlanRequest request
}
num_planners += options.parallel_planning_pipelines.size();

boost::timer::progress_display progress(num_planners * options.runs, std::cout);
boost_progress_display progress(num_planners * options.runs, std::cout);

// Iterate through all planning pipelines
auto planning_pipelines = moveit_cpp_->getPlanningPipelines();
Expand Down
Loading