GitHub Action
ROS 2 Workspace Action
The ROS 2 Workspace Action is a GitHub Action designed to setup, build and test a ROS 2 workspace containing multiple packages. This action automatically sets up ROS 2 and other dependencies used in each package, and then proceeds to build and test them all using colcon.
The ROS 2 Workspace Action offers the following key features:
- Automated ROS 2 Distribution Setup: Automatically sets up a specified ROS 2 distribution.
- Dependency Management: Automatically installs dependencies required for each package.
- Efficient Building and Testing: Utilizes colcon for streamlined building and testing of each package.
To get started with the ROS 2 Workspace Action, you can refer to the action.yaml file for detailed configuration options. Additionally, if you are new to GitHub Actions, you can explore the GitHub Actions guide for a comprehensive overview.
Here are the available input parameters for the ROS 2 Workspace Action:
Name | Default | Description |
---|---|---|
distro |
iron |
Specify the distribution of ROS 2 to be set up using this action. You can refer to the ROS 2 Distributions for information about the available distributions to be used. |
Here is the basic example of how to use the ROS 2 Workspace Action to build and test a ROS 2 workspace in your GitHub Actions workflow:
name: ROS 2 CI
on:
push:
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
path: workspace
- name: Build and test workspace
uses: ichiro-its/[email protected]
It is recommended not to checkout the repository in the root directory. Otherwise, tests may fail because the package's files could be mixed with the build result.
You can specify the ROS 2 distribution to be used by providing it as an input parameter:
- name: Build and test workspace
uses: ichiro-its/[email protected]
with:
distro: rolling
You can use the setup
, build
, and test
sub-actions to run each action individually for the setup, build, and test steps:
- name: Setup workspace
uses: ichiro-its/ros2-ws-action/[email protected]
- name: Build workspace
uses: ichiro-its/ros2-ws-action/[email protected]
- name: Test workspace
uses: ichiro-its/ros2-ws-action/[email protected]
This project is licensed under the terms of the MIT License.
Copyright © 2021-2023 ICHIRO ITS