Skip to content

Commit

Permalink
Fix binary and source builds
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Dec 6, 2023
1 parent 74dfd1f commit 65a3cc7
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 52 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-iron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 iron
on:
pull_request:
push:
branches:
- ros2-master
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '28 6 * * *'

jobs:
binary:
name: binary build
runs-on: ubuntu-latest
strategy:
matrix:
env:
- {ROS_DISTRO: iron, ROS_REPO: main}
- {ROS_DISTRO: iron, ROS_REPO: testing}
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
steps:
- uses: actions/checkout@v4
# The target directory cache doesn't include the source directory because
# that comes from the checkout. See "prepare target_ws for cache" task below
- name: cache target_ws
if: ${{ ! matrix.env.CCOV }}
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
- name: cache ccache
uses: pat-s/[email protected]
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
- name: prepare target_ws for cache
if: ${{ always() && ! matrix.env.CCOV }}
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws
30 changes: 0 additions & 30 deletions .github/workflows/build-source-rollling.yml

This file was deleted.

29 changes: 8 additions & 21 deletions .github/workflows/build-source_humble.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
name: Build Source humble
name: Rolling Source Build
on:
workflow_dispatch:
push:
branches:
- ros2-master
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '28 3 * * *'
- cron: '03 3 * * *'

jobs:
source:
name: source build
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
with:
vcs-repo-file-url: |
https://raw.githubusercontent.com/ros-controls/control_toolbox/ros2-master/control_toolbox.repos
https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
package-name: control_toolbox
colcon-mixin-name: coverage-gcc
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
target-ros2-distro: humble
- uses: actions/upload-artifact@v3
with:
name: colcon-logs-${{ matrix.os }}
path: ros_ws/log
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
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
2 changes: 1 addition & 1 deletion control_toolbox.repos → control_toolbox.humble.repos
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ repositories:
control_msgs:
type: git
url: https://github.com/ros-controls/control_msgs.git
version: foxy-devel
version: humble
realtime_tools:
type: git
url: https://github.com/ros-controls/realtime_tools
Expand Down
9 changes: 9 additions & 0 deletions control_toolbox.iron.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
control_msgs:
type: git
url: https://github.com/ros-controls/control_msgs.git
version: master
realtime_tools:
type: git
url: https://github.com/ros-controls/realtime_tools
version: master
9 changes: 9 additions & 0 deletions control_toolbox.rolling.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
control_msgs:
type: git
url: https://github.com/ros-controls/control_msgs.git
version: master
realtime_tools:
type: git
url: https://github.com/ros-controls/realtime_tools
version: master

0 comments on commit 65a3cc7

Please sign in to comment.