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

ci: setup CI using script #29

Merged
merged 19 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
Empty file added .codespell-ignore-words.txt
Empty file.
72 changes: 72 additions & 0 deletions .github/workflows/README.md
moriarty marked this conversation as resolved.
Show resolved Hide resolved
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:
moriarty marked this conversation as resolved.
Show resolved Hide resolved
moriarty marked this conversation as resolved.
Show resolved Hide resolved

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
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
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
26 changes: 26 additions & 0 deletions .github/workflows/iron-binary-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Iron 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: iron
ros_repo: main
upstream_workspace: ros2_robotiq_gripper-not-released.iron.repos
ref_for_scheduled_build: main
26 changes: 26 additions & 0 deletions .github/workflows/iron-binary-build-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Iron 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: iron
ros_repo: testing
upstream_workspace: ros2_robotiq_gripper-not-released.iron.repos
ref_for_scheduled_build: main
25 changes: 25 additions & 0 deletions .github/workflows/iron-semi-binary-build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Iron 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: iron
ros_repo: main
upstream_workspace: ros2_robotiq_gripper.iron.repos
ref_for_scheduled_build: main
Loading