-
Notifications
You must be signed in to change notification settings - Fork 806
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #430 from Ryanf55/add-gh-actions
Add Github actions for colcon build
- Loading branch information
Showing
2 changed files
with
49 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,49 @@ | ||
name: Colcon Build Test | ||
on: | ||
push: | ||
branches: | ||
- 'rolling' | ||
- 'iron' | ||
- 'humble' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
build-test: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {rosdistro: 'rolling', container: 'ros:rolling'} | ||
container: ${{ matrix.config.container }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: src/grid_map | ||
- name: Pull in repos with vcs | ||
run: | | ||
apt-get update | ||
vcs import --shallow --skip-existing --input grid_map/tools/ros2_dependencies.repos | ||
shell: bash | ||
working-directory: src | ||
- name: Install Dependencies with Rosdep | ||
run: | | ||
apt update | ||
rosdep update | ||
source /opt/ros/${{matrix.config.rosdistro}}/setup.bash | ||
rosdep install --from-paths src --ignore-src -y --skip-keys "slam_toolbox turtlebot3_gazebo gazebo_ros_pkgs" | ||
shell: bash | ||
- name: Colcon Build (Release) | ||
run: | | ||
source /opt/ros/${{matrix.config.rosdistro}}/setup.bash | ||
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to grid_map | ||
shell: bash | ||
- name: Test | ||
run: | | ||
source /opt/ros/${{matrix.config.rosdistro}}/setup.bash | ||
source install/setup.bash | ||
colcon test --return-code-on-test-failure --paths src/grid_map/* --event-handlers=console_cohesion+ | ||
colcon test-result --all --verbose | ||
shell: bash | ||
|