Skip to content

Commit

Permalink
ci: setup CI using script
Browse files Browse the repository at this point in the history
- Run the same script that packages in ros-controls github org use
- https://rtw.stoglrobotics.de/master/use-cases/ros_packages/configure_repository.html

These will likely fail due to serial not being released for ROS2
- see #21
- wjwwood/serial#204
- wjwwood/serial#283

Signed-off-by: Alex Moriarty <alex.moriarty@picknik.ai>
  • Loading branch information
moriarty committed Jun 20, 2023
1 parent 39df060 commit ef68501
Show file tree
Hide file tree
Showing 39 changed files with 986 additions and 7 deletions.
Empty file added .codespell-ignore-words.txt
Empty file.
72 changes: 72 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

ROS2 Distro | Branch | Build status | Documentation | Released packages
:---------: | :----: | :----------: | :-----------: | :---------------:
**Rolling** | [`rolling`](https://github.com/PickNikRobotics/ros2_robotiq_gripper/tree/rolling) | [![Rolling Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-binary-build-main.yml?branch=main) <br /> [![Rolling Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-binary-build-testing.yml?branch=main) <br /> [![Rolling Semi-Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-semi-binary-build-main.yml?branch=main) <br /> [![Rolling Semi-Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-semi-binary-build-testing.yml?branch=main) <br /> [![Rolling Source Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-source-build.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/rolling-source-build.yml?branch=main) | [![Doxygen Doc Deployment](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://PickNikRobotics.github.io/ros2_robotiq_gripper_Documentation/rolling/html/index.html) | [ros2_robotiq_gripper](https://index.ros.org/p/ros2_robotiq_gripper/#rolling)

## Build status


### Explanation of different build types

**NOTE**: There are three build stages checking current and future compatibility of the package.

[Detailed build status](.github/workflows/README.md)

1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.

Uses repos file: `$NAME$-not-released.<ros-distro>.repos`

1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.

Uses repos file: `$NAME$.repos`

1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.

ROS2 Distro | Branch | Build status | Documentation | Released packages
:---------: | :----: | :----------: | :-----------: | :---------------:
**Humble** | [`humble`](https://github.com/PickNikRobotics/ros2_robotiq_gripper/tree/humble) | [![Humble Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-binary-build-main.yml?branch=main) <br /> [![Humble Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-binary-build-testing.yml?branch=main) <br /> [![Humble Semi-Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-semi-binary-build-main.yml?branch=main) <br /> [![Humble Semi-Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-semi-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-semi-binary-build-testing.yml?branch=main) <br /> [![Humble Source Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-source-build.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/humble-source-build.yml?branch=main) | [![Doxygen Doc Deployment](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://PickNikRobotics.github.io/ros2_robotiq_gripper_Documentation/humble/html/index.html) | [ros2_robotiq_gripper](https://index.ros.org/p/ros2_robotiq_gripper/#humble)

## Build status


### Explanation of different build types

**NOTE**: There are three build stages checking current and future compatibility of the package.

[Detailed build status](.github/workflows/README.md)

1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.

Uses repos file: `$NAME$-not-released.<ros-distro>.repos`

1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.

Uses repos file: `$NAME$.repos`

1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.

ROS2 Distro | Branch | Build status | Documentation | Released packages
:---------: | :----: | :----------: | :-----------: | :---------------:
**Iron** | [`iron`](https://github.com/PickNikRobotics/ros2_robotiq_gripper/tree/iron) | [![Iron Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-binary-build-main.yml?branch=main) <br /> [![Iron Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-binary-build-testing.yml?branch=main) <br /> [![Iron Semi-Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-semi-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-semi-binary-build-main.yml?branch=main) <br /> [![Iron Semi-Binary Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-semi-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-semi-binary-build-testing.yml?branch=main) <br /> [![Iron Source Build](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-source-build.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/iron-source-build.yml?branch=main) | [![Doxygen Doc Deployment](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/PickNikRobotics/ros2_robotiq_gripper/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://PickNikRobotics.github.io/ros2_robotiq_gripper_Documentation/iron/html/index.html) | [ros2_robotiq_gripper](https://index.ros.org/p/ros2_robotiq_gripper/#iron)

## Build status


### Explanation of different build types

**NOTE**: There are three build stages checking current and future compatibility of the package.

[Detailed build status](.github/workflows/README.md)

1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.

Uses repos file: `$NAME$-not-released.<ros-distro>.repos`

1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.

Uses repos file: `$NAME$.repos`

1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
50 changes: 50 additions & 0 deletions .github/workflows/ci-coverage-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Coverage Build
on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main

jobs:
coverage:
name: coverage build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
env:
ROS_DISTRO: rolling
steps:
- uses: ros-tooling/setup-ros@0.3.4
with:
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: actions/checkout@v3
- uses: ros-tooling/action-ros-ci@0.2.6
with:
target-ros2-distro: ${{ env.ROS_DISTRO }}
import-token: ${{ secrets.GITHUB_TOKEN }}
# build all packages listed in the meta package
package-name:
robotiq_driver
robotiq_controllers
robotiq_description

vcs-repo-file-url: |
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/ros2_robotiq_gripper-not-released.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }}
colcon-defaults: |
{
"build": {
"mixin": ["coverage-gcc"]
}
}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- uses: codecov/codecov-action@v3.1.0
with:
file: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
- uses: actions/upload-artifact@v3.1.0
with:
name: colcon-logs-coverage-rolling
path: ros_ws/log
23 changes: 23 additions & 0 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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:

jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.4.0
with:
python-version: '3.10'
- name: Install system hooks
run: sudo apt install -qq clang-format-14 cppcheck
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files --hook-stage manual
45 changes: 45 additions & 0 deletions .github/workflows/ci-ros-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ROS Lint
on:
pull_request:

jobs:
ament_lint:
name: ament_${{ matrix.linter }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
linter: [cppcheck, copyright, lint_cmake]
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.2
- uses: ros-tooling/action-ros-lint@v0.1
with:
distribution: rolling
linter: ${{ matrix.linter }}
package-name:
robotiq_driver
robotiq_controllers
robotiq_description


ament_lint_100:
name: ament_${{ matrix.linter }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
linter: [cpplint]
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.2
- uses: ros-tooling/action-ros-lint@v0.1
with:
distribution: rolling
linter: cpplint
arguments: "--linelength=100 --filter=-whitespace/newline"
package-name:
robotiq_driver
robotiq_controllers
robotiq_description
ros2_robotiq_gripper
20 changes: 20 additions & 0 deletions .github/workflows/humble-abi-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Humble - ABI Compatibility Check
on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main

jobs:
abi_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: humble
ROS_REPO: main
ABICHECK_URL: github:${{ github.repository }}#${{ github.base_ref }}
NOT_TEST_BUILD: true
26 changes: 26 additions & 0 deletions .github/workflows/humble-binary-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Humble Binary Build - main
# author: Denis Štogl <denis@stoglrobotics.de>
# description: 'Build & test all dependencies from released (binary) packages.'

on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: humble
ros_repo: main
upstream_workspace: ros2_robotiq_gripper-not-released.humble.repos
ref_for_scheduled_build: main
26 changes: 26 additions & 0 deletions .github/workflows/humble-binary-build-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Humble Binary Build - testing
# author: Denis Štogl <denis@stoglrobotics.de>
# description: 'Build & test all dependencies from released (binary) packages.'

on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'

jobs:
binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: humble
ros_repo: testing
upstream_workspace: ros2_robotiq_gripper-not-released.humble.repos
ref_for_scheduled_build: main
33 changes: 33 additions & 0 deletions .github/workflows/humble-rhel-binary-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Humble RHEL Binary Build
on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '03 1 * * *'


jobs:
humble_rhel_binary:
name: Humble RHEL binary build
runs-on: ubuntu-latest
env:
ROS_DISTRO: humble
container: ghcr.io/ros-controls/ros:humble-rhel
steps:
- uses: actions/checkout@v3
with:
path: src/ros2_robotiq_gripper
- run: |
rosdep update
rosdep install -iy --from-path src/ros2_robotiq_gripper
source /opt/ros/${{ env.ROS_DISTRO }}/setup.bash
colcon build
colcon test
25 changes: 25 additions & 0 deletions .github/workflows/humble-semi-binary-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Humble Semi-Binary Build - main
# description: 'Build & test that compiles the main dependencies from source.'

on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '33 1 * * *'

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: humble
ros_repo: main
upstream_workspace: ros2_robotiq_gripper.humble.repos
ref_for_scheduled_build: main
25 changes: 25 additions & 0 deletions .github/workflows/humble-semi-binary-build-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Humble Semi-Binary Build - testing
# description: 'Build & test that compiles the main dependencies from source.'

on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '33 1 * * *'

jobs:
semi_binary:
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
with:
ros_distro: humble
ros_repo: testing
upstream_workspace: ros2_robotiq_gripper.humble.repos
ref_for_scheduled_build: main
19 changes: 19 additions & 0 deletions .github/workflows/humble-source-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Humble Source Build
on:
workflow_dispatch:
branches:
- main
push:
branches:
- main
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '03 3 * * *'

jobs:
source:
uses: ./.github/workflows/reusable-ros-tooling-source-build.yml
with:
ros_distro: humble
ref: main
ros2_repo_branch: humble
20 changes: 20 additions & 0 deletions .github/workflows/iron-abi-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Iron - ABI Compatibility Check
on:
workflow_dispatch:
branches:
- main
pull_request:
branches:
- main

jobs:
abi_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: iron
ROS_REPO: main
ABICHECK_URL: github:${{ github.repository }}#${{ github.base_ref }}
NOT_TEST_BUILD: true
Loading

0 comments on commit ef68501

Please sign in to comment.