Skip to content

Commit 649c651

Browse files
authored
CI: Use script to setup repository ci (#1)
* run the script to setup the repostory CI similar to how ros_controllers setus their CI because the goal is to eventually upstream these there. see https://rtw.stoglrobotics.de/master/use-cases/ros_packages/configure_repository.html * pre-commit run --all-files * remove RHEL build jobs they pull from ghcr.io and are failing due to permissions Signed-off-by: Alex Moriarty <[email protected]>
1 parent 1b8ec67 commit 649c651

38 files changed

+1027
-5
lines changed

.clang-format

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
5+
ColumnLimit: 100
6+
AccessModifierOffset: -2
7+
AlignAfterOpenBracket: AlwaysBreak
8+
BreakBeforeBraces: Allman
9+
ConstructorInitializerIndentWidth: 0
10+
ContinuationIndentWidth: 2
11+
DerivePointerAlignment: false
12+
PointerAlignment: Middle
13+
ReflowComments: true
14+
IncludeBlocks: Preserve
15+
...

.codespell-ignore-words.txt

Whitespace-only changes.

.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/picknik_controllers/tree/rolling) | [![Rolling Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-binary-build-main.yml?branch=main) <br /> [![Rolling Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-binary-build-testing.yml?branch=main) <br /> [![Rolling Semi-Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-semi-binary-build-main.yml?branch=main) <br /> [![Rolling Semi-Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-semi-binary-build-testing.yml?branch=main) <br /> [![Rolling Source Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-source-build.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/rolling-source-build.yml?branch=main) | [![Doxygen Doc Deployment](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://PickNikRobotics.github.io/picknik_controllers_Documentation/rolling/html/index.html) | [picknik_controllers](https://index.ros.org/p/picknik_controllers/#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/picknik_controllers/tree/humble) | [![Humble Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-binary-build-main.yml?branch=main) <br /> [![Humble Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-binary-build-testing.yml?branch=main) <br /> [![Humble Semi-Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-semi-binary-build-main.yml?branch=main) <br /> [![Humble Semi-Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-semi-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-semi-binary-build-testing.yml?branch=main) <br /> [![Humble Source Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-source-build.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/humble-source-build.yml?branch=main) | [![Doxygen Doc Deployment](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://PickNikRobotics.github.io/picknik_controllers_Documentation/humble/html/index.html) | [picknik_controllers](https://index.ros.org/p/picknik_controllers/#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/picknik_controllers/tree/iron) | [![Iron Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-binary-build-main.yml?branch=main) <br /> [![Iron Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-binary-build-testing.yml?branch=main) <br /> [![Iron Semi-Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-semi-binary-build-main.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-semi-binary-build-main.yml?branch=main) <br /> [![Iron Semi-Binary Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-semi-binary-build-testing.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-semi-binary-build-testing.yml?branch=main) <br /> [![Iron Source Build](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-source-build.yml/badge.svg?branch=main)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/iron-source-build.yml?branch=main) | [![Doxygen Doc Deployment](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/doxygen-deploy.yml/badge.svg)](https://github.com/PickNikRobotics/picknik_controllers/actions/workflows/doxygen-deploy.yml) <br /> [Generated Doc](https://PickNikRobotics.github.io/picknik_controllers_Documentation/iron/html/index.html) | [picknik_controllers](https://index.ros.org/p/picknik_controllers/#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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
fault_controller
30+
31+
vcs-repo-file-url: |
32+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/picknik_controllers-not-released.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }}
33+
colcon-defaults: |
34+
{
35+
"build": {
36+
"mixin": ["coverage-gcc"]
37+
}
38+
}
39+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
40+
- uses: codecov/[email protected]
41+
with:
42+
file: ros_ws/lcov/total_coverage.info
43+
flags: unittests
44+
name: codecov-umbrella
45+
- uses: actions/[email protected]
46+
with:
47+
name: colcon-logs-coverage-rolling
48+
path: ros_ws/log

.github/workflows/ci-format.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
10+
jobs:
11+
pre-commit:
12+
name: Format
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/[email protected]
17+
with:
18+
python-version: '3.10'
19+
- name: Install system hooks
20+
run: sudo apt install -qq clang-format-14 cppcheck
21+
- uses: pre-commit/[email protected]
22+
with:
23+
extra_args: --all-files --hook-stage manual

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
fault_controller
22+
23+
24+
ament_lint_100:
25+
name: ament_${{ matrix.linter }}
26+
runs-on: ubuntu-20.04
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
linter: [cpplint]
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: ros-tooling/[email protected]
34+
- uses: ros-tooling/[email protected]
35+
with:
36+
distribution: rolling
37+
linter: cpplint
38+
arguments: "--linelength=100 --filter=-whitespace/newline"
39+
package-name:
40+
fault_controller
41+
picknik_controllers
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Humble - ABI Compatibility Check
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
abi_check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: ros-industrial/industrial_ci@master
16+
env:
17+
ROS_DISTRO: humble
18+
ROS_REPO: main
19+
ABICHECK_URL: github:${{ github.repository }}#${{ github.base_ref }}
20+
NOT_TEST_BUILD: true
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: picknik_controllers-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: picknik_controllers-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: picknik_controllers.humble.repos
25+
ref_for_scheduled_build: main

0 commit comments

Comments
 (0)