From cbc2aa125f2c51ca13b697d85dec13de2c272b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Dom=C3=ADnguez=20L=C3=B3pez?= Date: Sun, 7 Jul 2024 23:12:32 +0200 Subject: [PATCH 1/7] Refs #21233: Run mac-ci only and buffer recover test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mario Domínguez López --- .github/workflows/mac-ci.yml | 2 +- .github/workflows/sanitizers-ci.yml | 77 ----------------------------- .github/workflows/ubuntu-ci.yml | 73 --------------------------- .github/workflows/windows-ci.yml | 51 ------------------- 4 files changed, 1 insertion(+), 202 deletions(-) delete mode 100644 .github/workflows/sanitizers-ci.yml delete mode 100644 .github/workflows/ubuntu-ci.yml delete mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/mac-ci.yml b/.github/workflows/mac-ci.yml index 21cf3f2652f..bac33c4651f 100644 --- a/.github/workflows/mac-ci.yml +++ b/.github/workflows/mac-ci.yml @@ -52,6 +52,6 @@ jobs: label: ${{ inputs.label || 'mac-ci' }} colcon-args: ${{ inputs.colcon-args }} cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' - ctest-args: ${{ inputs.ctest-args }} + ctest-args: ' -R buffer_recover ${{ inputs.ctest-args }}' fastdds-branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }} diff --git a/.github/workflows/sanitizers-ci.yml b/.github/workflows/sanitizers-ci.yml deleted file mode 100644 index e4ec25ec298..00000000000 --- a/.github/workflows/sanitizers-ci.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Fast DDS Sanitizers CI - -on: - workflow_dispatch: - inputs: - label: - description: 'ID associated to the workflow' - required: true - type: string - run_asan_fastdds: - description: 'Run Addess Sanitizer job for Fast DDS' - required: false - type: boolean - run_asan_discovery_server: - description: 'Run Addess Sanitizer job for Discovery Server' - required: false - type: boolean - run_tsan_fastdds: - description: 'Run Thread Sanitizer job for Fast DDS' - required: false - type: boolean - colcon_build_args: - description: 'Optional colcon build arguments' - required: false - type: string - colcon_test_args: - description: 'Optional colcon test arguments' - required: false - type: string - cmake_args: - description: 'Optional CMake Compilation Flags' - required: false - type: string - ctest_args: - description: 'Optional CTest Testing Flags' - required: false - type: string - fastdds_ref: - description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' - required: true - discovery_server_ref: - description: > - Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server) - Required only if the Discovery Server job is requested - required: false - - pull_request: - types: - - review_requested - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - sanitizers-ci: - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - uses: ./.github/workflows/reusable-sanitizers-ci.yml - with: - label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} - run_asan_fastdds: ${{ ((inputs.run_asan_fastdds == true) && true) || github.event_name == 'pull_request' }} - run_asan_discovery_server: ${{ ((inputs.run_asan_discovery_server == true) && true) || github.event_name == 'pull_request' }} - run_tsan_fastdds: ${{ ((inputs.run_tsan_fastdds == true) && true) || github.event_name == 'pull_request' }} - colcon_build_args: ${{ inputs.colcon_build_args || '' }} - colcon_test_args: ${{ inputs.colcon_test_args || '' }} - cmake_args: ${{ inputs.cmake_args || '' }} - ctest_args: ${{ inputs.ctest_args || '' }} - fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} - discovery_server_ref: ${{ inputs.discovery_server_ref || 'master' }} diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml deleted file mode 100644 index 0548a9b9664..00000000000 --- a/.github/workflows/ubuntu-ci.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Fast DDS Ubuntu CI - -on: - workflow_dispatch: - inputs: - label: - description: 'ID associated to the workflow' - required: true - type: string - colcon-args: - description: 'Extra arguments for colcon cli' - required: false - type: string - cmake-args: - description: 'Extra arguments for cmake cli' - required: false - type: string - ctest-args: - description: 'Extra arguments for ctest cli' - required: false - type: string - fastdds_branch: - description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' - type: string - required: true - security: - description: 'Enable security features' - required: false - type: boolean - default: true - run-tests: - description: 'Run suite of tests of Fast DDS, Fast DDS python, and Fast DDS Discovery Server' - required: false - type: boolean - default: true - use-ccache: - description: 'Use CCache to speed up the build' - required: false - type: boolean - default: false - - pull_request: - types: - - review_requested - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - ubuntu-ci: - - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - uses: ./.github/workflows/reusable-ubuntu-ci.yml - with: - # It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket: - # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. - os-image: 'ubuntu-22.04' - label: ${{ inputs.label || 'ubuntu-ci' }} - colcon-args: ${{ inputs.colcon-args }} - cmake-args: ${{ inputs.cmake-args }} - ctest-args: ${{ inputs.ctest-args || '-LE xfail' }} - fastdds-branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} - security: ${{ ((inputs.security == true) && true) || github.event_name == 'pull_request' }} - run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }} - use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml deleted file mode 100644 index d33b39bb693..00000000000 --- a/.github/workflows/windows-ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Fast DDS Windows CI - -on: - workflow_dispatch: - inputs: - label: - description: 'ID associated to the workflow. Must univocally identify artifacts.' - required: true - type: string - colcon-args: - description: 'Extra arguments for colcon cli' - required: false - type: string - cmake-args: - description: 'Extra arguments for cmake cli' - required: false - type: string - ctest-args: - description: 'Extra arguments for ctest cli' - required: false - type: string - fastdds_branch: - description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' - type: string - required: true - - pull_request: - types: - - review_requested - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - windows-ci: - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - uses: ./.github/workflows/reusable-windows-ci.yml - with: - label: ${{ inputs.label || 'windows-ci' }} - colcon-args: ${{ inputs.colcon-args }} - cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' - ctest-args: ${{ inputs.ctest-args }} - fastdds_branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} From f690d114df39eeb7c86b49d5589c1a1132379fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Dom=C3=ADnguez=20L=C3=B3pez?= Date: Sun, 7 Jul 2024 23:17:43 +0200 Subject: [PATCH 2/7] Refs #21233: Test fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mario Domínguez López --- test/unittest/transport/SharedMemTests.cpp | 40 ++++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/test/unittest/transport/SharedMemTests.cpp b/test/unittest/transport/SharedMemTests.cpp index d55f2c63f51..9b35942cb70 100644 --- a/test/unittest/transport/SharedMemTests.cpp +++ b/test/unittest/transport/SharedMemTests.cpp @@ -1447,7 +1447,7 @@ TEST_F(SHMTransportTests, buffer_recover) { auto buffer = listener1->pop(); - if (buffer) + if (nullptr != buffer) { listener1_recv_count.fetch_add(1); // This is a slow listener @@ -1467,7 +1467,7 @@ TEST_F(SHMTransportTests, buffer_recover) { auto buffer = listener2->pop(); - if (buffer) + if (nullptr != buffer) { listener2_recv_count.fetch_add(1); std::this_thread::sleep_for(std::chrono::milliseconds(listener2_sleep_ms)); @@ -1568,17 +1568,45 @@ TEST_F(SHMTransportTests, buffer_recover) exit_listeners = true; + // This third part of the test just tries to cleanly + // exit the threads. + + // At this point, listeners are blocked + // in the pop() method, and the ring buffers + // may (or not) be full. + + // In order to make the listeners exit the pop() method + // we have to options: + // - Waiting for the port_timeout_ms + // - try pushing another buffer, so that cv could be + // notified. + + // Sleeping the thread waiting for the port timeout + // is more risky as the healthy timeout port watchdog + // can be triggered, so we chosse the second option. + { auto buf = segment->alloc_buffer(1u, std::chrono::steady_clock::time_point()); + bool buffer_pushed = false; { is_port_ok = false; - ASSERT_TRUE(pub_sub1_write->try_push(buf, is_port_ok)); - ASSERT_TRUE(is_port_ok); + while (!buffer_pushed) + { + buffer_pushed = pub_sub1_write->try_push(buf, is_port_ok); + //! In any case port should not be ok + ASSERT_TRUE(is_port_ok); + std::this_thread::sleep_for(std::chrono::milliseconds(150)); + } } { is_port_ok = false; - ASSERT_TRUE(pub_sub2_write->try_push(buf, is_port_ok)); - ASSERT_TRUE(is_port_ok); + while (!buffer_pushed) + { + buffer_pushed = pub_sub2_write->try_push(buf, is_port_ok); + //! In any case port should not be ok + ASSERT_TRUE(is_port_ok); + std::this_thread::sleep_for(std::chrono::milliseconds(150)); + } } } From 69d5a6d29e3e806fc0f77c77da00299ef6d77b70 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Wed, 10 Jul 2024 10:06:29 +0200 Subject: [PATCH 3/7] Refs #21233: Apply Elianas sugg Signed-off-by: Mario Dominguez --- test/unittest/transport/SharedMemTests.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unittest/transport/SharedMemTests.cpp b/test/unittest/transport/SharedMemTests.cpp index 9b35942cb70..43cbe332eb7 100644 --- a/test/unittest/transport/SharedMemTests.cpp +++ b/test/unittest/transport/SharedMemTests.cpp @@ -1598,6 +1598,9 @@ TEST_F(SHMTransportTests, buffer_recover) std::this_thread::sleep_for(std::chrono::milliseconds(150)); } } + + buffer_pushed = false; + { is_port_ok = false; while (!buffer_pushed) From e5e88e438f539d3c93424c8e292ebabcdfca47bc Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Wed, 10 Jul 2024 10:13:23 +0200 Subject: [PATCH 4/7] Refs #21233: Apply Miguels sugg Signed-off-by: Mario Dominguez --- test/unittest/transport/SharedMemTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/transport/SharedMemTests.cpp b/test/unittest/transport/SharedMemTests.cpp index 43cbe332eb7..f1f9c0416c5 100644 --- a/test/unittest/transport/SharedMemTests.cpp +++ b/test/unittest/transport/SharedMemTests.cpp @@ -1583,7 +1583,7 @@ TEST_F(SHMTransportTests, buffer_recover) // Sleeping the thread waiting for the port timeout // is more risky as the healthy timeout port watchdog - // can be triggered, so we chosse the second option. + // can be triggered, so we choose the second option. { auto buf = segment->alloc_buffer(1u, std::chrono::steady_clock::time_point()); From d3e71c9f1bcdd01b8edcbf4b5c30c3982da31e3f Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Wed, 10 Jul 2024 15:58:23 +0200 Subject: [PATCH 5/7] Refs #21233: TMP force multiple test runs Signed-off-by: Mario Dominguez --- .github/workflows/config/fastdds_test.meta | 5 ----- .github/workflows/reusable-mac-ci.yml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/config/fastdds_test.meta b/.github/workflows/config/fastdds_test.meta index 07b12fc1788..a1f8ad81fc1 100644 --- a/.github/workflows/config/fastdds_test.meta +++ b/.github/workflows/config/fastdds_test.meta @@ -7,11 +7,6 @@ names: - "-DPROFILING_TESTS=OFF" - "-DCOMPILE_TOOLS=ON" - "-DSYSTEM_TESTS=ON" - ctest-args: [ - "--repeat", "until-pass:3", - "--timeout", "300", - "--label-exclude", "xfail" - ] googletest-distribution: cmake-args: - "-Dgtest_force_shared_crt=ON" diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 1dfebbd36fb..17282de4528 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -143,7 +143,7 @@ jobs: uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: colcon_meta_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.meta - colcon_test_args: ${{ inputs.colcon-args }} + colcon_test_args: --retest-until-fail 30 colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} packages_names: fastdds From 5f1951309ad2f3a39cb81c3a0b4cab5ced1a6dd9 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Thu, 11 Jul 2024 12:06:52 +0200 Subject: [PATCH 6/7] Revert "Refs #21233: TMP force multiple test runs" This reverts commit d3e71c9f1bcdd01b8edcbf4b5c30c3982da31e3f. --- .github/workflows/config/fastdds_test.meta | 5 +++++ .github/workflows/reusable-mac-ci.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/config/fastdds_test.meta b/.github/workflows/config/fastdds_test.meta index a1f8ad81fc1..07b12fc1788 100644 --- a/.github/workflows/config/fastdds_test.meta +++ b/.github/workflows/config/fastdds_test.meta @@ -7,6 +7,11 @@ names: - "-DPROFILING_TESTS=OFF" - "-DCOMPILE_TOOLS=ON" - "-DSYSTEM_TESTS=ON" + ctest-args: [ + "--repeat", "until-pass:3", + "--timeout", "300", + "--label-exclude", "xfail" + ] googletest-distribution: cmake-args: - "-Dgtest_force_shared_crt=ON" diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 17282de4528..1dfebbd36fb 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -143,7 +143,7 @@ jobs: uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: colcon_meta_file: ${{ github.workspace }}/src/fastdds/.github/workflows/config/fastdds_test.meta - colcon_test_args: --retest-until-fail 30 + colcon_test_args: ${{ inputs.colcon-args }} colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} packages_names: fastdds From 9e1aa6fcd3b5c06d071cb1cded362c8f5439a712 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Thu, 11 Jul 2024 12:07:01 +0200 Subject: [PATCH 7/7] Revert "Refs #21233: Run mac-ci only and buffer recover test" This reverts commit cbc2aa125f2c51ca13b697d85dec13de2c272b57. --- .github/workflows/mac-ci.yml | 2 +- .github/workflows/sanitizers-ci.yml | 77 +++++++++++++++++++++++++++++ .github/workflows/ubuntu-ci.yml | 73 +++++++++++++++++++++++++++ .github/workflows/windows-ci.yml | 51 +++++++++++++++++++ 4 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sanitizers-ci.yml create mode 100644 .github/workflows/ubuntu-ci.yml create mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/mac-ci.yml b/.github/workflows/mac-ci.yml index bac33c4651f..21cf3f2652f 100644 --- a/.github/workflows/mac-ci.yml +++ b/.github/workflows/mac-ci.yml @@ -52,6 +52,6 @@ jobs: label: ${{ inputs.label || 'mac-ci' }} colcon-args: ${{ inputs.colcon-args }} cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' - ctest-args: ' -R buffer_recover ${{ inputs.ctest-args }}' + ctest-args: ${{ inputs.ctest-args }} fastdds-branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }} diff --git a/.github/workflows/sanitizers-ci.yml b/.github/workflows/sanitizers-ci.yml new file mode 100644 index 00000000000..e4ec25ec298 --- /dev/null +++ b/.github/workflows/sanitizers-ci.yml @@ -0,0 +1,77 @@ +name: Fast DDS Sanitizers CI + +on: + workflow_dispatch: + inputs: + label: + description: 'ID associated to the workflow' + required: true + type: string + run_asan_fastdds: + description: 'Run Addess Sanitizer job for Fast DDS' + required: false + type: boolean + run_asan_discovery_server: + description: 'Run Addess Sanitizer job for Discovery Server' + required: false + type: boolean + run_tsan_fastdds: + description: 'Run Thread Sanitizer job for Fast DDS' + required: false + type: boolean + colcon_build_args: + description: 'Optional colcon build arguments' + required: false + type: string + colcon_test_args: + description: 'Optional colcon test arguments' + required: false + type: string + cmake_args: + description: 'Optional CMake Compilation Flags' + required: false + type: string + ctest_args: + description: 'Optional CTest Testing Flags' + required: false + type: string + fastdds_ref: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + required: true + discovery_server_ref: + description: > + Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server) + Required only if the Discovery Server job is requested + required: false + + pull_request: + types: + - review_requested + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + sanitizers-ci: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') + ) }} + uses: ./.github/workflows/reusable-sanitizers-ci.yml + with: + label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} + run_asan_fastdds: ${{ ((inputs.run_asan_fastdds == true) && true) || github.event_name == 'pull_request' }} + run_asan_discovery_server: ${{ ((inputs.run_asan_discovery_server == true) && true) || github.event_name == 'pull_request' }} + run_tsan_fastdds: ${{ ((inputs.run_tsan_fastdds == true) && true) || github.event_name == 'pull_request' }} + colcon_build_args: ${{ inputs.colcon_build_args || '' }} + colcon_test_args: ${{ inputs.colcon_test_args || '' }} + cmake_args: ${{ inputs.cmake_args || '' }} + ctest_args: ${{ inputs.ctest_args || '' }} + fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} + discovery_server_ref: ${{ inputs.discovery_server_ref || 'master' }} diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml new file mode 100644 index 00000000000..0548a9b9664 --- /dev/null +++ b/.github/workflows/ubuntu-ci.yml @@ -0,0 +1,73 @@ +name: Fast DDS Ubuntu CI + +on: + workflow_dispatch: + inputs: + label: + description: 'ID associated to the workflow' + required: true + type: string + colcon-args: + description: 'Extra arguments for colcon cli' + required: false + type: string + cmake-args: + description: 'Extra arguments for cmake cli' + required: false + type: string + ctest-args: + description: 'Extra arguments for ctest cli' + required: false + type: string + fastdds_branch: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + type: string + required: true + security: + description: 'Enable security features' + required: false + type: boolean + default: true + run-tests: + description: 'Run suite of tests of Fast DDS, Fast DDS python, and Fast DDS Discovery Server' + required: false + type: boolean + default: true + use-ccache: + description: 'Use CCache to speed up the build' + required: false + type: boolean + default: false + + pull_request: + types: + - review_requested + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + ubuntu-ci: + + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') + ) }} + uses: ./.github/workflows/reusable-ubuntu-ci.yml + with: + # It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket: + # https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job. + os-image: 'ubuntu-22.04' + label: ${{ inputs.label || 'ubuntu-ci' }} + colcon-args: ${{ inputs.colcon-args }} + cmake-args: ${{ inputs.cmake-args }} + ctest-args: ${{ inputs.ctest-args || '-LE xfail' }} + fastdds-branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} + security: ${{ ((inputs.security == true) && true) || github.event_name == 'pull_request' }} + run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }} + use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml new file mode 100644 index 00000000000..d33b39bb693 --- /dev/null +++ b/.github/workflows/windows-ci.yml @@ -0,0 +1,51 @@ +name: Fast DDS Windows CI + +on: + workflow_dispatch: + inputs: + label: + description: 'ID associated to the workflow. Must univocally identify artifacts.' + required: true + type: string + colcon-args: + description: 'Extra arguments for colcon cli' + required: false + type: string + cmake-args: + description: 'Extra arguments for cmake cli' + required: false + type: string + ctest-args: + description: 'Extra arguments for ctest cli' + required: false + type: string + fastdds_branch: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + type: string + required: true + + pull_request: + types: + - review_requested + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + windows-ci: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') + ) }} + uses: ./.github/workflows/reusable-windows-ci.yml + with: + label: ${{ inputs.label || 'windows-ci' }} + colcon-args: ${{ inputs.colcon-args }} + cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' + ctest-args: ${{ inputs.ctest-args }} + fastdds_branch: ${{ inputs.fastdds_branch || github.ref || 'master' }}