From 8c04fee2f2223a0f2296542a1065b2a58dba6ffe Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:34:06 +0200 Subject: [PATCH] Add multithread to CI (#238) (#240) * Add multithread to CI Signed-off-by: Pablo Garrido * Fix multithread example * Override esp_macros fro micro-ROS build --------- Signed-off-by: Pablo Garrido (cherry picked from commit 8d6b8d49ff8f106f14df2a5641ae08dbfae8c9aa) Co-authored-by: Pablo Garrido --- .github/workflows/ci.yml | 11 +++++++++++ .github/workflows/nightly.yml | 19 +++++++++++++++++++ include_override/FreeRTOS.h | 2 ++ include_override/esp_macros.h | 1 + include_override/semphr.h | 2 ++ 5 files changed, 35 insertions(+) create mode 100644 include_override/FreeRTOS.h create mode 100644 include_override/esp_macros.h create mode 100644 include_override/semphr.h diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55d97344..f0ad7a12 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,6 +80,17 @@ jobs: idf.py set-target ${{ matrix.idf_target }} idf.py build + - name: Build sample - multithread_publisher + shell: bash + run: | + . $IDF_PATH/export.sh + cd micro_ros_espidf_component + make -f libmicroros.mk clean + sed -i 's/DRMW_UXRCE_TRANSPORT=udp/DRMW_UXRCE_TRANSPORT=custom/' colcon.meta + cd examples/multithread_publisher + idf.py set-target ${{ matrix.idf_target }} + idf.py build + - name: EmbeddedRTPS shell: bash run: | diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5216c43d..4cd2dd2a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -65,6 +65,14 @@ jobs: idf.py set-target ${{ matrix.idf_target }} idf.py build + - name: Build sample - handle_static_types + shell: bash + run: | + . $IDF_PATH/export.sh + cd micro_ros_espidf_component/examples/handle_static_types + idf.py set-target ${{ matrix.idf_target }} + idf.py build + - name: Build sample - int32_publisher_custom_transport shell: bash run: | @@ -76,6 +84,17 @@ jobs: idf.py set-target ${{ matrix.idf_target }} idf.py build + - name: Build sample - multithread_publisher + shell: bash + run: | + . $IDF_PATH/export.sh + cd micro_ros_espidf_component + make -f libmicroros.mk clean + sed -i 's/DRMW_UXRCE_TRANSPORT=udp/DRMW_UXRCE_TRANSPORT=custom/' colcon.meta + cd examples/multithread_publisher + idf.py set-target ${{ matrix.idf_target }} + idf.py build + - name: EmbeddedRTPS if: ${{ matrix.branch == 'humble' }} shell: bash diff --git a/include_override/FreeRTOS.h b/include_override/FreeRTOS.h new file mode 100644 index 00000000..3e5f338e --- /dev/null +++ b/include_override/FreeRTOS.h @@ -0,0 +1,2 @@ +// Include proper path to FreeRTOS header file +#include "freertos/FreeRTOS.h" diff --git a/include_override/esp_macros.h b/include_override/esp_macros.h new file mode 100644 index 00000000..cc75b5d9 --- /dev/null +++ b/include_override/esp_macros.h @@ -0,0 +1 @@ +// This is very overkill, but it's a workaround for the fact that the ESP_STATIC_ASSERT fails when building micro-ROS in IDF >v5.0.0 diff --git a/include_override/semphr.h b/include_override/semphr.h new file mode 100644 index 00000000..4ed09675 --- /dev/null +++ b/include_override/semphr.h @@ -0,0 +1,2 @@ +// Include proper path to FreeRTOS header file +#include "freertos/semphr.h" \ No newline at end of file