Skip to content

Commit

Permalink
[CI] Touchups (#166)
Browse files Browse the repository at this point in the history
* Remove EOL workflows

* Update readme

* Fix coverage builds

* Rename file

* Fix ubuntu version in lint workflow

* Remove cppcheck duplicate

* Fix binary and source builds

* Exclude test folder from codecov stats
  • Loading branch information
christophfroehlich authored Dec 11, 2023
1 parent 6efef0b commit e8946ad
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 120 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
name: Build Source
name: Coverage Build - Rolling
on:
workflow_dispatch:
push:
branches:
- ros2-master
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '28 3 * * *'
pull_request:
branches:
- ros2-master

jobs:
source:
name: source build
runs-on: ubuntu-20.04
coverage:
name: coverage build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
env:
ROS_DISTRO: rolling
steps:
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: rolling
# build all packages listed in the meta package
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: actions/checkout@v4
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{ env.ROS_DISTRO }}
import-token: ${{ secrets.GITHUB_TOKEN }}
# build all packages listed here
package-name:
control_toolbox

vcs-repo-file-url: |
https://raw.githubusercontent.com/ros-controls/control_toolbox/ros2-master/control_toolbox.repos
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/control_toolbox.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }}
colcon-defaults: |
{
"build": {
Expand All @@ -35,7 +43,7 @@ jobs:
file: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v3.1.3
with:
name: colcon-logs-${{ matrix.os }}
name: colcon-logs-coverage-rolling
path: ros_ws/log
49 changes: 49 additions & 0 deletions .github/workflows/build-coverage_humble.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Coverage Build - Humble
on:
workflow_dispatch:
push:
branches:
- ros2-master
pull_request:
branches:
- ros2-master

jobs:
coverage:
name: coverage build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
env:
ROS_DISTRO: humble
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: actions/checkout@v4
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{ env.ROS_DISTRO }}
import-token: ${{ secrets.GITHUB_TOKEN }}
# build all packages listed here
package-name:
control_toolbox

vcs-repo-file-url: |
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/control_toolbox.${{ 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/[email protected]
with:
file: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
- uses: actions/[email protected]
with:
name: colcon-logs-coverage-humble
path: ros_ws/log
49 changes: 49 additions & 0 deletions .github/workflows/build-coverage_iron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Coverage Build - Iron
on:
workflow_dispatch:
push:
branches:
- ros2-master
pull_request:
branches:
- ros2-master

jobs:
coverage:
name: coverage build
runs-on: ubuntu-22.04
strategy:
fail-fast: false
env:
ROS_DISTRO: iron
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: actions/checkout@v4
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{ env.ROS_DISTRO }}
import-token: ${{ secrets.GITHUB_TOKEN }}
# build all packages listed here
package-name:
control_toolbox

vcs-repo-file-url: |
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/control_toolbox.${{ 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/[email protected]
with:
file: ros_ws/lcov/total_coverage.info
flags: unittests
name: codecov-umbrella
- uses: actions/[email protected]
with:
name: colcon-logs-coverage-iron
path: ros_ws/log
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)

name: Build foxy
name: Build iron
on:
pull_request:
branches:
- foxy
push:
branches:
- foxy
- ros2-master
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '28 6 * * *'
Expand All @@ -20,8 +18,8 @@ jobs:
strategy:
matrix:
env:
- {ROS_DISTRO: foxy, ROS_REPO: main}
- {ROS_DISTRO: foxy, ROS_REPO: testing}
- {ROS_DISTRO: iron, ROS_REPO: main}
- {ROS_DISTRO: iron, ROS_REPO: testing}
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/build-source-foxy.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/build-source-rollling.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/build-source_humble.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Rolling Source Build
on:
workflow_dispatch:
push:
branches:
- ros2-master
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: ros2-master
ros2_repo_branch: humble
17 changes: 17 additions & 0 deletions .github/workflows/build-source_iron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Rolling Source Build
on:
workflow_dispatch:
push:
branches:
- ros2-master
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: iron
ref: ros2-master
ros2_repo_branch: iron
17 changes: 17 additions & 0 deletions .github/workflows/build-source_rollling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Rolling Source Build
on:
workflow_dispatch:
push:
branches:
- ros2-master
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: rolling
ref: master
ros2_repo_branch: rolling
30 changes: 0 additions & 30 deletions .github/workflows/build_source_humble.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/reusable-ros-tooling-source-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Reusable industrial_ci Workflow with Cache
# Reusable action to simplify dealing with ROS/ROS2 industrial_ci builds with cache
# author: Denis Štogl <[email protected]>

on:
workflow_call:
inputs:
ros_distro:
description: 'ROS2 distribution name'
required: true
type: string
ref:
description: 'Reference on which the repo should be checkout. Usually is this name of a branch or a tag.'
required: true
type: string
ros2_repo_branch:
description: 'Branch in the ros2/ros2 repozitory from which ".repos" should be used. Possible values: master (Rolling), humble.'
default: 'master'
required: false
type: string

jobs:
reusable_ros_tooling_source_build:
name: ${{ inputs.ros_distro }} ubuntu-22.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ inputs.ros_distro }}
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{ inputs.ros_distro }}
ref: ${{ inputs.ref }}
# build all packages listed in the meta package
package-name:
control_toolbox

vcs-repo-file-url: |
https://raw.githubusercontent.com/ros2/ros2/${{ inputs.ros2_repo_branch }}/ros2.repos
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/ros2_controllers.${{ inputs.ros_distro }}.repos?token=${{ secrets.GITHUB_TOKEN }}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- uses: actions/[email protected]
with:
name: colcon-logs-ubuntu-22.04
path: ros_ws/log
Loading

0 comments on commit e8946ad

Please sign in to comment.