Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ROS2 CI to test with humble, iron and rolling. #247

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 30 additions & 21 deletions .github/workflows/ros2.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
name: ROS2 CI
on:

on: # this determines when this workflow is run
knorth55 marked this conversation as resolved.
Show resolved Hide resolved
push:
branches:
- ros2
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: # allow manually starting this workflow
knorth55 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
industrial_ci:
strategy:
matrix:
env:
- ROS_DISTRO: foxy
ROS_REPO: testing
CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Debug'
- ROS_DISTRO: foxy
ROS_REPO: testing
CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Release'
- ROS_DISTRO: galactic
ROS_REPO: testing
CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Debug'
- ROS_DISTRO: galactic
ROS_REPO: testing
CMAKE_ARGS: '-DCMAKE_BUILD_TYPE=Release'
knorth55 marked this conversation as resolved.
Show resolved Hide resolved
name: ROS ${{ matrix.ROS_DISTRO }} (${{ matrix.ROS_REPO }})
runs-on: ubuntu-latest
strategy:
# fail-fast: false # uncomment if failing jobs should not cancel the others immediately
matrix: # matrix is the product of entries
ROS_DISTRO: [humble, iron, rolling]
ROS_REPO: [testing, main]
env:
CCACHE_DIR: "${{ github.workspace }}/.ccache" # directory for ccache (and how we enable ccache in industrial_ci)
steps:
- uses: actions/checkout@v1
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}
- uses: actions/checkout@v3 # clone target repository
- uses: actions/cache@v2 # fetch/store the directory used by ccache before/after the ci run
knorth55 marked this conversation as resolved.
Show resolved Hide resolved
with:
path: ${{ env.CCACHE_DIR }}
# This configuration will always create a new ccache cache starting off from the previous one (if any).
# In this simple version it will be shared between all builds of the same ROS_REPO and ROS_REPO
# and might need some fine-tuning to match the use case
key: ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-${{github.run_id}}
restore-keys: |
ccache-${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}-
- uses: 'ros-industrial/industrial_ci@master' # run industrial_ci
env: # either pass all entries explicitly
ROS_DISTRO: ${{ matrix.ROS_DISTRO }}
ROS_REPO: ${{ matrix.ROS_REPO }}
# with: # or pass the full matrix as config
# config: ${{toJSON(matrix)}}
knorth55 marked this conversation as resolved.
Show resolved Hide resolved