-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
29 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,11 @@ | ||
name: ROS 2 Workspace Build | ||
description: Build packages in a ROS 2 workspace | ||
runs: | ||
using: composite | ||
steps: | ||
- shell: bash | ||
run: | | ||
source install/setup.bash | ||
colcon build --event-handlers console_cohesion+ --cmake-args | ||
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,31 @@ | ||
name: ROS 2 Workspace Setup | ||
description: Setup tools and dependencies for a ROS 2 workspace | ||
inputs: | ||
distro: | ||
description: The ROS 2 distribution to be used | ||
default: iron | ||
runs: | ||
using: composite | ||
steps: | ||
- shell: bash | ||
run: | | ||
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list | ||
- shell: bash | ||
run: | | ||
sudo apt update | ||
sudo apt install -y python3-colcon-common-extensions python3-rosdep | ||
- shell: bash | ||
run: | | ||
sudo rosdep init | ||
rosdep update | ||
rosdep install -y --rosdistro ${{ inputs.distro }} --from-paths . --ignore-src | ||
- shell: bash | ||
run: | | ||
source /opt/ros/${{ inputs.distro }}/setup.bash | ||
colcon build --packages-skip-regex '.*' | ||
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 |
---|---|---|
@@ -1,29 +1,9 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: pip install mkdocs-material | ||
- run: mkdocs gh-deploy --force | ||
name: ROS 2 Workspace Test | ||
description: Test packages in a ROS 2 workspace | ||
runs: | ||
using: composite | ||
steps: | ||
- shell: bash | ||
run: | | ||
source install/setup.bash | ||
colcon test --event-handlers console_cohesion+ --pytest-with-coverage --return-code-on-test-failure |
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,28 @@ | ||
# This YAML file is a GitHub Actions workflow configuration for running tests on a ROS 2 | ||
name: ros2 colcon tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ros-tooling/setup-ros@latest | ||
with: | ||
version: humble | ||
- name: Colcon Test | ||
run: | | ||
source /opt/ros/humble/setup.bash | ||
colcon test --event-handlers console_cohesion+ --result-base result | ||
colcon test-result --verbose --result-base result | ||
- name: Upload Test Results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-results | ||
path: result | ||
|
||
|