From 61042dede590023ab6f3af28d213264a19ca9cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Poderoso?= <120394830+JesusPoderoso@users.noreply.github.com> Date: Thu, 29 Feb 2024 08:04:10 +0100 Subject: [PATCH 1/2] Fix CI documentation workflow label triggering (#4456) * Refs #20529: Fix documentation workflow label triggering Signed-off-by: JesusPoderoso * Refs #20529: Refactor documentation-tests workflow to use eProsima-CI Signed-off-by: EduPonz * Refs #20529: Add workspace to colcon_build and colcon_test actions Signed-off-by: EduPonz * Refs #20529: Set eProsima-CI actions to v0 Signed-off-by: EduPonz * Refs #20529: Add .meta and specify all colcon action args Signed-off-by: EduPonz --------- Signed-off-by: JesusPoderoso Signed-off-by: EduPonz Co-authored-by: EduPonz (cherry picked from commit c4dbe83ebbf15aec091cdcb4186f8446ce2e0879) --- .../action.yml | 13 --- .github/workflows/config/documentation.meta | 17 ++++ .github/workflows/documentation-tests.yaml | 97 ++++++++++++++----- 3 files changed, 89 insertions(+), 38 deletions(-) delete mode 100644 .github/actions/install-apt-packages-documentation/action.yml create mode 100644 .github/workflows/config/documentation.meta diff --git a/.github/actions/install-apt-packages-documentation/action.yml b/.github/actions/install-apt-packages-documentation/action.yml deleted file mode 100644 index 689a081a7fd..00000000000 --- a/.github/actions/install-apt-packages-documentation/action.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: 'install-apt-packages-documentation' -description: 'Install necessary apt packages for building documentation' -runs: - using: "composite" - steps: - - id: install-apt-packages-documentation - run: | - sudo apt-get update - sudo apt-get -y install \ - doxygen \ - imagemagick \ - plantuml - shell: bash diff --git a/.github/workflows/config/documentation.meta b/.github/workflows/config/documentation.meta new file mode 100644 index 00000000000..c0d85a3d55f --- /dev/null +++ b/.github/workflows/config/documentation.meta @@ -0,0 +1,17 @@ +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" + googletest-distribution: + cmake-args: + - "-Dgtest_force_shared_crt=ON" + - "-DBUILD_SHARED_LIBS=ON" + - "-DBUILD_GMOCK=ON" diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml index 62a7f9ea133..0154b09a947 100644 --- a/.github/workflows/documentation-tests.yaml +++ b/.github/workflows/documentation-tests.yaml @@ -34,31 +34,52 @@ env: jobs: ubuntu-build-and-test-documentation: name: Documentation build and test - - if: ${{ !(contains(github.event.pull_request.labels.*.name, 'no-test') || - contains(github.event.pull_request.labels.*.name, 'skip-ci')) }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} runs-on: ubuntu-22.04 steps: - name: Sync eProsima/Fast-DDS repository - uses: actions/checkout@v3 + uses: eProsima/eProsima-CI/external/checkout@v0 with: path: src/fastrtps submodules: true - - name: Install Fast DDS packages - uses: ./src/fastrtps/.github/actions/install-apt-packages - - - name: Install documentation packages - uses: ./src/fastrtps/.github/actions/install-apt-packages-documentation + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.20.6' - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - name: Download FastDDS dependencies - run: | - pip3 install vcstool - vcs import --skip-existing src < ./src/fastrtps/fastrtps.repos + - 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 GTest + uses: eProsima/eProsima-CI/multiplatform/install_gtest@v0 + with: + cmake_build_type: Release + version: release-1.11.0 + + - 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: Determine the Fast DDS Documentation branch to be used run: | @@ -111,25 +132,51 @@ jobs: fi - name: Download FastDDS documentation repo - uses: actions/checkout@v4 + uses: eProsima/eProsima-CI/external/checkout@v0 with: repository: eProsima/Fast-DDS-docs path: src/fastdds-docs ref: ${{ env.ACTION_BRANCH_NAME }} - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install required python packages + - 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: Build documentation - run: | - colcon build --event-handlers=console_direct+ --metas - - - name: Run documentation tests - run: | - colcon test --event-handlers=console_direct+ --packages-select fastdds-docs --return-code-on-test-failure + - 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' From 2d46a086c9ac85fb14cf3a493be61a170a0d0513 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Thu, 29 Feb 2024 11:51:59 +0100 Subject: [PATCH 2/2] Refs #20529: Fix workflow to be triggered on all supported versions Signed-off-by: JesusPoderoso --- .github/workflows/documentation-tests.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/documentation-tests.yaml b/.github/workflows/documentation-tests.yaml index 0154b09a947..2b8db923cd1 100644 --- a/.github/workflows/documentation-tests.yaml +++ b/.github/workflows/documentation-tests.yaml @@ -11,6 +11,10 @@ on: push: branches: - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' paths-ignore: - '**.md' - '**.txt' @@ -19,6 +23,10 @@ on: pull_request: branches: - 'master' + - '2.13.x' + - '2.12.x' + - '2.10.x' + - '2.6.x' paths-ignore: - '**.md' - '**.txt'