Skip to content

Commit bba8578

Browse files
authored
Merge pull request #29 from PickNikRobotics/setup-ci-with-script
ci: setup CI using script
2 parents 96e9594 + 437228f commit bba8578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1164
-366
lines changed

.clang-format

Lines changed: 15 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,20 @@
11
---
2-
BasedOnStyle: Google
3-
ColumnLimit: 120
4-
MaxEmptyLinesToKeep: 1
5-
SortIncludes: false
2+
Language: Cpp
3+
BasedOnStyle: Google
64

7-
Standard: Auto
8-
IndentWidth: 2
9-
TabWidth: 2
10-
UseTab: Never
115
AccessModifierOffset: -2
12-
ConstructorInitializerIndentWidth: 2
13-
NamespaceIndentation: None
14-
ContinuationIndentWidth: 4
15-
IndentCaseLabels: true
16-
IndentFunctionDeclarationAfterType: false
17-
18-
AlignEscapedNewlinesLeft: false
19-
AlignTrailingComments: true
20-
21-
AllowAllParametersOfDeclarationOnNextLine: false
22-
ExperimentalAutoDetectBinPacking: false
23-
ObjCSpaceBeforeProtocolList: true
24-
Cpp11BracedListStyle: false
25-
26-
AllowShortBlocksOnASingleLine: true
27-
AllowShortIfStatementsOnASingleLine: false
28-
AllowShortLoopsOnASingleLine: false
29-
AllowShortFunctionsOnASingleLine: None
30-
AllowShortCaseLabelsOnASingleLine: false
31-
32-
AlwaysBreakTemplateDeclarations: true
33-
AlwaysBreakBeforeMultilineStrings: false
34-
BreakBeforeBinaryOperators: false
35-
BreakBeforeTernaryOperators: false
36-
BreakConstructorInitializersBeforeComma: true
37-
38-
BinPackParameters: true
39-
ConstructorInitializerAllOnOneLineOrOnePerLine: true
40-
DerivePointerBinding: false
41-
PointerBindsToType: true
42-
43-
PenaltyExcessCharacter: 50
44-
PenaltyBreakBeforeFirstCallParameter: 30
45-
PenaltyBreakComment: 1000
46-
PenaltyBreakFirstLessLess: 10
47-
PenaltyBreakString: 100
48-
PenaltyReturnTypeOnItsOwnLine: 50
49-
50-
SpacesBeforeTrailingComments: 2
51-
SpacesInParentheses: false
52-
SpacesInAngles: false
53-
SpaceInEmptyParentheses: false
54-
SpacesInCStyleCastParentheses: false
55-
SpaceAfterCStyleCast: false
56-
SpaceAfterControlStatementKeyword: true
57-
SpaceBeforeAssignmentOperators: true
58-
59-
# Configure each individual brace in BraceWrapping
60-
BreakBeforeBraces: Custom
61-
62-
# Control of individual brace wrapping cases
6+
AlignAfterOpenBracket: AlwaysBreak
637
BraceWrapping:
64-
AfterCaseLabel: true
65-
AfterClass: true
66-
AfterControlStatement: true
67-
AfterEnum: true
68-
AfterFunction: true
69-
AfterNamespace: true
70-
AfterStruct: true
71-
AfterUnion: true
72-
BeforeCatch: true
73-
BeforeElse: true
74-
IndentBraces: false
8+
AfterClass: true
9+
AfterFunction: true
10+
AfterNamespace: true
11+
AfterStruct: true
12+
AfterEnum: true
13+
BreakBeforeBraces: Custom
14+
ColumnLimit: 100
15+
ConstructorInitializerIndentWidth: 0
16+
ContinuationIndentWidth: 2
17+
DerivePointerAlignment: false
18+
PointerAlignment: Middle
19+
ReflowComments: false
7520
...

.codespell-ignore-words.txt

Whitespace-only changes.

.flake8

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[flake8]
2+
max-line-length = 88
3+
4+
# Report all errors starting with E, F, W or C - or Bugbear's B590 rule, which is a "pragmatic" version of E501 (line too long)
5+
select = E,F,W,C,B590
6+
7+
# Ignore W503 - Line break occurred before a binary operator - because this error is introduced by Black formatter.
8+
# Ignore E203 - whitespace before ':' - because Black includes spaces in formatting slice expressions.
9+
# Ignore E501 - line too long - in favor of B590, which is more forgiving of long strings and comments that would be silly to break up.
10+
extend-ignore = W503, E203, E501

