From 2965a612f924fd265d49f329783cb61288a24faa Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Thu, 29 Feb 2024 16:59:35 +0100 Subject: [PATCH 1/9] Refs #20542: Improve CI version management Signed-off-by: JesusPoderoso --- .github/workflows/documentation-tests.yaml | 6 ++++-- .github/workflows/sanitizer-tests.yaml | 4 ++++ .github/workflows/thread-sanitizer.yaml | 6 ++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml index 62dbbbd3754..3c7d7cd1687 100644 --- a/.github/workflows/documentation-tests.yaml +++ b/.github/workflows/documentation-tests.yaml @@ -11,14 +11,16 @@ on: push: branches: - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' paths-ignore: - '**.md' - '**.txt' - '!**/CMakeLists.txt' pull_request: - branches: - - 'master' paths-ignore: - '**.md' - '**.txt' diff --git a/.github/workflows/sanitizer-tests.yaml b/.github/workflows/sanitizer-tests.yaml index 6db60c6c815..29ea5d56ee5 100644 --- a/.github/workflows/sanitizer-tests.yaml +++ b/.github/workflows/sanitizer-tests.yaml @@ -15,6 +15,10 @@ on: push: branches: - master + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' schedule: - cron: '0 1 * * *' diff --git a/.github/workflows/thread-sanitizer.yaml b/.github/workflows/thread-sanitizer.yaml index dad72077317..ff11e5c79f5 100644 --- a/.github/workflows/thread-sanitizer.yaml +++ b/.github/workflows/thread-sanitizer.yaml @@ -18,14 +18,16 @@ on: push: branches: - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' paths-ignore: - '**.md' - '**.txt' - '!**/CMakeLists.txt' pull_request: - branches: - - 'master' paths-ignore: - '**.md' - '**.txt' From 94daa13bbf219f8acf391bb8cb1d16d8215f834a Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Mon, 4 Mar 2024 16:43:02 +0100 Subject: [PATCH 2/9] Refs #20542: Apply internal revision suggestions Signed-off-by: JesusPoderoso --- .github/workflows/documentation-tests.yaml | 7 ++----- .github/workflows/mac-ci.yml | 6 ++---- .github/workflows/sanitizer-tests.yaml | 8 +++----- .github/workflows/thread-sanitizer.yaml | 7 ++----- .github/workflows/windows-ci.yml | 6 ++---- 5 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml index 3c7d7cd1687..a887e4ac927 100644 --- a/.github/workflows/documentation-tests.yaml +++ b/.github/workflows/documentation-tests.yaml @@ -11,16 +11,13 @@ on: push: branches: - 'master' - - '2.13.x' - - '2.12.x' - - '2.10.x' - - '2.6.x' paths-ignore: - '**.md' - '**.txt' - '!**/CMakeLists.txt' - pull_request: + branches: + - 'master' paths-ignore: - '**.md' - '**.txt' diff --git a/.github/workflows/mac-ci.yml b/.github/workflows/mac-ci.yml index 2f1f92cc0b1..a53e06e2da3 100644 --- a/.github/workflows/mac-ci.yml +++ b/.github/workflows/mac-ci.yml @@ -27,15 +27,13 @@ on: push: branches: - 'master' - - '2.13.x' - - '2.12.x' - - '2.10.x' - - '2.6.x' paths-ignore: - '**.md' - '**.txt' - '!**/CMakeLists.txt' pull_request: + branches: + - 'master' paths-ignore: - '**.md' - '**.txt' diff --git a/.github/workflows/sanitizer-tests.yaml b/.github/workflows/sanitizer-tests.yaml index 29ea5d56ee5..b9ac57aafe4 100644 --- a/.github/workflows/sanitizer-tests.yaml +++ b/.github/workflows/sanitizer-tests.yaml @@ -11,14 +11,12 @@ on: description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' required: true default: 'master' - pull_request: push: branches: - master - - '2.13.x' - - '2.12.x' - - '2.10.x' - - '2.6.x' + pull_request: + branches: + - 'master' schedule: - cron: '0 1 * * *' diff --git a/.github/workflows/thread-sanitizer.yaml b/.github/workflows/thread-sanitizer.yaml index ff11e5c79f5..2af74651de4 100644 --- a/.github/workflows/thread-sanitizer.yaml +++ b/.github/workflows/thread-sanitizer.yaml @@ -18,16 +18,13 @@ on: push: branches: - 'master' - - '2.13.x' - - '2.12.x' - - '2.10.x' - - '2.6.x' paths-ignore: - '**.md' - '**.txt' - '!**/CMakeLists.txt' - pull_request: + branches: + - 'master' paths-ignore: - '**.md' - '**.txt' diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index e8e7c900b70..136cf979ddc 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -27,15 +27,13 @@ on: push: branches: - 'master' - - '2.13.x' - - '2.12.x' - - '2.10.x' - - '2.6.x' paths-ignore: - '**.md' - '**.txt' - '!**/CMakeLists.txt' pull_request: + branches: + - 'master' paths-ignore: - '**.md' - '**.txt' From d41e9cba2f114f2ce2c146fdd775f7266a8be770 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Mon, 4 Mar 2024 17:03:39 +0100 Subject: [PATCH 3/9] Refs #20542: Add ignored paths to sanitizer events Signed-off-by: JesusPoderoso --- .github/workflows/sanitizer-tests.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/sanitizer-tests.yaml b/.github/workflows/sanitizer-tests.yaml index b9ac57aafe4..2a564535038 100644 --- a/.github/workflows/sanitizer-tests.yaml +++ b/.github/workflows/sanitizer-tests.yaml @@ -14,9 +14,17 @@ on: push: branches: - master + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' pull_request: branches: - 'master' + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' schedule: - cron: '0 1 * * *' From dfa3a693a9dc6ea28967ffca27bb13701c915312 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 5 Mar 2024 14:31:39 +0100 Subject: [PATCH 4/9] Refs #20542: Update nightly workflows to run in all supported branches Signed-off-by: JesusPoderoso --- .github/workflows/nightly-mac-ci.yml | 24 ++++++++++++++++++++---- .github/workflows/nightly-ubuntu-ci.yml | 10 ++++++++-- .github/workflows/nightly-windows-ci.yml | 24 ++++++++++++++++++++---- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nightly-mac-ci.yml b/.github/workflows/nightly-mac-ci.yml index adb0e0e0c8b..69847bd93cd 100644 --- a/.github/workflows/nightly-mac-ci.yml +++ b/.github/workflows/nightly-mac-ci.yml @@ -7,17 +7,33 @@ on: jobs: nightly-sec-mac-ci: + strategy: + matrix: + fastdds-branch: + - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' uses: ./.github/workflows/reusable-mac-ci.yml with: - label: 'nightly-sec-mac-ci' + label: 'nightly-sec-mac-ci-${{ matrix.fastdds-branch }}' cmake-args: "-DSECURITY=ON" ctest-args: "-LE xfail" - fastdds-branch: 'master' + fastdds-branch: '${{ matrix.fastdds-branch }}' nightly-nosec-mac-ci: + strategy: + matrix: + fastdds-branch: + - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' uses: ./.github/workflows/reusable-mac-ci.yml with: - label: 'nightly-nosec-mac-ci' + label: 'nightly-nosec-mac-ci-${{ matrix.fastdds-branch }}' cmake-args: "-DSECURITY=OFF" ctest-args: "-LE xfail" - fastdds-branch: 'master' + fastdds-branch: '${{ matrix.fastdds-branch }}' diff --git a/.github/workflows/nightly-ubuntu-ci.yml b/.github/workflows/nightly-ubuntu-ci.yml index 4784cb8808c..c8318e08657 100644 --- a/.github/workflows/nightly-ubuntu-ci.yml +++ b/.github/workflows/nightly-ubuntu-ci.yml @@ -13,11 +13,17 @@ jobs: matrix: os-image: - 'ubuntu-22.04' + fastdds-branch: + - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' uses: ./.github/workflows/reusable-ubuntu-ci.yml with: os-image: ${{ matrix.os-image }} - label: '${{ matrix.os-image }}-nightly-sec-ubuntu-ci' + label: '${{ matrix.os-image }}-nightly-sec-ubuntu-ci-${{ matrix.fastdds-branch }}' cmake-args: "-DSECURITY=ON" ctest-args: "-LE xfail" - fastdds-branch: 'master' + fastdds-branch: '${{ matrix.fastdds-branch }}' diff --git a/.github/workflows/nightly-windows-ci.yml b/.github/workflows/nightly-windows-ci.yml index ebc01791750..6662d77fd3c 100644 --- a/.github/workflows/nightly-windows-ci.yml +++ b/.github/workflows/nightly-windows-ci.yml @@ -7,20 +7,36 @@ on: jobs: nightly-sec-windows-ci: + strategy: + matrix: + fastdds-branch: + - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' uses: ./.github/workflows/reusable-windows-ci.yml with: - label: 'nightly-sec-windows-ci' + label: 'nightly-sec-windows-ci-${{ matrix.fastdds-branch }}' cmake-args: "-DSECURITY=ON" ctest-args: "-LE xfail" - fastdds_branch: 'master' + fastdds_branch: '${{ matrix.fastdds-branch }}' nightly-nosec-windows-ci: + strategy: + matrix: + fastdds-branch: + - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' uses: ./.github/workflows/reusable-windows-ci.yml with: - label: 'nightly-nosec-windows-ci' + label: 'nightly-nosec-windows-ci-${{ matrix.fastdds-branch }}' cmake-args: "-DSECURITY=OFF" ctest-args: "-LE xfail" - fastdds_branch: 'master' + fastdds_branch: '${{ matrix.fastdds-branch }}' nightly-3_0_x-windows-ci: uses: ./.github/workflows/reusable-windows-ci.yml From 9e66e0cf9cc15151d7955afb903c30823465dd8d Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 5 Mar 2024 14:58:30 +0100 Subject: [PATCH 5/9] Refs #20542: Add workflow dispatch inputs for ubuntu CI Signed-off-by: JesusPoderoso --- .github/workflows/ubuntu-ci.yml | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ubuntu-ci.yml diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml new file mode 100644 index 00000000000..76b13af5430 --- /dev/null +++ b/.github/workflows/ubuntu-ci.yml @@ -0,0 +1,43 @@ +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 + +jobs: + ubuntu-ci: + + strategy: + fail-fast: false + matrix: + os-image: + - 'ubuntu-22.04' + + uses: ./.github/workflows/reusable-ubuntu-ci.yml + with: + os-image: ${{ matrix.os-image }} + label: ${{ inputs.label || 'ubuntu-ci' }} + colcon-args: ${{ inputs.colcon-args }} + cmake-args: ${{ inputs.cmake-args || "-DSECURITY=ON" }} + ctest-args: ${{ inputs.ctest-args || "-LE xfail" }} + fastdds-branch: ${{ inputs.fastdds_branch || github.ref || 'master' }} From 3758f3184c00a0af640ab7a56c5431e856fca21e Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 5 Mar 2024 16:59:21 +0100 Subject: [PATCH 6/9] Refs #20542: Apply rev suggestion Signed-off-by: JesusPoderoso --- .github/workflows/ubuntu-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 76b13af5430..40f56ebe029 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -24,6 +24,10 @@ on: type: string required: true +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + jobs: ubuntu-ci: From 85088bcc869b9d2aef9cf362d492b06ba1f01edd Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Wed, 6 Mar 2024 08:11:51 +0100 Subject: [PATCH 7/9] Refs #20542: Remove Windows CI test report Signed-off-by: JesusPoderoso --- .github/workflows/reusable-windows-ci.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 768a80071a0..ff916f5b293 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -189,13 +189,3 @@ jobs: show_failed: 'True' show_disabled: 'False' show_skipped: 'False' - - - name: Test Report - uses: eProsima/eProsima-CI/external/test-reporter@main - if: ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }} - with: - name: "Report: ${{ matrix.cmake-config }} | ${{ matrix.vs-toolset }} " - path: "${{ steps.test.outputs.ctest_results_path }}*.xml" - working-directory: 'src/fastrtps' - path-replace-backslashes: 'true' - list-tests: 'failed' From 2e4025ef02d5ef52e0a1e30d6a2cf2899f024461 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Wed, 6 Mar 2024 09:56:19 +0100 Subject: [PATCH 8/9] Refs #20542: Remove unused action Signed-off-by: JesusPoderoso --- .../actions/fetch-fastdds-repos/action.yml | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/actions/fetch-fastdds-repos/action.yml diff --git a/.github/actions/fetch-fastdds-repos/action.yml b/.github/actions/fetch-fastdds-repos/action.yml deleted file mode 100644 index 7a82b434ec7..00000000000 --- a/.github/actions/fetch-fastdds-repos/action.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: 'fetch-fastdds-repos' -description: 'Fetch Fast DDS dependencies' -inputs: - target_directory: - description: 'Target directory where the dependencies will be downloaded.' - required: true - default: '.' - googletest: - description: 'Specifies if GoogleTest repository should be downloaded.' - required: false - default: 'false' - discovery_server: - description: 'Specifies if Discovery Server repository should be downloaded.' - required: false - default: 'false' - discovery_server_branch: - description: 'Specifies Discovery Server branch. The final branch is calculated based on the event that triggers - the action. Thus, if the action has been triggered as a result of a Pull Request, the branch will be the source - branch, the target branch, "master", or the branch specified in this parameter.' - required: false - default: 'master' -runs: - using: "composite" - steps: - - name: Fetch eProsima dependencies - run: | - git clone https://github.com/eProsima/foonathan_memory_vendor.git ${{ inputs.target_directory }}/foonathan_memory_vendor - git clone https://github.com/eProsima/Fast-CDR.git ${{ inputs.target_directory }}/fastcdr - shell: bash - - - name: Fetch GoogleTest - if: ${{ inputs.googletest == 'true' }} - run: git clone https://github.com/google/googletest.git --branch release-1.12.1 ${{ inputs.target_directory }}/googletest - shell: bash - - - name: Fetch Discovery Server - if: ${{ inputs.discovery_server == 'true' }} - run: | - base_dir=${PWD} - git clone https://github.com/eProsima/Discovery-Server.git ${{ inputs.target_directory }}/discovery_server - cd ${{ inputs.target_directory }}/discovery_server - - if [[ $(git rev-parse --verify "${{ github.head_ref }}" 2>/dev/null) ]]; then - git checkout ${{ github.head_ref }} - elif [[ $(git rev-parse --verify "${{ github.base_ref }}" 2>/dev/null) ]]; then - git checkout ${{ github.base_ref }} - else - git checkout ${{ inputs.discovery_server_branch }} - fi - - cd ${base_dir} - shell: bash From 4544d9242ec15ace16447997f048c7196a13dcf0 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Wed, 6 Mar 2024 15:59:29 +0100 Subject: [PATCH 9/9] Refs #20542: Address last rev suggestions Signed-off-by: JesusPoderoso --- .../{sanitizer-tests.yaml => address-sanitizers.yaml} | 11 +++-------- .github/workflows/documentation-tests.yaml | 7 ------- .github/workflows/mac-ci.yml | 7 ------- .github/workflows/thread-sanitizer.yaml | 10 +++------- .github/workflows/windows-ci.yml | 7 ------- 5 files changed, 6 insertions(+), 36 deletions(-) rename .github/workflows/{sanitizer-tests.yaml => address-sanitizers.yaml} (98%) diff --git a/.github/workflows/sanitizer-tests.yaml b/.github/workflows/address-sanitizers.yaml similarity index 98% rename from .github/workflows/sanitizer-tests.yaml rename to .github/workflows/address-sanitizers.yaml index 2a564535038..f634988582f 100644 --- a/.github/workflows/sanitizer-tests.yaml +++ b/.github/workflows/address-sanitizers.yaml @@ -1,4 +1,4 @@ -name: Sanitizer analysis +name: Address Sanitizer analysis on: workflow_dispatch: @@ -11,13 +11,7 @@ on: description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' required: true default: 'master' - push: - branches: - - master - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' + pull_request: branches: - 'master' @@ -25,6 +19,7 @@ on: - '**.md' - '**.txt' - '!**/CMakeLists.txt' + schedule: - cron: '0 1 * * *' diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml index a887e4ac927..d755754b89c 100644 --- a/.github/workflows/documentation-tests.yaml +++ b/.github/workflows/documentation-tests.yaml @@ -8,13 +8,6 @@ on: type: string default: 'master' - push: - branches: - - 'master' - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' pull_request: branches: - 'master' diff --git a/.github/workflows/mac-ci.yml b/.github/workflows/mac-ci.yml index a53e06e2da3..bf18938f21e 100644 --- a/.github/workflows/mac-ci.yml +++ b/.github/workflows/mac-ci.yml @@ -24,13 +24,6 @@ on: type: string required: true - push: - branches: - - 'master' - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' pull_request: branches: - 'master' diff --git a/.github/workflows/thread-sanitizer.yaml b/.github/workflows/thread-sanitizer.yaml index 2af74651de4..52523ca1955 100644 --- a/.github/workflows/thread-sanitizer.yaml +++ b/.github/workflows/thread-sanitizer.yaml @@ -15,13 +15,6 @@ on: required: false type: string - push: - branches: - - 'master' - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' pull_request: branches: - 'master' @@ -30,6 +23,9 @@ on: - '**.txt' - '!**/CMakeLists.txt' + schedule: + - cron: '0 1 * * *' + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 136cf979ddc..de26e90209b 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -24,13 +24,6 @@ on: type: string required: true - push: - branches: - - 'master' - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' pull_request: branches: - 'master'