-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test reusable workflow with composite action
- Loading branch information
1 parent
f6f71e0
commit 4b16e49
Showing
4 changed files
with
141 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Set package list' | ||
description: 'Set the package_list environment variable' | ||
inputs: | ||
path: | ||
description: 'Path to the packages' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- run: | | ||
echo "package_list=$(colcon list --paths ${{ inputs.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ inputs.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_ENV | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: ROS 2 Lint | ||
on: | ||
pull_request: | ||
|
||
env: | ||
package-name: | ||
control_toolbox | ||
|
||
jobs: | ||
lint_rolling: | ||
uses: ./.github/workflows/reusable-ci-ros-lint.yml | ||
with: | ||
ros_distro: rolling | ||
# lint: | ||
# uses: ./.github/workflows/reusable-ci-ros-lint.yml | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# ROS_DISTRO: [iron, humble] | ||
# with: | ||
# ros_distro: ${{ matrix.ROS_DISTRO }} | ||
# # use the release specified in REP-2000 | ||
# os_name: ubuntu-22.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: Reusable ROS 2 Lint workflow | ||
# Reusable action to simplify dealing with ros-linting | ||
# author: Christoph Froehlich <[email protected]> | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
ros_distro: | ||
description: 'ROS2 distribution name' | ||
required: true | ||
type: string | ||
os_name: | ||
description: 'On which OS to run the linter' | ||
required: false | ||
default: 'ubuntu-latest' | ||
type: string | ||
|
||
env: | ||
# this will be src/{repo-owner}/{repo-name} | ||
path: src/${{ github.repository }} | ||
|
||
jobs: | ||
ament_lint: | ||
name: ament_${{ matrix.linter }} | ||
runs-on: ${{ inputs.os_name }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [copyright] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: ${{ env.path }} | ||
- uses: ros-tooling/[email protected] | ||
- name: Set package list | ||
uses: ./.github/actions/set-package-list | ||
with: | ||
path: ${{ env.path }} | ||
- uses: ros-tooling/[email protected] | ||
with: | ||
distribution: ${{ inputs.ros_distro }} | ||
linter: ${{ matrix.linter }} | ||
package-name: ${{ env.package_list }} | ||
|
||
# ament_lint: | ||
# name: ament_${{ matrix.linter }} | ||
# runs-on: ${{ inputs.os_name }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# linter: [copyright, lint_cmake] | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# path: ${{ env.path }} | ||
# - uses: ros-tooling/[email protected] | ||
# - name: Get list of packages | ||
# # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time | ||
# run: | | ||
# echo "package_list=$(colcon list --paths ${{ env.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ env.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_ENV | ||
# - uses: ros-tooling/[email protected] | ||
# with: | ||
# distribution: ${{ inputs.ros_distro }} | ||
# linter: ${{ matrix.linter }} | ||
# package-name: ${{ env.package_list }} | ||
|
||
# ament_lint_100: | ||
# name: ament_cpplint | ||
# runs-on: ${{ inputs.os_name }} | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# path: ${{ env.path }} | ||
# - uses: ros-tooling/[email protected] | ||
# - name: Get list of packages | ||
# # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time | ||
# run: | | ||
# echo "package_list=$(colcon list --paths ${{ env.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ env.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_ENV | ||
# - uses: ros-tooling/[email protected] | ||
# with: | ||
# distribution: ${{ inputs.ros_distro }} | ||
# linter: cpplint | ||
# arguments: "--linelength=100 --filter=-whitespace/newline" | ||
# package-name: ${{ env.package_list }} | ||
|
||
# ament_cppcheck: | ||
# name: ament_cppcheck | ||
# runs-on: ${{ inputs.os_name }} | ||
# env: | ||
# AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# path: ${{ env.path }} | ||
# - uses: ros-tooling/[email protected] | ||
# - name: Get list of packages | ||
# # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time | ||
# run: | | ||
# echo "package_list=$(colcon list --paths ${{ env.path }} --names-only | tr '\n' ' ') $(colcon list --paths ${{ env.path }}/* --names-only | tr '\n' ' ')" >> $GITHUB_ENV | ||
# - uses: ros-tooling/[email protected] | ||
# with: | ||
# distribution: ${{ inputs.ros_distro }} | ||
# linter: cppcheck | ||
# arguments: "--language=c++" | ||
# package-name: ${{ env.package_list }} |
This file was deleted.
Oops, something went wrong.