From 086e3fe5aba2b5ea287ee72d17c114a10cf65850 Mon Sep 17 00:00:00 2001 From: JulienThevenoz Date: Wed, 10 Jan 2024 10:53:32 +0100 Subject: [PATCH] modified workflow for sim. Not sure if it works --- .github/workflows/systemtests.yml | 68 +++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/.github/workflows/systemtests.yml b/.github/workflows/systemtests.yml index 045b64049..03a1e35b6 100644 --- a/.github/workflows/systemtests.yml +++ b/.github/workflows/systemtests.yml @@ -1,8 +1,62 @@ name: System Tests + +#run the simulation tests for every push to main on: push: - branches: [ "feature-systemtests-better" ] + branches: [ "main" ] + # manual trigger + workflow_dispatch: + +jobs: + build: + runs-on: self-hosted + steps: + - name: Create workspace + id: step1 + run: | + cd ros2_ws/src || mkdir -p ros2_ws/src + - name: Checkout motion capture package + id: step2 + run: | + cd ros2_ws/src + ls motion_capture_tracking || git clone --branch ros2 --recursive https://github.com/IMRCLab/motion_capture_tracking.git + - name: Checkout Crazyswarm2 + id: step3 + uses: actions/checkout@v4 + with: + path: ros2_ws/src/crazyswarm2 + submodules: 'recursive' + - name: Build workspace + id: step4 + run: | + source /opt/ros/humble/setup.bash + cd ros2_ws + colcon build --symlink-install + + - name: Flight test + id: step5 + run: | + cd ros2_ws + source /opt/ros/humble/setup.bash + . install/local_setup.bash + export ROS_LOCALHOST_ONLY=1 + python3 src/crazyswarm2/systemtests/test_flights_sim.py + + - name: Upload files + id: step6 + if: '!cancelled()' + uses: actions/upload-artifact@v3 + with: + name: pdf_rosbags_and_logs + path: | + ros2_ws/results + + +#run the physical tests only manually or on push from feature-systemtests-downloadUSD +on: + push: + branches: [ "feature-systemtests-downloadUSD" ] # manual trigger workflow_dispatch: @@ -54,15 +108,3 @@ jobs: - - # - name: build and test ROS 2 - # uses: ros-tooling/action-ros-ci@v0.3 - # with: - # package-name: | - # crazyflie - # crazyflie_examples - # crazyflie_interfaces - # crazyflie_py - # crazyflie_sim - # target-ros2-distro: humble - # vcs-repo-file-url: rosinstall \ No newline at end of file