Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: 1
steps:
- uses: actions/checkout@v1
- uses: ros-tooling/setup-ros@master
- uses: ros-tooling/setup-ros@0.7.15
with:
required-ros-distributions: ${{ matrix.distro }}
- uses: ros-tooling/action-ros-lint@master
Expand Down
74 changes: 70 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,40 @@ on:
- cron: "0 20 * * 0"

jobs:
ros_distro_from_branch_name:
runs-on: ubuntu-latest
outputs:
distro: ${{ steps.set-distro.outputs.distro }}
steps:
- name: Set ROS distro from branch name
id: set-distro
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "This is a PR. Getting branch name from base ref."
branch_name="${{ github.event.pull_request.base.ref }}"
else
echo "This is a push. Getting branch name from head ref."
branch_name="${{ github.head_ref }}"
fi
echo "> Branch name is: ${branch_name}"

if [[ "${branch_name}" == *"ros2"* ]]; then
distro="rolling"
elif [[ "${branch_name}" == *"ros2-humble"* ]]; then
distro="humble"
elif [[ "${branch_name}" == *"ros2-jazzy"* ]]; then
distro="jazzy"
elif [[ "${branch_name}" == *"ros2-kilted"* ]]; then
distro="kilted"
else
echo "! Unknown branch for determining ROS distro: ${GITHUB_REF##*/}"
exit 1
fi
echo "> Determined ROS distro to be: ${distro}!"
echo "distro=$distro" >> $GITHUB_OUTPUT
build_and_test:
name: ${{ matrix.package }} on ${{ matrix.distro }}
name: ${{ matrix.package }} under ${{ matrix.distro }}
needs: ros_distro_from_branch_name
strategy:
fail-fast: false
matrix:
Expand All @@ -22,17 +54,51 @@ jobs:
self_test,
]
include:
- distro: rolling
- distro: ${{ needs.ros_distro_from_branch_name.outputs.distro }}
os: 24.04
runs-on: ubuntu-latest
container: ubuntu:${{ matrix.os }}
steps:
- uses: ros-tooling/setup-ros@master
- uses: ros-tooling/setup-ros@0.7.15
with:
required-ros-distributions: ${{ matrix.distro }}
- uses: ros-tooling/action-ros-ci@master
- uses: ros-tooling/action-ros-ci@0.4.5
with:
target-ros2-distro: ${{ matrix.distro }}
package-name: ${{ matrix.package }}
# vcs-repo-file-url: |
# https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
build_and_test_win:
name: ${{ matrix.package }} under ${{ matrix.distro }} (windows)
needs: ros_distro_from_branch_name
strategy:
fail-fast: false
matrix:
package: [
diagnostic_aggregator,
diagnostic_common_diagnostics,
diagnostic_remote_logging,
diagnostic_updater,
self_test,
]
include:
- distro: ${{ needs.ros_distro_from_branch_name.outputs.distro }}
runs-on: windows-2022
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.distro }}
- name: Upgrade colcon-meson
# Workaround for "Exception in package identification extension 'meson' in 'src\ohkszihoidm': __init__() missing 2 required positional arguments: 'subproject_dir' and 'env'"
run: python -m pip install -U colcon-meson==0.5.0
- name: Install package dependencies
run: |
rosdep update
rosdep install ${{ matrix.package }} -r -y
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{ matrix.distro }}
package-name: ${{ matrix.package }}
# vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/${{ matrix.distro }}/ros2.repos
# All of this is quite unstable, atm:
# continue-on-error: true
Loading