Skip to content

Example of ROS 2 package configured with Github Actions enabled

License

Notifications You must be signed in to change notification settings

ros-tooling/action-ros-ci-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ROS 2 GitHub Action CI Template

Use this template to create a ROS 2 package repository with automatic CI.

Waiting for a buildfarmer to kickoff a build for your PR is time consuming. With this action, you can immediately get linting and tests feedback. Minimize the number of builds you need to kickoff and catch bugs earlier!

For more information on using GitHub action workflows, see the Official GitHub Workflow Documentation.

Usage

Click on the green Use this Template to create your new repository.

Linting

This action supports the linters in the ament/ament_lint repo. Linter names are based off of ament's naming convention ament_<linter-name>. For example, to use ament_uncrustify, set uncrustify as your linter.

An example job for copyright linting.

ament_copyright:
  name: ament_copyright
  runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: ros-tooling/setup-ros@v0.6
    - uses: ros-tooling/action-ros-lint@v0.1
      with:
        linter: copyright
        package-name: <your-package-name>

For multiple linters, use a matrix:

# Linters applicable to C++ packages
ament_lint_cpp:
  # Give each job a different name for better feedback
  name: ament_${{ matrix.linter }}
  runs-on: ubuntu-latest
  strategy:
    # We want all linters to run even if one fails
    fail-fast: false
    matrix:
      linter: [cppcheck, cpplint, uncrustify]
    steps:
    - uses: actions/checkout@v3
    - uses: ros-tooling/setup-ros@v0.6
    - uses: ros-tooling/action-ros-lint@v0.1
      with:
        linter: ${{ matrix.linter }}
        package-name: <your-package-name>

See .github/workflows/lint.yml for an example linting workflow.

Note: The only unsupported linter at this time is CMake.

About

Example of ROS 2 package configured with Github Actions enabled

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •