Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/build workspace in pipeline #192

Open
wants to merge 9 commits into
base: development
Choose a base branch
from
51 changes: 51 additions & 0 deletions .github/workflows/build-workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build ROS 2 Package

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup ROS 2
uses: ros-tooling/[email protected]
with:
required-ros-distributions: humble

- name: Clone vortex-msgs
run: |
git clone https://github.com/vortexntnu/vortex-msgs.git

- name: Create workspace
run: |
mkdir -p ~/ros2_ws/src
cp -R $GITHUB_WORKSPACE ~/ros2_ws/src/
cp -R vortex-msgs ~/ros2_ws/src/

- name: Install dependencies
run: |
cd ~/ros2_ws
rosdep update
rosdep install --from-paths src --ignore-src -r -y

- name: Build with colcon
run: |
cd ~/ros2_ws
. /opt/ros/humble/setup.sh
colcon build --symlink-install

- name: Run tests
run: |
cd ~/ros2_ws
. /opt/ros/humble/setup.sh
colcon test
colcon test-result --verbose
Loading