Skip to content

Commit

Permalink
Refs #20542: Manual cherry-pick of PR #4456
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Mar 13, 2024
1 parent 51cac8e commit 5386558
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 37 deletions.
13 changes: 0 additions & 13 deletions .github/actions/install-apt-packages-documentation/action.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/config/documentation.meta
Original file line number Diff line number Diff line change
@@ -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"
96 changes: 72 additions & 24 deletions .github/workflows/documentation-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,52 @@ env:
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')) }}
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: |
Expand Down Expand Up @@ -102,25 +124,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'

0 comments on commit 5386558

Please sign in to comment.