Update dockerfile to ROS 2 (#34) #1
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
--- | |
name: Build Test | |
on: | |
push: | |
branches: | |
- 'ros2' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build: | |
runs-on: [ubuntu-22.04] | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {rosdistro: 'humble', container: 'osrf/ros:humble-desktop'} | |
container: ${{ matrix.config.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: src/ethz-asl/terrain-navigation | |
- name: Check out source dependencies with vcs | |
run: | | |
vcs import --recursive --debug --shallow --skip-existing < ethz-asl/terrain-navigation/terrain-navigation.repos | |
shell: bash | |
working-directory: src | |
- name: Install binary dependencies with rosdep | |
run: | | |
apt update | |
rosdep update | |
source /opt/ros/humble/setup.bash | |
rosdep install --from-paths src --ignore-src -y --rosdistro ${{matrix.config.rosdistro}} | |
shell: bash | |
- name: Build with colcon | |
run: | | |
source /opt/ros/humble/setup.bash | |
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to terrain_navigation_ros | |
shell: bash | |
- name: Run tests | |
run: | | |
source /opt/ros/humble/setup.bash | |
colcon test --paths src/ethz-asl/terrain-navigation --event-handlers=console_cohesion+ | |
colcon test-result --all --verbose | |
shell: bash |