From 51cac8e1376728b70a7bdc65e07a69a2c10fb1fb Mon Sep 17 00:00:00 2001 From: EduPonz Date: Wed, 13 Mar 2024 16:50:44 +0100 Subject: [PATCH] Refs #20542: Manual cherry-pick of PR #4549 Signed-off-by: EduPonz --- .github/workflows/config/asan_colcon.meta | 49 +++++++----------- .../config/{default_ci.meta => ci.meta} | 1 - .github/workflows/config/ci.repos | 5 ++ .github/workflows/config/coverage.repos | 17 ------- .../workflows/config/default_ci_2.10.x.repos | 13 ----- .../workflows/config/default_ci_2.12.x.repos | 13 ----- .../workflows/config/default_ci_2.13.x.repos | 13 ----- .../workflows/config/default_ci_2.6.x.repos | 13 ----- .../workflows/config/default_ci_master.repos | 13 ----- .github/workflows/config/tsan_colcon.meta | 49 +++++++----------- .github/workflows/mac-ci.yml | 2 +- .github/workflows/rebase-3.0.x-devel.yaml | 47 ----------------- .github/workflows/reusable-mac-ci.yml | 45 +++++----------- .github/workflows/reusable-ubuntu-ci.yml | 45 +++++----------- .github/workflows/reusable-windows-ci.yml | 51 +++++-------------- .github/workflows/ubuntu-ci.yml | 4 +- .github/workflows/windows-ci.yml | 2 +- 17 files changed, 84 insertions(+), 298 deletions(-) rename .github/workflows/config/{default_ci.meta => ci.meta} (97%) create mode 100644 .github/workflows/config/ci.repos delete mode 100644 .github/workflows/config/coverage.repos delete mode 100644 .github/workflows/config/default_ci_2.10.x.repos delete mode 100644 .github/workflows/config/default_ci_2.12.x.repos delete mode 100644 .github/workflows/config/default_ci_2.13.x.repos delete mode 100644 .github/workflows/config/default_ci_2.6.x.repos delete mode 100644 .github/workflows/config/default_ci_master.repos delete mode 100644 .github/workflows/rebase-3.0.x-devel.yaml diff --git a/.github/workflows/config/asan_colcon.meta b/.github/workflows/config/asan_colcon.meta index cda173af037..8c9830e3683 100644 --- a/.github/workflows/config/asan_colcon.meta +++ b/.github/workflows/config/asan_colcon.meta @@ -1,31 +1,18 @@ -{ - "names": - { - "fastrtps": - { - "cmake-args": - [ - "-DCMAKE_BUILD_TYPE=Debug", - "-DEPROSIMA_BUILD_TESTS=ON", - "-DRTPS_API_TESTS=ON", - "-DFASTRTPS_API_TESTS=ON", - "-DFASTDDS_PIM_API_TESTS=ON", - "-DPERFORMANCE_TESTS=ON", - "-DNO_TLS=OFF", - "-DSECURITY=ON", - "-DFASTDDS_STATISTICS=ON", - "-DSANITIZER=Address", - "-DCMAKE_CXX_FLAGS='-Werror'" - ] - }, - - "discovery-server": - { - "cmake-args": - [ - "-DCMAKE_BUILD_TYPE=Debug", - "-DSANITIZER=Address", - ] - } - } -} +names: + fastrtps: + cmake-args: + - "-DCMAKE_BUILD_TYPE=Debug" + - "-DEPROSIMA_BUILD_TESTS=ON" + - "-DRTPS_API_TESTS=ON" + - "-DFASTRTPS_API_TESTS=ON" + - "-DFASTDDS_PIM_API_TESTS=ON" + - "-DPERFORMANCE_TESTS=ON" + - "-DNO_TLS=OFF" + - "-DSECURITY=ON" + - "-DFASTDDS_STATISTICS=ON" + - "-DSANITIZER=Address" + - "-DCMAKE_CXX_FLAGS='-Werror'" + discovery-server: + cmake-args: + - "-DCMAKE_BUILD_TYPE=Debug" + - "-DSANITIZER=Address" diff --git a/.github/workflows/config/default_ci.meta b/.github/workflows/config/ci.meta similarity index 97% rename from .github/workflows/config/default_ci.meta rename to .github/workflows/config/ci.meta index 55514ebbce6..471c510dac4 100644 --- a/.github/workflows/config/default_ci.meta +++ b/.github/workflows/config/ci.meta @@ -15,7 +15,6 @@ names: - "-DNO_TLS=OFF" - "-DPERFORMANCE_TESTS=ON" - "-DPROFILING_TESTS=OFF" - - "-DSECURITY=ON" - "-DSHM_TRANSPORT_DEFAULT=ON" - "-DSTRICT_REALTIME=OFF" - "-DSYSTEM_TESTS=ON" diff --git a/.github/workflows/config/ci.repos b/.github/workflows/config/ci.repos new file mode 100644 index 00000000000..5052ee825f4 --- /dev/null +++ b/.github/workflows/config/ci.repos @@ -0,0 +1,5 @@ +repositories: + googletest-distribution: + type: git + url: https://github.com/google/googletest.git + version: release-1.11.0 diff --git a/.github/workflows/config/coverage.repos b/.github/workflows/config/coverage.repos deleted file mode 100644 index f6580b0e8f8..00000000000 --- a/.github/workflows/config/coverage.repos +++ /dev/null @@ -1,17 +0,0 @@ -repositories: - fastcdr: - type: git - url: https://github.com/eProsima/Fast-CDR.git - version: 1.1.x - foonathan_memory_vendor: - type: git - url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.10.0 - discovery-server: - type: git - url: https://github.com/eProsima/Discovery-Server.git - version: master diff --git a/.github/workflows/config/default_ci_2.10.x.repos b/.github/workflows/config/default_ci_2.10.x.repos deleted file mode 100644 index e5a8ab31ec8..00000000000 --- a/.github/workflows/config/default_ci_2.10.x.repos +++ /dev/null @@ -1,13 +0,0 @@ -repositories: - fastcdr: - type: git - url: https://github.com/eProsima/Fast-CDR.git - version: 1.0.x - foonathan_memory_vendor: - type: git - url: https://github.com/eProsima/foonathan_memory_vendor.git - version: v1.3.0 - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.11.0 diff --git a/.github/workflows/config/default_ci_2.12.x.repos b/.github/workflows/config/default_ci_2.12.x.repos deleted file mode 100644 index f1c0628cf69..00000000000 --- a/.github/workflows/config/default_ci_2.12.x.repos +++ /dev/null @@ -1,13 +0,0 @@ -repositories: - fastcdr: - type: git - url: https://github.com/eProsima/Fast-CDR.git - version: v2.1.0 - foonathan_memory_vendor: - type: git - url: https://github.com/eProsima/foonathan_memory_vendor.git - version: v1.3.1 - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.11.0 diff --git a/.github/workflows/config/default_ci_2.13.x.repos b/.github/workflows/config/default_ci_2.13.x.repos deleted file mode 100644 index 950c0c396ed..00000000000 --- a/.github/workflows/config/default_ci_2.13.x.repos +++ /dev/null @@ -1,13 +0,0 @@ -repositories: - fastcdr: - type: git - url: https://github.com/eProsima/Fast-CDR.git - version: v2.1.3 - foonathan_memory_vendor: - type: git - url: https://github.com/eProsima/foonathan_memory_vendor.git - version: v1.3.1 - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.11.0 diff --git a/.github/workflows/config/default_ci_2.6.x.repos b/.github/workflows/config/default_ci_2.6.x.repos deleted file mode 100644 index dafcf2fd3f7..00000000000 --- a/.github/workflows/config/default_ci_2.6.x.repos +++ /dev/null @@ -1,13 +0,0 @@ -repositories: - fastcdr: - type: git - url: https://github.com/eProsima/Fast-CDR.git - version: 1.0.x - foonathan_memory_vendor: - type: git - url: https://github.com/eProsima/foonathan_memory_vendor.git - version: v1.2.1 - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.11.0 diff --git a/.github/workflows/config/default_ci_master.repos b/.github/workflows/config/default_ci_master.repos deleted file mode 100644 index 5d3651ca82c..00000000000 --- a/.github/workflows/config/default_ci_master.repos +++ /dev/null @@ -1,13 +0,0 @@ -repositories: - fastcdr: - type: git - url: https://github.com/eProsima/Fast-CDR.git - version: master - foonathan_memory_vendor: - type: git - url: https://github.com/eProsima/foonathan_memory_vendor.git - version: master - googletest-distribution: - type: git - url: https://github.com/google/googletest.git - version: release-1.11.0 diff --git a/.github/workflows/config/tsan_colcon.meta b/.github/workflows/config/tsan_colcon.meta index c33e7bc2938..e7f8a45e3ff 100644 --- a/.github/workflows/config/tsan_colcon.meta +++ b/.github/workflows/config/tsan_colcon.meta @@ -1,31 +1,18 @@ -{ - "names": - { - "fastcdr": - { - "cmake-args": - [ - "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'", - "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" - ] - }, - "fastrtps": - { - "cmake-args": - [ - "-DCOMPILE_EXAMPLES=OFF", - "-DEPROSIMA_BUILD_TESTS=ON", - "-DRTPS_API_TESTS=ON", - "-DFASTRTPS_API_TESTS=OFF", - "-DFASTDDS_PIM_API_TESTS=ON", - "-DPERFORMANCE_TESTS=ON", - "-DNO_TLS=OFF", - "-DSECURITY=ON", - "-DFASTDDS_STATISTICS=ON", - "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'", - "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" - ] - } - - } -} +names: + fastcdr: + cmake-args: + - "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" + - "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" + fastrtps: + cmake-args: + - "-DCOMPILE_EXAMPLES=OFF" + - "-DEPROSIMA_BUILD_TESTS=ON" + - "-DRTPS_API_TESTS=ON" + - "-DFASTRTPS_API_TESTS=OFF" + - "-DFASTDDS_PIM_API_TESTS=ON" + - "-DPERFORMANCE_TESTS=ON" + - "-DNO_TLS=OFF" + - "-DSECURITY=ON" + - "-DFASTDDS_STATISTICS=ON" + - "-DCMAKE_C_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" + - "-DCMAKE_CXX_FLAGS='-fsanitize=thread -O2 -g -fno-omit-frame-pointer'" diff --git a/.github/workflows/mac-ci.yml b/.github/workflows/mac-ci.yml index f21144299de..f4817793981 100644 --- a/.github/workflows/mac-ci.yml +++ b/.github/workflows/mac-ci.yml @@ -44,6 +44,6 @@ jobs: with: label: ${{ inputs.label || 'mac-ci' }} colcon-args: ${{ inputs.colcon-args }} - cmake-args: ${{ inputs.cmake-args }} + cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' ctest-args: ${{ inputs.ctest-args }} fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.13.x' }} diff --git a/.github/workflows/rebase-3.0.x-devel.yaml b/.github/workflows/rebase-3.0.x-devel.yaml deleted file mode 100644 index a29973215cc..00000000000 --- a/.github/workflows/rebase-3.0.x-devel.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: rebase-3.0.x-devel-master - -on: - schedule: - - cron: '0 0 * * *' - # scheduled every midnight - workflow_dispatch: - #manual run of the workflow job - -jobs: - rebase-branches: - name: Rebase 3.0.x-devel branch HEAD with master current branch - runs-on: ubuntu-latest - - steps: - # Step 1: checkout action - - name: Checkout target repo - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - ref: 3.0.x-devel - fetch-depth: 0 - persist-credentials: true - - # Step 2: Set git config - - name: Set git config - id: config - run: | - git config --local user.email "ricardogonzalez@eprosima.com" - git config --local user.name "richiprosima" - shell: bash - - # Step 3: Rebase - - name: Rebase current branch - id: rebase_master - run: | - git fetch origin master - git rebase origin/master - shell: bash - - # Step 4: Push - - name: Force push if required - id: push - run: | - if [ "$(git status | grep 'diverged\|ahead')" ]; then - git push -f - fi; - shell: bash diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 4fade34ade3..45245988403 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -82,38 +82,19 @@ jobs: # TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group, # which entails logout/login or rebooting the machine. This is not feasible in a CI environment. - - name: Prepare colcon workspace - id: colcon_ws_setup - run: | - # Nightly job - if [[ "${{ inputs.label }}" == *"nightly"* ]] - then - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_${{ inputs.fastdds-branch }}.repos" - if [ ! -f ${DEPENDS_REPOS_PATH} ] - then - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_2.13.x.repos" - fi - META_PATH="./src/fastrtps/.github/workflows/config/nightly.meta" - - # Either PR or manual - else - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_${{ inputs.fastdds-branch }}.repos" - if [ ! -f ${DEPENDS_REPOS_PATH} ] - then - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_2.13.x.repos" - fi - META_PATH="./src/fastrtps/.github/workflows/config/default_ci.meta" - fi - - echo "Selected repos files: ${DEPENDS_REPOS_PATH}" - cat ${DEPENDS_REPOS_PATH} - - echo "Selected metas files: ${META_PATH}" - cp ${META_PATH} ci.meta - cat ci.meta + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + destination_workspace: src + skip_existing: 'true' - # Create source dir and download the sources - vcs import src --input ${DEPENDS_REPOS_PATH} --skip-existing + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos + destination_workspace: src + skip_existing: 'true' # TODO(eduponz): There is a warning in clang >= 16 regarding enum-constexpr-conversion: # - Issue: https://github.com/boostorg/mpl/issues/69. @@ -123,7 +104,7 @@ jobs: continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/ci.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta colcon_build_args: ${{ inputs.colcon-args }} cmake_args: ${{ inputs.cmake-args }} cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wno-enum-constexpr-conversion" diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 7ea382d4972..0387d140d78 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -76,44 +76,25 @@ jobs: # TODO(eduponz): Set up libp11 and SoftHSM. NOTE: using SoftHSM requires adding the runner to a group, # which entails logout/login or rebooting the machine. This is not feasible in a CI environment. - - name: Prepare colcon workspace - id: colcon_ws_setup - run: | - # Nightly job - if [[ "${{ inputs.label }}" == *"nightly"* ]] - then - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_${{ inputs.fastdds-branch }}.repos" - if [ ! -f ${DEPENDS_REPOS_PATH} ] - then - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/nightly_master.repos" - fi - META_PATH="./src/fastrtps/.github/workflows/config/nightly.meta" - - # Either PR or manual - else - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_${{ inputs.fastdds-branch }}.repos" - if [ ! -f ${DEPENDS_REPOS_PATH} ] - then - DEPENDS_REPOS_PATH="./src/fastrtps/.github/workflows/config/default_ci_master.repos" - fi - META_PATH="./src/fastrtps/.github/workflows/config/default_ci.meta" - fi - - echo "Selected repos files: ${DEPENDS_REPOS_PATH}" - cat ${DEPENDS_REPOS_PATH} - - echo "Selected metas files: ${META_PATH}" - cp ${META_PATH} ci.meta - cat ci.meta + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + destination_workspace: src + skip_existing: 'true' - # Create source dir and download the sources - vcs import src --input ${DEPENDS_REPOS_PATH} --skip-existing + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos + destination_workspace: src + skip_existing: 'true' - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/ci.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta colcon_build_args: ${{ inputs.colcon-args }} cmake_args: ${{ inputs.cmake-args }} cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall" diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index 378feced2da..b90931be0c4 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -115,51 +115,26 @@ jobs: # Show the result gc $hostfile - - name: Prepare colcon workspace - run: | - # Get some convenient tools - Install-Module -Name ConvertBase64Strings -Force -AllowClobber - Import-Module -name ConvertBase64Strings -Prefix CI - Install-Module powershell-yaml -Force - - # Nightly job - if ("${{ inputs.label }}".Contains("nightly")) - { - $depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_${{ inputs.fastdds_branch }}.repos" - if (!(Test-Path -Path $depends_repos_path)) - { - $depends_repos_path = ".\src\fastrtps\.github\workflows\config\nightly_2.13.x.repos" - } - $meta_path = ".\src\fastrtps\.github\workflows\config\nightly.meta" - } - # Either PR or manual - else - { - $depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_${{ inputs.fastdds_branch }}.repos" - if (!(Test-Path -Path $depends_repos_path)) - { - $depends_repos_path = ".\src\fastrtps\.github\workflows\config\default_ci_2.13.x.repos" - } - $meta_path = ".\src\fastrtps\.github\workflows\config\default_ci.meta" - } - Write-Output "Selected repos files: $depends_repos_path" - Write-Output "Selected metas files: $meta_path" - - # Generate the meta file - "::group::deployed colcon.meta file" - $meta = Get-Content $meta_path | ConvertFrom-Yaml - $meta | ConvertTo-Json -Depth 3 | Tee-Object -FilePath ci.meta -Encoding OEM - "::endgroup::" + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}\src\fastrtps\fastrtps.repos + destination_workspace: src + skip_existing: 'true' - # create source dir and download the sources - vcs import src --input $depends_repos_path --skip-existing + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\ci.repos + destination_workspace: src + skip_existing: 'true' - name: Build id: build continue-on-error: false uses: eProsima/eProsima-CI/windows/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/ci.meta + colcon_meta_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\ci.meta colcon_build_args: ${{ inputs.colcon-args }} # The following Fast DDS CMake options need to be specified here instead of in the ci.meta file # because they vary from platform to platform diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 786cf2d22d1..65cef32076c 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -42,6 +42,6 @@ jobs: 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" }} + cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' + ctest-args: ${{ inputs.ctest-args || '-LE xfail' }} fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.13.x' }} diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 1cf14400d64..4d641c956dc 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -44,6 +44,6 @@ jobs: with: label: ${{ inputs.label || 'windows-ci' }} colcon-args: ${{ inputs.colcon-args }} - cmake-args: ${{ inputs.cmake-args }} + cmake-args: '-DSECURITY=ON ${{ inputs.cmake-args }}' ctest-args: ${{ inputs.ctest-args }} fastdds_branch: ${{ inputs.fastdds_branch || github.ref || '2.13.x' }}