From db3cdd470de86bb25ebf9c84a3f03d9370dcfaad Mon Sep 17 00:00:00 2001 From: Thomas Bonnefille Date: Wed, 1 Nov 2023 23:41:35 +0100 Subject: [PATCH] Add ROS2 Workflow Signed-off-by: Thomas Bonnefille --- .github/workflows/compilation_verif.yml | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/compilation_verif.yml diff --git a/.github/workflows/compilation_verif.yml b/.github/workflows/compilation_verif.yml new file mode 100644 index 0000000..d05850d --- /dev/null +++ b/.github/workflows/compilation_verif.yml @@ -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/src ../../ROS2_test_dir/ + rm -rf ../../ROS2_test_dir/src/$(ls ..) + cp -r ../$(ls ..) ../../ROS2_test_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/src && \ + cp -r ../ROS2_test_dir/src ../ROS2_staged_dir/