.github/workflows/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
ROS2 Distro | Branch | Build status | Documentation | Released packages
3+
:---------: | :----: | :----------: | :-----------: | :---------------:
4+
**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)
5+
6+
## Build status
7+
8+
9+
### Explanation of different build types
10+
11+
**NOTE**: There are three build stages checking current and future compatibility of the package.
12+
13+
[Detailed build status](.github/workflows/README.md)
14+
15+
1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
16+
17+
Uses repos file: `$NAME$-not-released.<ros-distro>.repos`
18+
19+
1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
20+
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.
21+
22+
Uses repos file: `$NAME$.repos`
23+
24+
1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
25+
26+
ROS2 Distro | Branch | Build status | Documentation | Released packages
27+
:---------: | :----: | :----------: | :-----------: | :---------------:
28+
**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)
29+
30+
## Build status
31+
32+
33+
### Explanation of different build types
34+
35+
**NOTE**: There are three build stages checking current and future compatibility of the package.
36+
37+
[Detailed build status](.github/workflows/README.md)
38+
39+
1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
40+
41+
Uses repos file: `$NAME$-not-released.<ros-distro>.repos`
42+
43+
1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
44+
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.
45+
46+
Uses repos file: `$NAME$.repos`
47+
48+
1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
49+
50+
ROS2 Distro | Branch | Build status | Documentation | Released packages
51+
:---------: | :----: | :----------: | :-----------: | :---------------:
52+
**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)
53+
54+
## Build status
55+
56+
57+
### Explanation of different build types
58+
59+
**NOTE**: There are three build stages checking current and future compatibility of the package.
60+
61+
[Detailed build status](.github/workflows/README.md)
62+
63+
1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
64+
65+
Uses repos file: `$NAME$-not-released.<ros-distro>.repos`
66+
67+
1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
68+
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.
69+
70+
Uses repos file: `$NAME$.repos`
71+
72+
1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Coverage Build
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
coverage:
12+
name: coverage build
13+
runs-on: ubuntu-22.04
14+
strategy:
15+
fail-fast: false
16+
env:
17+
ROS_DISTRO: rolling
18+
steps:
19+
- uses: ros-tooling/[email protected]
20+
with:
21+
required-ros-distributions: ${{ env.ROS_DISTRO }}
22+
- uses: actions/checkout@v3
23+
- uses: ros-tooling/[email protected]
24+
with:
25+
target-ros2-distro: ${{ env.ROS_DISTRO }}
26+
import-token: ${{ secrets.GITHUB_TOKEN }}
27+
# build all packages listed in the meta package
28+
package-name:
29+
robotiq_driver
30+
robotiq_controllers
31+
robotiq_description
32+
33+
vcs-repo-file-url: |
34+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/ros2_robotiq_gripper-not-released.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }}
35+
colcon-defaults: |
36+
{
37+
"build": {
38+
"mixin": ["coverage-gcc"]
39+
}
40+
}
41+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
42+
- uses: codecov/[email protected]
43+
with:
44+
file: ros_ws/lcov/total_coverage.info
45+
flags: unittests
46+
name: codecov-umbrella
47+
- uses: actions/[email protected]
48+
with:
49+
name: colcon-logs-coverage-rolling
50+
path: ros_ws/log

.github/workflows/ci-format.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This is a format job. Pre-commit has a first-party GitHub action, so we use
2+
# that: https://github.com/pre-commit/action
3+
4+
name: Format
5+
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
pre-commit:
15+
name: Format
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/[email protected]
20+
with:
21+
python-version: '3.10'
22+
- name: Install system hooks
23+
run: sudo apt install -qq clang-format-14 cppcheck
24+
- uses: pre-commit/[email protected]
25+
with:
26+
extra_args: --all-files --hook-stage manual

.github/workflows/ci-ros-lint.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ROS Lint
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
ament_lint:
7+
name: ament_${{ matrix.linter }}
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
linter: [cppcheck, copyright, lint_cmake]
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: ros-tooling/[email protected]
16+
- uses: ros-tooling/[email protected]
17+
with:
18+
distribution: rolling
19+
linter: ${{ matrix.linter }}
20+
package-name:
21+
robotiq_driver
22+
robotiq_controllers
23+
robotiq_description
24+
25+
26+
ament_lint_100:
27+
name: ament_${{ matrix.linter }}
28+
runs-on: ubuntu-20.04
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
linter: [cpplint]
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: ros-tooling/[email protected]
36+
- uses: ros-tooling/[email protected]
37+
with:
38+
distribution: rolling
39+
linter: cpplint
40+
arguments: "--linelength=100 --filter=-whitespace/newline"
41+
package-name:
42+
robotiq_driver
43+
robotiq_controllers
44+
robotiq_description
45+
ros2_robotiq_gripper
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Humble Binary Build - main
2+
# author: Denis Štogl <[email protected]>
3+
# description: 'Build & test all dependencies from released (binary) packages.'
4+
5+
on:
6+
workflow_dispatch:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
push:
13+
branches:
14+
- main
15+
schedule:
16+
# Run every morning to detect flakiness and broken dependencies
17+
- cron: '03 1 * * *'
18+
19+
jobs:
20+
binary:
21+
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
22+
with:
23+
ros_distro: humble
24+
ros_repo: main
25+
upstream_workspace: ros2_robotiq_gripper-not-released.humble.repos
26+
ref_for_scheduled_build: main
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Humble Binary Build - testing
2+
# author: Denis Štogl <[email protected]>
3+
# description: 'Build & test all dependencies from released (binary) packages.'
4+
5+
on:
6+
workflow_dispatch:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
push:
13+
branches:
14+
- main
15+
schedule:
16+
# Run every morning to detect flakiness and broken dependencies
17+
- cron: '03 1 * * *'
18+
19+
jobs:
20+
binary:
21+
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
22+
with:
23+
ros_distro: humble
24+
ros_repo: testing
25+
upstream_workspace: ros2_robotiq_gripper-not-released.humble.repos
26+
ref_for_scheduled_build: main
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Humble Semi-Binary Build - main
2+
# description: 'Build & test that compiles the main dependencies from source.'
3+
4+
on:
5+
workflow_dispatch:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
push:
12+
branches:
13+
- main
14+
schedule:
15+
# Run every morning to detect flakiness and broken dependencies
16+
- cron: '33 1 * * *'
17+
18+
jobs:
19+
semi_binary:
20+
uses: ./.github/workflows/reusable-industrial-ci-with-cache.yml
21+
with:
22+
ros_distro: humble
23+
ros_repo: main
24+
upstream_workspace: ros2_robotiq_gripper.humble.repos
25+
ref_for_scheduled_build: main

0 commit comments

Comments
 (0)