diff --git a/.github/workflows/config/asan_colcon.meta b/.github/workflows/config/asan.meta similarity index 100% rename from .github/workflows/config/asan_colcon.meta rename to .github/workflows/config/asan.meta diff --git a/.github/workflows/config/discovery_server.meta b/.github/workflows/config/discovery_server.meta new file mode 100644 index 00000000000..89f8955e803 --- /dev/null +++ b/.github/workflows/config/discovery_server.meta @@ -0,0 +1,11 @@ +names: + fastrtps: + cmake-args: + - "-DCOMPILE_TOOLS=ON" + - "-DINSTALL_TOOLS=ON" + discovery-server: + ctest-args: [ + "--repeat", "until-pass:3", + "--timeout", "300", + "--label-exclude", "xfail" + ] diff --git a/.github/workflows/config/documentation.meta b/.github/workflows/config/documentation.meta index c0d85a3d55f..9781a11c60b 100644 --- a/.github/workflows/config/documentation.meta +++ b/.github/workflows/config/documentation.meta @@ -1,15 +1,11 @@ names: - fastrtps: - cmake-args: - - "-DBUILD_SHARED_LIBS=ON" - - "-DSECURITY=ON" - - "-DTHIRDPARTY_Asio=FORCE" - - "-DTHIRDPARTY_TinyXML2=FORCE" - - "-DTHIRDPARTY_UPDATE=OFF" fastdds-docs: cmake-args: - "-DBUILD_DOCUMENTATION=ON" - "-DCOMPILE_TESTS=ON" + ctest-args: [ + "--timeout", "500" + ] googletest-distribution: cmake-args: - "-Dgtest_force_shared_crt=ON" diff --git a/.github/workflows/config/ci.meta b/.github/workflows/config/fastdds_build.meta similarity index 51% rename from .github/workflows/config/ci.meta rename to .github/workflows/config/fastdds_build.meta index 657982f1d8a..1446b8f0589 100644 --- a/.github/workflows/config/ci.meta +++ b/.github/workflows/config/fastdds_build.meta @@ -2,27 +2,12 @@ names: fastrtps: cmake-args: - "-DBUILD_DOCUMENTATION=OFF" - - "-DBUILD_SHARED_LIBS=ON" - "-DCOMPILE_EXAMPLES=ON" - - "-DEPROSIMA_BUILD_TESTS=ON" - "-DFASTDDS_ENFORCE_LOG_INFO=ON" - - "-DFASTDDS_PIM_API_TESTS=ON" - - "-DFASTDDS_STATISTICS=ON" - - "-DFASTRTPS_API_TESTS=OFF" - - "-DGTEST_INDIVIDUAL=ON" - "-DINSTALL_EXAMPLES=ON" - - "-DINSTALL_TOOLS=ON" - "-DINTERNAL_DEBUG=ON" - "-DNO_TLS=OFF" - - "-DPERFORMANCE_TESTS=ON" - - "-DPROFILING_TESTS=OFF" - "-DSHM_TRANSPORT_DEFAULT=ON" - "-DSTRICT_REALTIME=OFF" - - "-DSYSTEM_TESTS=ON" - "-DMEMORYCHECK_COMMAND_OPTIONS=-q --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --log-fd=2 --error-exitcode=1" - "-DMEMORYCHECK_SUPPRESSIONS_FILE=../../src/fastrtps/valgrind.supp" - googletest-distribution: - cmake-args: - - "-Dgtest_force_shared_crt=ON" - - "-DBUILD_SHARED_LIBS=ON" - - "-DBUILD_GMOCK=ON" diff --git a/.github/workflows/config/fastdds_test.meta b/.github/workflows/config/fastdds_test.meta new file mode 100644 index 00000000000..49ece874c81 --- /dev/null +++ b/.github/workflows/config/fastdds_test.meta @@ -0,0 +1,19 @@ +names: + fastrtps: + cmake-args: + - "-DEPROSIMA_BUILD_TESTS=ON" + - "-DFASTDDS_PIM_API_TESTS=ON" + - "-DPERFORMANCE_TESTS=ON" + - "-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" + - "-DBUILD_SHARED_LIBS=ON" + - "-DBUILD_GMOCK=ON" diff --git a/.github/workflows/config/ci.repos b/.github/workflows/config/fastdds_test.repos similarity index 100% rename from .github/workflows/config/ci.repos rename to .github/workflows/config/fastdds_test.repos diff --git a/.github/workflows/config/python_test.meta b/.github/workflows/config/python_test.meta new file mode 100644 index 00000000000..fc086118b84 --- /dev/null +++ b/.github/workflows/config/python_test.meta @@ -0,0 +1,15 @@ +names: + fastdds_python: + cmake-args: + - "-DBUILD_TESTING=ON" + - "-DBUILD_DOCUMENTATION=ON" + ctest-args: [ + "--repeat", "until-pass:3", + "--timeout", "300", + "--label-exclude", "xfail" + ] + googletest-distribution: + cmake-args: + - "-Dgtest_force_shared_crt=ON" + - "-DBUILD_SHARED_LIBS=ON" + - "-DBUILD_GMOCK=ON" diff --git a/.github/workflows/config/tsan_colcon.meta b/.github/workflows/config/tsan.meta similarity index 100% rename from .github/workflows/config/tsan_colcon.meta rename to .github/workflows/config/tsan.meta diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml deleted file mode 100644 index dbb12f71578..00000000000 --- a/.github/workflows/documentation-tests.yaml +++ /dev/null @@ -1,159 +0,0 @@ -name: Documentation build and test -on: - workflow_dispatch: - inputs: - fastdds_docs_branch: - description: 'Fast DDS Docs branch' - required: true - type: string - fastdds_python_branch: - description: 'Fast DDS Python branch' - required: true - type: string - - 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-build-and-test-documentation: - name: Documentation build and test - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - - runs-on: ubuntu-22.04 - steps: - - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} - uses: eProsima/eProsima-CI/external/add_labels@v0 - with: - labels: ci-pending - number: ${{ github.event.number }} - repo: eProsima/Fast-DDS - - - name: Sync eProsima/Fast-DDS repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src/fastrtps - submodules: true - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - with: - api_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Install apt dependencies - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep wget libssl-dev doxygen imagemagick plantuml - update: false - upgrade: false - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0 - with: - packages: vcstool - upgrade: false - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Download Fast DDS .repos - uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 - with: - vcs_repos_file: ./src/fastrtps/fastrtps.repos - destination_workspace: src - skip_existing: 'true' - - - 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: Get Fast DDS Python branch - id: get_fastdds_python_branch - uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 - with: - remote_repository: eProsima/Fast-DDS-python - fallback_branch: ${{ inputs.fastdds_python_branch || '1.2.x' }} - - - name: Download Fast DDS Python repo - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - repository: eProsima/Fast-DDS-python - path: src/fastdds-python - ref: ${{ steps.get_fastdds_python_branch.outputs.deduced_branch }} - - - name: Get Fast DDS Docs branch - id: get_fastdds_docs_branch - uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 - with: - remote_repository: eProsima/Fast-DDS-docs - fallback_branch: ${{ inputs.fastdds_docs_branch || '2.10.x' }} - - - name: Download Fast DDS documentation repo - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - repository: eProsima/Fast-DDS-docs - path: src/fastdds-docs - ref: ${{ steps.get_fastdds_docs_branch.outputs.deduced_branch }} - - - name: Install Fast DDS Docs required python packages - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - upgrade: false - requirements_file_name: src/fastdds-docs/docs/requirements.txt - - - name: Colcon build - continue-on-error: false - uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 - with: - colcon_meta_file: './src/fastrtps/.github/workflows/config/documentation.meta' - colcon_build_args: '' - colcon_build_args_default: '' - cmake_args: '' - cmake_args_default: '' - cmake_build_type: Release - workspace: ${{ github.workspace }} - workspace_dependencies: '' - - - name: Colcon test - id: test - if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }} - uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 - with: - colcon_test_args: '' - colcon_test_args_default: --event-handlers=console_direct+ - ctest_args: '' - ctest_args_default: '' - packages_names: fastdds-docs - workspace: ${{ github.workspace }} - workspace_dependencies: '' - test_report_artifact: ${{ format('test_report_{0}', github.job, join(matrix.*, '_')) }} - - - name: Test summary - uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 - if: ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }} - with: - junit_reports_dir: "${{ steps.test.outputs.ctest_results_path }}" - print_summary: 'True' - show_failed: 'True' - show_disabled: 'False' - show_skipped: 'False' diff --git a/.github/workflows/reusable-mac-ci.yml b/.github/workflows/reusable-mac-ci.yml index 2177e4b2079..c4c2a3f267a 100644 --- a/.github/workflows/reusable-mac-ci.yml +++ b/.github/workflows/reusable-mac-ci.yml @@ -37,7 +37,6 @@ jobs: # so we'll use that one for now, as clang 15 is the supported compiler for Fast DDS in macOS. # (see https://github.com/eProsima/Fast-DDS/blob/master/PLATFORM_SUPPORT.md#compilers) runs-on: macos-13 - if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} strategy: fail-fast: false matrix: @@ -113,7 +112,7 @@ jobs: - 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 + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.repos destination_workspace: src skip_existing: 'true' @@ -125,7 +124,7 @@ jobs: continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta colcon_build_args: ${{ inputs.colcon-args }} cmake_args: ${{ inputs.cmake-args }} cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wno-enum-constexpr-conversion" @@ -137,10 +136,10 @@ jobs: if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }} uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta colcon_test_args: ${{ inputs.colcon-args }} colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} - ctest_args_default: --repeat until-pass:3 --timeout 300 --label-exclude "xfail" packages_names: fastrtps workspace: ${{ github.workspace }} test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index 883a94143ce..b02c856903d 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -52,12 +52,7 @@ defaults: jobs: asan_fastdds_build: - 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') && - (inputs.run_asan_fastdds == true) - ) }} + if: ${{ inputs.run_asan_fastdds == true }} runs-on: ubuntu-22.04 steps: - name: Add ci-pending label if PR @@ -114,13 +109,13 @@ jobs: - name: Show .meta file id: show_meta run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.meta colcon_build_args: ${{ inputs.colcon_build_args }} cmake_args: ${{ inputs.cmake_args }} cmake_args_default: '' @@ -182,13 +177,13 @@ jobs: - name: Show .meta file id: show_meta run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.meta colcon_build_args: ${{ inputs.colcon_build_args }} cmake_args: ${{ inputs.cmake_args }} cmake_args_default: -DEPROSIMA_BUILD_TESTS=ON -DGTEST_INDIVIDUAL=ON -DRTPS_API_TESTS=ON -DFASTRTPS_API_TESTS=ON -DFASTDDS_PIM_API_TESTS=ON -DPERFORMANCE_TESTS=ON @@ -197,7 +192,7 @@ jobs: workspace_dependencies: '' - name: Colcon test - if: ${{ inputs.run_asan_fastdds }} + if: ${{ inputs.run_asan_fastdds == true }} id: test continue-on-error: true uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 @@ -212,7 +207,7 @@ jobs: test_report_artifact: ${{ format('test_report_{0}_{1}', inputs.label, github.job) }} - name: Report sanitizer errors - if: ${{ inputs.run_asan_fastdds }} + if: ${{ inputs.run_asan_fastdds == true }} run: | bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ "==ERROR:" \ @@ -226,12 +221,7 @@ jobs: --sanitizer asan asan_discovery_server_test: - 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') && - (inputs.run_asan_discovery_server == true) - ) }} + if: ${{ inputs.run_asan_discovery_server == true }} needs: asan_fastdds_build runs-on: ubuntu-22.04 steps: @@ -281,13 +271,13 @@ jobs: - name: Show .meta file id: show_meta run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.meta colcon_build_args: ${{ inputs.colcon_build_args }} cmake_args: ${{ inputs.cmake_args }} cmake_args_default: '' @@ -296,7 +286,7 @@ jobs: workspace_dependencies: '' - name: Colcon test - if: ${{ inputs.run_asan_fastdds }} + if: ${{ inputs.run_asan_fastdds == true }} id: test continue-on-error: true uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 @@ -311,7 +301,7 @@ jobs: test_report_artifact: ${{ format('test_report_{0}_{1}', inputs.label, github.job) }} - name: Report sanitizer errors - if: ${{ inputs.run_asan_discovery_server }} + if: ${{ inputs.run_asan_discovery_server == true }} run: | bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ "==ERROR:" \ @@ -325,12 +315,7 @@ jobs: --sanitizer=asan tsan_fastdds_test: - 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') && - (inputs.run_tsan_fastdds == true) - ) }} + if: ${{ inputs.run_tsan_fastdds == true }} runs-on: ubuntu-22.04 env: TSAN_OPTIONS: second_deadlock_stack=1 history_size=7 memory_limit_mb=5000 @@ -398,20 +383,20 @@ jobs: - 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 + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.repos destination_workspace: src skip_existing: 'true' - name: Show .meta file id: show_meta run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan.meta colcon_build_args: ${{ inputs.colcon_build_args }} cmake_args: ${{ inputs.cmake_args }} cmake_args_default: '' @@ -420,7 +405,7 @@ jobs: workspace_dependencies: '' - name: Colcon test - if: ${{ inputs.run_asan_fastdds }} + if: ${{ inputs.run_asan_fastdds == true }} id: test continue-on-error: true uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 49207f58f05..2862c4cc534 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -27,15 +27,32 @@ on: description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' required: true type: string + security: + description: 'Enable security features' + required: false + type: boolean + default: true + run-tests: + description: 'Run test suite 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 +env: + security-cmake-flag: ${{ inputs.security == true && '-DSECURITY=ON' || '-DSECURITY=OFF' }} + colcon-build-default-cmake-args: '-DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic -Wunused-value -Woverloaded-virtual"' defaults: run: shell: bash jobs: - reusable-ubuntu-ci: + fastdds_build: runs-on: ${{ inputs.os-image }} - if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} strategy: fail-fast: false matrix: @@ -84,6 +101,79 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + + - 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' + + # Compiling Fast DDS tools has a problem with the symbolic link when the artifact is uploaded + # and downloaded, as it loses its permissions and then the tests fail. To work around this issue, + # we disable the compilation of the tools here and enable it in the Fast DDS test job. + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '-DCOMPILE_TOOLS=OFF ${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Upload build artifacts + uses: eProsima/eProsima-CI/external/upload-artifact@v0 + with: + name: fastdds_build_${{ inputs.label }} + path: ${{ github.workspace }} + + fastdds_test: + needs: fastdds_build + runs-on: ${{ inputs.os-image }} + if: ${{ inputs.run-tests == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} with: api_token: ${{ secrets.GITHUB_TOKEN }} @@ -102,20 +192,359 @@ 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: Fetch Fast DDS dependencies + - name: Fetch Fast DDS CI dependencies uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.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 }}/src/fastrtps/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: '${{ env.colcon-build-default-cmake-args }} -DFASTDDS_EXAMPLE_TESTS=ON' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Colcon test + id: test + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.meta + colcon_test_args: ${{ inputs.colcon-args }} + colcon_test_args_default: --event-handlers=console_direct+ + ctest_args: ${{ inputs.ctest-args }} + packages_names: fastrtps + workspace: ${{ github.workspace }} + test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} + + - name: Fast DDS test summary + uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 + if: ${{ !cancelled() }} + with: + junit_reports_dir: "${{ steps.test.outputs.ctest_results_path }}" + print_summary: 'True' + show_failed: 'True' + show_disabled: 'False' + show_skipped: 'False' + + fastdds_python_build: + needs: fastdds_build + runs-on: ${{ inputs.os-image }} + if: ${{ inputs.security == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev swig + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Fast DDS Python branch + id: get_fastdds_python_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Fast-DDS-python + fallback_branch: main + + - name: Download Fast DDS Python repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Fast-DDS-python + path: src/fastdds-python + ref: ${{ steps.get_fastdds_python_branch.outputs.deduced_branch }} + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: '' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Upload python build artifacts + uses: eProsima/eProsima-CI/external/upload-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + fastdds_python_test: + needs: fastdds_python_build + runs-on: ${{ inputs.os-image }} + if: ${{ inputs.security == true && inputs.run-tests == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download python build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev swig + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - 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/fastdds_test.repos + destination_workspace: src + skip_existing: 'true' + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastrtps/.github/workflows/config/python_test.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: '' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Colcon test + id: python_test + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/python_test.meta + colcon_test_args: ${{ inputs.colcon-args }} + colcon_test_args_default: --event-handlers=console_direct+ + ctest_args: ${{ inputs.ctest-args }} + packages_names: fastdds_python + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} + + - name: Fast DDS Python test summary + uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 + if: ${{ !cancelled() }} + with: + junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}" + print_summary: 'True' + show_failed: 'True' + show_disabled: 'False' + show_skipped: 'False' + + fastdds_docs_test: + needs: fastdds_python_build + runs-on: ${{ inputs.os-image }} + if: ${{ inputs.security == true }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download python build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_python_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen imagemagick plantuml + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Fast DDS Docs branch + id: get_fastdds_docs_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Fast-DDS-docs + fallback_branch: '2.10.x' + + - name: Download Fast DDS documentation repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Fast-DDS-docs + path: src/fastdds-docs + ref: ${{ steps.get_fastdds_docs_branch.outputs.deduced_branch }} + - name: Fetch Fast DDS CI dependencies + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_test.repos destination_workspace: src skip_existing: 'true' + - name: Install Fast DDS Docs required python packages + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + upgrade: false + requirements_file_name: src/fastdds-docs/docs/requirements.txt + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastrtps/.github/workflows/config/documentation.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Colcon test + id: docs_test + if: ${{ inputs.run-tests == true }} + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/documentation.meta + colcon_test_args: ${{ inputs.colcon-args }} + colcon_test_args_default: --event-handlers=console_direct+ + ctest_args: ${{ inputs.ctest-args }} + packages_names: fastdds-docs + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} + + - name: Fast DDS Docs test summary + uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 + if: ${{ !cancelled() && inputs.run-tests == true }} + with: + junit_reports_dir: "${{ steps.docs_test.outputs.ctest_results_path }}" + print_summary: 'True' + show_failed: 'True' + show_disabled: 'False' + show_skipped: 'False' + + fastdds_shapesdemo_build: + needs: fastdds_build + runs-on: ${{ inputs.os-image }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + # Get Shapes Demo to make sure it keeps compiling - name: Get Shapes Demo branch id: get_shapes_demo_branch @@ -146,32 +575,228 @@ jobs: continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta colcon_build_args: ${{ inputs.colcon-args }} - cmake_args: ${{ inputs.cmake-args }} - cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic -Wunused-value -Woverloaded-virtual" -DFASTDDS_EXAMPLE_TESTS=ON + cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + fastdds_discovery_server_test: + needs: fastdds_build + runs-on: ${{ inputs.os-image }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: fastdds_build_${{ inputs.label }} + path: ${{ github.workspace }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema xmltodict==0.13.0 jsondiff==2.0.0 pandas==1.5.2 + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Get Discovery Server branch + id: get_discovery_server_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Discovery-Server + fallback_branch: 'v1.2.1' + + - name: Download Discovery Server repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Discovery-Server + path: src/discovery_server + ref: ${{ steps.get_discovery_server_branch.outputs.deduced_branch }} + + - 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/fastdds_test.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 }}/src/fastrtps/.github/workflows/config/fastdds_build.meta ${{ github.workspace }}/src/fastrtps/.github/workflows/config/discovery_server.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} cmake_build_type: ${{ matrix.cmake-build-type }} workspace: ${{ github.workspace }} - name: Colcon test - id: test - if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }} + id: discovery_server_test + if: ${{ inputs.run-tests == true }} uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/discovery_server.meta colcon_test_args: ${{ inputs.colcon-args }} colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} - ctest_args_default: --repeat until-pass:3 --timeout 300 --label-exclude "xfail" - packages_names: fastrtps + packages_names: discovery-server workspace: ${{ github.workspace }} + workspace_dependencies: '' test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} - - name: Test summary + - name: Discovery server test summary uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0 - if: ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }} + if: ${{ !cancelled() && inputs.run-tests == true }} with: - junit_reports_dir: "${{ steps.test.outputs.ctest_results_path }}" + junit_reports_dir: "${{ steps.discovery_server_test.outputs.ctest_results_path }}" print_summary: 'True' show_failed: 'True' show_disabled: 'False' show_skipped: 'False' + + fastdds_alternative_builds: + runs-on: ${{ inputs.os-image }} + strategy: + fail-fast: false + matrix: + cmake-build-type: + - 'RelWithDebInfo' + steps: + - name: Sync eProsima/Fast-DDS repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastrtps + ref: ${{ inputs.fastdds-branch }} + + - name: Install Fix Python version + uses: eProsima/eProsima-CI/external/setup-python@v0 + with: + python-version: '3.11' + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt dependencies + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: libasio-dev libtinyxml2-dev libssl-dev + update: false + upgrade: false + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0 + with: + packages: vcstool xmlschema + upgrade: false + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + if: ${{ inputs.use-ccache == true }} + with: + api_token: ${{ secrets.GITHUB_TOKEN }} + + - 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' + + - name: No security colcon build + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '-DSECURITY=OFF ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Clean workspace - No security + if: ${{ always() }} + run: | + cd ${{ github.workspace }} + rm -rf build install log + + - name: No statistics colcon build + continue-on-error: true + if: ${{ always() }} + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '-DFASTDDS_STATISTICS=OFF ${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Clean workspace - No statistics + if: ${{ always() }} + run: | + cd ${{ github.workspace }} + rm -rf build install log + + # No .metas file, so FASTDDS_ENFORCE_LOG_INFO is set OFF by default. Missed important args are manually included + - name: No enforcing log info colcon build + continue-on-error: true + if: ${{ always() }} + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: '' + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '-DCOMPILE_EXAMPLES=ON ${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} + + - name: Clean workspace - No enforce log info + if: ${{ always() }} + run: | + cd ${{ github.workspace }} + rm -rf build install log + + - name: No shared libs colcon build + continue-on-error: true + if: ${{ always() }} + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/fastdds_build.meta + colcon_build_args: ${{ inputs.colcon-args }} + cmake_args: '-DBUILD_SHARED_LIBS=OFF ${{ env.security-cmake-flag }} ${{ inputs.cmake-args }}' + cmake_args_default: ${{ env.colcon-build-default-cmake-args }} + cmake_build_type: ${{ matrix.cmake-build-type }} + workspace: ${{ github.workspace }} diff --git a/.github/workflows/reusable-windows-ci.yml b/.github/workflows/reusable-windows-ci.yml index a473dfefe5c..779f81d40dd 100644 --- a/.github/workflows/reusable-windows-ci.yml +++ b/.github/workflows/reusable-windows-ci.yml @@ -31,7 +31,6 @@ defaults: jobs: reusable-windows-ci: runs-on: windows-2019 - if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} strategy: fail-fast: false matrix: @@ -138,18 +137,36 @@ jobs: - 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 + vcs_repos_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_test.repos destination_workspace: src skip_existing: 'true' + - name: Prepare build meta file + run: | + $build_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build.meta' + $test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_test.meta' + $build_test_meta_file = '${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build_test.meta' + + # Read the content of the build meta file + $build_meta_content = Get-Content -Path $build_meta_file + + # Read the content of the test meta file, starting from line 4 (skipping "name" line [1], cmake project name line [2] and "cmake-args" line [3]) + $test_meta_content = Get-Content -Path $test_meta_file | Select-Object -Skip 3 + + # Combine the content of the build meta file and the test meta file + $combined_content = $build_meta_content + $test_meta_content + + # Write the combined content to the build test meta file + $combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8 + - name: Build id: build continue-on-error: false uses: eProsima/eProsima-CI/windows/colcon_build@v0 with: - colcon_meta_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\ci.meta + colcon_meta_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_build_test.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 + # The following Fast DDS CMake options need to be specified here instead of in the meta files # because they vary from platform to platform cmake_args_default: ${{ inputs.cmake-args }} -T ${{ matrix.vs-toolset }} -DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX" cmake_build_type: ${{ matrix.cmake-config }} @@ -160,10 +177,10 @@ jobs: id: test uses: eProsima/eProsima-CI/windows/colcon_test@v0 with: + colcon_meta_file: ${{ github.workspace }}\src\fastrtps\.github\workflows\config\fastdds_test.meta colcon_test_args: ${{ inputs.colcon-args }} colcon_test_args_default: --event-handlers=console_direct+ ctest_args: ${{ inputs.ctest-args }} - ctest_args_default: --repeat until-pass:3 --timeout 300 --label-exclude "xfail" packages_names: fastrtps workspace: ${{ github.workspace }} test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }} diff --git a/.github/workflows/sanitizers-ci.yml b/.github/workflows/sanitizers-ci.yml index 7ef73041e93..0c0773fe870 100644 --- a/.github/workflows/sanitizers-ci.yml +++ b/.github/workflows/sanitizers-ci.yml @@ -66,9 +66,9 @@ jobs: uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} - run_asan_fastdds: ${{ inputs.run_asan_fastdds || github.event_name == 'pull_request' }} - run_asan_discovery_server: ${{ inputs.run_asan_discovery_server || github.event_name == 'pull_request' }} - run_tsan_fastdds: ${{ inputs.run_tsan_fastdds || github.event_name == 'pull_request' }} + 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 || '' }} diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index 9923da46e92..8a0391c5f79 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -23,6 +23,21 @@ on: 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: @@ -39,21 +54,20 @@ concurrency: jobs: ubuntu-ci: - strategy: - fail-fast: false - matrix: - os-image: - - 'ubuntu-22.04' - 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: - os-image: ${{ matrix.os-image }} + # 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: '-DSECURITY=ON ${{ inputs.cmake-args }}' + cmake-args: ${{ inputs.cmake-args }} ctest-args: ${{ inputs.ctest-args || '-LE xfail' }} fastdds-branch: ${{ inputs.fastdds_branch || github.ref || '2.10.x' }} + 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 }}