Skip to content

Commit d2d6746

Browse files
authored
Add CI setup to the repository. (#8)
1 parent 85ff049 commit d2d6746

30 files changed

+726
-11
lines changed

.github/workflows/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
ROS2 Distro | Branch | Build status | Documentation | Released packages
3+
:---------: | :----: | :----------: | :-----------: | :---------------:
4+
**Rolling** | [`rolling`](https://github.com/ros-controls/kinematics_interface/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-main.yml?branch=master) <br /> [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-testing.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-main.yml?branch=master) <br /> [![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-testing.yml?branch=master) <br /> [![Rolling Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml?branch=master) | | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#rolling)
5+
**Humble** | [`humble`](https://github.com/ros-controls/kinematics_interface/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-main.yml?branch=master) <br /> [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-testing.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-main.yml?branch=master) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-testing.yml?branch=master) <br /> [![Humble Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml?branch=master) | | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#humble)
6+
7+
### Explanation of different build types
8+
9+
**NOTE**: There are three build stages checking current and future compatibility of the package.
10+
11+
[Detailed build status](.github/workflows/README.md)
12+
13+
1. Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
14+
15+
Uses repos file: `$NAME$-not-released.<ros-distro>.repos`
16+
17+
1. Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source.
18+
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.
19+
20+
Uses repos file: `$NAME$.repos`
21+
22+
1. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
kinematics_interface_kdl
30+
kinematics_interface
31+
32+
vcs-repo-file-url: |
33+
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/kinematics_interface-not-released.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }}
34+
colcon-defaults: |
35+
{
36+
"build": {
37+
"mixin": ["coverage-gcc"]
38+
}
39+
}
40+
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
41+
- uses: codecov/[email protected]
42+
with:
43+
file: ros_ws/lcov/total_coverage.info
44+
flags: unittests
45+
name: codecov-umbrella
46+
- uses: actions/[email protected]
47+
with:
48+
name: colcon-logs-coverage-rolling
49+
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

+41
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+
kinematics_interface_kdl
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+
kinematics_interface_kdl
41+
kinematics_interface
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,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+
- 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: kinematics_interface-not-released.humble.repos
26+
ref_for_scheduled_build: master
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+
- 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: testing
25+
upstream_workspace: kinematics_interface-not-released.humble.repos
26+
ref_for_scheduled_build: master
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Humble 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+
humble_rhel_binary:
19+
name: Humble RHEL binary build
20+
runs-on: ubuntu-latest
21+
env:
22+
ROS_DISTRO: humble
23+
container: jaronl/ros:humble-alma
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
path: src/kinematics_interface
28+
- run: |
29+
rosdep update
30+
rosdep install -iy --from-path src/kinematics_interface
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,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+
- 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: humble
23+
ros_repo: main
24+
upstream_workspace: kinematics_interface.humble.repos
25+
ref_for_scheduled_build: master
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Humble 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: humble
23+
ros_repo: testing
24+
upstream_workspace: kinematics_interface.humble.repos
25+
ref_for_scheduled_build: master
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Humble Source Build
2+
on:
3+
workflow_dispatch:
4+
branches:
5+
- master
6+
push:
7+
branches:
8+
- master
9+
schedule:
10+
# Run every day to detect flakiness and broken dependencies
11+
- cron: '03 3 * * *'
12+
13+
jobs:
14+
source:
15+
uses: ./.github/workflows/reusable-ros-tooling-source-build.yml
16+
with:
17+
ros_distro: humble
18+
ref: master
19+
ros2_repo_branch: master-humble
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Pre-Release Check
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ros_distro:
7+
description: 'Chose ROS distribution'
8+
required: true
9+
default: 'rolling'
10+
type: choice
11+
options:
12+
- foxy
13+
- galactic
14+
- humble
15+
- rolling
16+
branch:
17+
description: 'Chose branch for distro'
18+
required: true
19+
default: 'master'
20+
type: choice
21+
options:
22+
- foxy
23+
- galactic
24+
- humble
25+
- master
26+
27+
jobs:
28+
pre_release:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
ref: ${{ github.event.inputs.branch }}
34+
- name: industrial_ci
35+
uses: ros-industrial/industrial_ci@master
36+
env:
37+
ROS_DISTRO: ${{ github.event.inputs.ros_distro }}
38+
PRERELEASE: true
39+
BASEDIR: ${{ github.workspace }}/.work

0 commit comments

Comments
 (0)