Skip to content

Commit

Permalink
Add workflow for ROS2
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@outlook.com>
  • Loading branch information
Taumille committed Oct 20, 2023
1 parent 3868370 commit da70d03
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/compilation_verif.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Compile ROS2

run-name: ${{ github.actor }} try to compile ROS2 for ${{ github.repository }}

on: [push]
jobs:
Build_packages:
runs-on: ros
steps:
- run: echo "Checking out the repository"
- uses: actions/checkout@v4
- name: Removing old files...
run: |
rm -rf ../../ROS2_test_dir/*
- name: Copy files...
run: |
cp -r ../../ROS2_staged_dir/* ../../ROS2_test_dir
rm -rf ../../ROS2_test_dir/src/$(ls ..)
cp -r ../$(ls ..) ../../ROS2_staged_dir/src
- name: Compile...
run: |
REPO_NAME=$(ls ..)
source /opt/ros/humble/setup.sh
cd ../../ROS2_test_dir/
colcon build --packages-up-to $REPO_NAME && \
rm -rf ../ROS2_staged_dir && \
cp -r ../ROS2_test_dir ../ROS2_staged_dir

0 comments on commit da70d03

Please sign in to comment.