Skip to content

Update build.yml

Update build.yml #4

Workflow file for this run

name: Build ROS2
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: 0 0 * * *
release:
types: [published]
jobs:
build_ros2:
strategy:
matrix:
rosdistro: [ humble ]
runs-on: ubuntu-latest
continue-on-error: true
container:
# There don't seem to be ROS perception docker images for ros2 yet, so we
# use the base imageand install the rest of the dependencies using rosdep
# each time.
image: ros:${{ matrix.rosdistro }}-ros-base
steps:
- uses: actions/checkout@v2
with:
path: src/tb3_behavior_tree
# - name: Install dependencies
# run: rosdep update --include-eol-distros && apt-get update && rosdep install --from-path . -i -y --rosdistro ${{ matrix.rosdistro }}
- name: Build tests
id: build_test
run: . /opt/ros/${{ matrix.rosdistro }}/setup.sh && colcon build --event-handlers console_cohesion+
continue-on-error: true
- name: build_test command success
if: steps.build_test.outcome == 'success'
run: echo "result - success"
- name: build_test command failure
if: steps.build_test.outcome == 'failure'
run: echo "result - failure" && exit 1
check_status:
needs: build_ros2
if: ${{ needs.build_ros2.outcome != 'success' }}
runs-on: ubuntu-latest
steps:
- name: Set Workflow Status to Failure
run: exit 1