From 870813bc335f5d4a7af12b01337d711a030b25ba Mon Sep 17 00:00:00 2001 From: MrBearing Date: Tue, 24 Sep 2024 13:38:57 +0900 Subject: [PATCH] update --- .github/workflows/ci_humble_string.yaml | 32 +++++++++++++------ .../Filelists.cmake | 0 .../app.cpp | 0 .../templates.hpp | 0 4 files changed, 23 insertions(+), 9 deletions(-) rename workspace/{test_echoreply_string => test_echoback_string}/Filelists.cmake (100%) rename workspace/{test_echoreply_string => test_echoback_string}/app.cpp (100%) rename workspace/{test_echoreply_string => test_echoback_string}/templates.hpp (100%) diff --git a/.github/workflows/ci_humble_string.yaml b/.github/workflows/ci_humble_string.yaml index 0f4978c..01dc38b 100644 --- a/.github/workflows/ci_humble_string.yaml +++ b/.github/workflows/ci_humble_string.yaml @@ -54,14 +54,28 @@ jobs: cd ws_host/ source /opt/ros/humble/setup.bash colcon build --packages-select mros2_echoreply_string - - name: Run mROS + - name: Run mROS and Native ROS shell: bash run : | - ./cmake_build/mros2-posix & - - name: Run Native ROS - shell: bash - run : | - cd ws_host/ - source /opt/ros/humble/setup.bash - source install/setup.bash - ros2 run mros2_echoreply_string echoreply_node \ No newline at end of file + ./cmake_build/mros2-posix & + mros_pid=$! # mROSのプロセスIDを取得 + + # Native ROSをバックグラウンドで実行 + cd ws_host/ + source /opt/ros/humble/setup.bash + source install/setup.bash + ros2 run mros2_echoreply_string echoreply_node & + native_ros_pid=$! # Native ROSのプロセスIDを取得 + + # mROSが終了するまで待つ + wait $mros_pid + mros_status=$? + + # 結果に基づいてCIの成否を判断 + if [ $mros_status -eq 0 ] ;then + echo "Both mROS and Native ROS completed successfully." + exit 0 + else + echo "One or both processes failed." + exit 1 + fi diff --git a/workspace/test_echoreply_string/Filelists.cmake b/workspace/test_echoback_string/Filelists.cmake similarity index 100% rename from workspace/test_echoreply_string/Filelists.cmake rename to workspace/test_echoback_string/Filelists.cmake diff --git a/workspace/test_echoreply_string/app.cpp b/workspace/test_echoback_string/app.cpp similarity index 100% rename from workspace/test_echoreply_string/app.cpp rename to workspace/test_echoback_string/app.cpp diff --git a/workspace/test_echoreply_string/templates.hpp b/workspace/test_echoback_string/templates.hpp similarity index 100% rename from workspace/test_echoreply_string/templates.hpp rename to workspace/test_echoback_string/templates.hpp