Skip to content

Commit b0e709d

Browse files
destoglbmagyar
authored andcommitted
Add CI setup as for ros2_control repository.
1 parent 4599e9a commit b0e709d

37 files changed

+1065
-29
lines changed

.clang-format

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
5+
AccessModifierOffset: -2
6+
AlignAfterOpenBracket: AlwaysBreak
7+
BreakBeforeBraces: Custom
8+
BraceWrapping:
9+
AfterClass: true
10+
AfterFunction: true
11+
AfterNamespace: true
12+
AfterStruct: true
13+
ColumnLimit: 100
14+
ConstructorInitializerIndentWidth: 0
15+
ContinuationIndentWidth: 2
16+
DerivePointerAlignment: false
17+
PointerAlignment: Middle
18+
ReflowComments: false
19+
IncludeBlocks: Preserve
20+
...

.github/workflows/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Build status
2+
3+
ROS2 Distro | Branch | Build status | Documentation | Released packages
4+
:---------: | :----: | :----------: | :-----------: | :---------------:
5+
**Rolling** | [`rolling`](https://github.com/ros-controls/realtime_tools/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-binary-build-main.yml?branch=master) <br /> [![Rolling Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-binary-build-testing.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-semi-binary-build-main.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-semi-binary-build-testing.yml?branch=master) <br /> [![Rolling Source Build](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/rolling-source-build.yml?branch=master) | | [realtime_tools](https://index.ros.org/p/realtime_tools/#rolling)
6+
**Humble** | [`humble`](https://github.com/ros-controls/realtime_tools/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-binary-build-main.yml?branch=master) <br /> [![Humble Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-binary-build-testing.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-semi-binary-build-main.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-semi-binary-build-testing.yml?branch=master) <br /> [![Humble Source Build](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/humble-source-build.yml?branch=master) | | [realtime_tools](https://index.ros.org/p/realtime_tools/#humble)
7+
**Galacitc** | [`galacitc`](https://github.com/ros-controls/realtime_tools/tree/galacitc) | [![Galacitc Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-binary-build-main.yml?branch=master) <br /> [![Galacitc Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-binary-build-testing.yml?branch=master) <br /> [![Galacitc Semi-Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-semi-binary-build-main.yml?branch=master) <br /> [![Galacitc Semi-Binary Build](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/realtime_tools/actions/workflows/galacitc-semi-binary-build-testing.yml?branch=master) <br /> | | [realtime_tools](https://index.ros.org/p/realtime_tools/#galacitc)
8+
9+
10+
### Explanation of different build types
11+
12+
**NOTE**: There are three build stages checking current and future compatibility of the package.
13+
14+
[Detailed build status](.github/workflows/README.md)
15+
16+
1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
17+
18+
Uses repos file: `$NAME$-not-released.<ros-distro>.repos`
19+
20+
1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
21+
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.
22+
23+
Uses repos file: `$NAME$.repos`
24+
25+
1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Coverage Build
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
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+
realtime_tools
30+
31+
vcs-repo-file-url: |
32+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/realtime_tools-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

+23
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/setup-python@v2
17+
with:
18+
python-version: 3.9.7
19+
- name: Install system hooks
20+
run: sudo apt install -qq clang-format-12 cppcheck
21+
- uses: pre-commit/[email protected]
22+
with:
23+
extra_args: --all-files --hook-stage manual

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

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
22+
23+
ament_lint_100:
24+
name: ament_${{ matrix.linter }}
25+
runs-on: ubuntu-20.04
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
linter: [cpplint]
30+
steps:
31+
- uses: actions/checkout@v3
32+
- uses: ros-tooling/[email protected]
33+
- uses: ros-tooling/[email protected]
34+
with:
35+
distribution: rolling
36+
linter: cpplint
37+
arguments: "--linelength=100 --filter=-whitespace/newline"
38+
package-name:
39+
realtime_tools
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Galacitc - ABI Compatibility Check
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
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: galacitc
18+
ROS_REPO: main
19+
ABICHECK_URL: github:${{ github.repository }}#${{ github.base_ref }}
20+
NOT_TEST_BUILD: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Galacitc 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+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
push:
13+
branches:
14+
- master
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: galacitc
24+
ros_repo: main
25+
upstream_workspace: realtime_tools-not-released.galacitc.repos
26+
ref_for_scheduled_build: master
27+
secrets:
28+
SCH_COMMON_KEY: ${{ secrets.SCH_COMMON_KEY }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Galacitc 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+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
push:
13+
branches:
14+
- master
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: galacitc
24+
ros_repo: testing
25+
upstream_workspace: realtime_tools-not-released.galacitc.repos
26+
ref_for_scheduled_build: master
27+
secrets:
28+
SCH_COMMON_KEY: ${{ secrets.SCH_COMMON_KEY }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Galacitc RHEL Binary Build
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
push:
10+
branches:
11+
- master
12+
schedule:
13+
# Run every day to detect flakiness and broken dependencies
14+
- cron: '03 1 * * *'
15+
16+
17+
jobs:
18+
galacitc_rhel_binary:
19+
name: Galacitc RHEL binary build
20+
runs-on: ubuntu-latest
21+
env:
22+
ROS_DISTRO: galacitc
23+
container: jaronl/ros:galacitc-alma
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
path: src/realtime_tools
28+
- run: |
29+
rosdep update
30+
rosdep install -iy --from-path src/realtime_tools
31+
source /opt/ros/${{ env.ROS_DISTRO }}/setup.bash
32+
colcon build
33+
colcon test
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Galacitc Semi-Binary Build - main
2+
# description: 'Build & test that compiles the main dependencies from source.'
3+
4+
on:
5+
workflow_dispatch:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
push:
12+
branches:
13+
- master
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: galacitc
23+
ros_repo: main
24+
upstream_workspace: realtime_tools.galacitc.repos
25+
ref_for_scheduled_build: master
26+
secrets:
27+
SCH_COMMON_KEY: ${{ secrets.SCH_COMMON_KEY }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Galacitc Semi-Binary Build - testing
2+
# description: 'Build & test that compiles the main dependencies from source.'
3+
4+
on:
5+
workflow_dispatch:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
push:
12+
branches:
13+
- master
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: galacitc
23+
ros_repo: testing
24+
upstream_workspace: realtime_tools.galacitc.repos
25+
ref_for_scheduled_build: master
26+
secrets:
27+
SCH_COMMON_KEY: ${{ secrets.SCH_COMMON_KEY }}
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+
- master
6+
pull_request:
7+
branches:
8+
- master
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
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
- master
9+
pull_request:
10+
branches:
11+
- master
12+
push:
13+
branches:
14+
- master
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: realtime_tools-not-released.humble.repos
26+
ref_for_scheduled_build: master
27+
secrets:
28+
SCH_COMMON_KEY: ${{ secrets.SCH_COMMON_KEY }}

0 commit comments

Comments
 (0)