Skip to content

Commit

Permalink
Create build-workspace.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstrom authored Jul 15, 2024
1 parent 539deef commit 6c14bea
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build ROS 2 Package

on:
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

0 comments on commit 6c14bea

Please sign in to comment.