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

Migrate to GitHub Actions [ros2] #99

Merged
merged 2 commits into from
Mar 19, 2021
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
20 changes: 20 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This is a format job. Pre-commit has a first-party GitHub action, so we use
# that: https://github.com/pre-commit/action

name: Format

on:
workflow_dispatch:
pull_request:
push:

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install clang-format-10
run: sudo apt-get install clang-format-10
- uses: pre-commit/action@v2.0.0
27 changes: 27 additions & 0 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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: [push, pull_request]

jobs:
industrial_ci:
strategy:
matrix:
env:
- {ROS_DISTRO: foxy, ROS_REPO: main}
- {ROS_DISTRO: foxy, ROS_REPO: testing}
env:
CCACHE_DIR: ~/.ccache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}-${{ github.sha }}
restore-keys: |
ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
- uses: 'ros-industrial/industrial_ci@master'
env: ${{ matrix.env }}
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit

repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending

- repo: local
hooks:
- id: clang-format
name: clang-format
description: Format files with ClangFormat.
entry: clang-format-10
language: system
files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']

- repo: local
hooks:
- id: misspelled-moveit
name: misspelled-moveit
description: MoveIt should be spelled exactly as MoveIt
language: pygrep
entry: Moveit|MoveIt!
exclude: .pre-commit-config.yaml|README.md
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

# Disable Wredundant-decls warnings since rosidl generates redundant function declarations
# Disable Wredundant-decls warnings since rosidl generates redundant function
# declarations
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-redundant-decls")
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-redundant-decls")
Comment on lines -11 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which linter enforces this? ament_lint_cmake?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it enforces a 80 character line limit in cmake files

endif()

find_package(ament_cmake REQUIRED)
Expand Down Expand Up @@ -126,4 +128,9 @@ rosidl_generate_interfaces(${PROJECT_NAME}

ament_export_dependencies(rosidl_default_runtime)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ This package includes the ROS messages specific to MoveIt

## Travis - Continuous Integration

[![Build Status](https://travis-ci.org/ros-planning/moveit_msgs.svg?branch=ros2)](https://travis-ci.org/ros-planning/moveit_msgs)
GitHub Actions: [![Format](https://github.com/ros-planning/moveit_msgs/actions/workflows/format.yml/badge.svg?branch=ros2)](https://github.com/ros-planning/moveit_msgs/actions/workflows/format.yml?branch=ros2) [![BuildAndTest](https://github.com/ros-planning/moveit_msgs/actions/workflows/industrial_ci_action.yml/badge.svg?branch=ros2)](https://github.com/ros-planning/moveit_msgs/actions/workflows/industrial_ci_action.yml?branch=ros2)
2 changes: 1 addition & 1 deletion msg/CartesianPoint.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This message defines a point in a cartesian trajectory
geometry_msgs/Pose pose
geometry_msgs/Twist velocity
geometry_msgs/Accel acceleration
geometry_msgs/Accel acceleration
2 changes: 1 addition & 1 deletion msg/JointConstraint.msg
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ float64 tolerance_above
float64 tolerance_below

# A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
float64 weight
float64 weight
1 change: 0 additions & 1 deletion msg/PositionIKRequest.msg
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ geometry_msgs/PoseStamped[] pose_stamped_vector

# Maximum allowed time for IK calculation
builtin_interfaces/Duration timeout

3 changes: 3 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<exec_depend>rosidl_default_runtime</exec_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_cmake</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down
2 changes: 1 addition & 1 deletion srv/LoadMap.srv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
string filename
---
bool success
bool success
2 changes: 0 additions & 2 deletions srv/SaveMap.srv
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ string filename
---

bool success


1 change: 0 additions & 1 deletion srv/SetPlannerParams.srv
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ PlannerParams params
bool replace

---