Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2a03c6b

Browse files
committedJul 1, 2024·
Migrate Fast DDS Docs CI to Github (#831)
* Refs #21256: Add GitHub Ubuntu CI Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21256: Add Discovery server to the list of related products Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21256: Add RELEASE_SUPPORT.md file Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21256: Apply rev suggestions Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> --------- Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> (cherry picked from commit 2266b1a)
1 parent c94b258 commit 2a03c6b

File tree

6 files changed

+310
-0
lines changed

6 files changed

+310
-0
lines changed
 

‎.github/workflows/config/build.meta

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
names:
2+
fastdds-docs:
3+
cmake-args:
4+
- "-DBUILD_DOCUMENTATION=ON"
5+
fastrtps:
6+
cmake-args:
7+
- "-DBUILD_DOCUMENTATION=ON"
8+
- "-DSECURITY=ON"
9+
fastdds_python:
10+
cmake-args:
11+
- "-DBUILD_DOCUMENTATION=ON"

‎.github/workflows/config/test.meta

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
names:
2+
fastdds-docs:
3+
cmake-args:
4+
- "-DCOMPILE_TESTS=ON"
5+
ctest-args: [
6+
"--timeout", "500"
7+
]
8+
googletest-distribution:
9+
cmake-args:
10+
- "-Dgtest_force_shared_crt=ON"
11+
- "-DBUILD_SHARED_LIBS=ON"
12+
- "-DBUILD_GMOCK=ON"

‎.github/workflows/config/test.repos

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repositories:
2+
googletest-distribution:
3+
type: git
4+
url: https://github.com/google/googletest.git
5+
version: release-1.11.0
+198
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
name: Fast DDS Docs Ubuntu CI reusable workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os-version:
7+
description: 'The OS image for the workflow'
8+
required: false
9+
default: 'ubuntu-22.04'
10+
type: string
11+
label:
12+
description: 'ID associated to the workflow'
13+
required: true
14+
type: string
15+
colcon-args:
16+
description: 'Extra arguments for colcon cli'
17+
required: false
18+
type: string
19+
cmake-args:
20+
description: 'Extra arguments for cmake cli'
21+
required: false
22+
type: string
23+
ctest-args:
24+
description: 'Extra arguments for ctest cli'
25+
required: false
26+
type: string
27+
fastdds-docs-branch:
28+
description: 'Branch or tag of Fast DDS Docs repository'
29+
required: true
30+
type: string
31+
fastdds-branch:
32+
description: 'Branch or tag of Fast DDS repository'
33+
required: true
34+
type: string
35+
fastdds-python-branch:
36+
description: 'Branch or tag of Fast DDS Python repository'
37+
required: true
38+
type: string
39+
run-build:
40+
description: 'Build Fast DDS Docs (CI skipped otherwise)'
41+
required: false
42+
type: boolean
43+
default: true
44+
run-tests:
45+
description: 'Run test suite of Fast DDS Docs'
46+
required: false
47+
type: boolean
48+
default: true
49+
use-ccache:
50+
description: 'Use CCache to speed up the build'
51+
required: false
52+
type: boolean
53+
default: false
54+
env:
55+
build-meta: ${{ inputs.run-tests == true && './src/fastdds-docs/.github/workflows/config/build.meta ./src/fastdds-docs/.github/workflows/config/test.meta' || './src/fastdds-docs/.github/workflows/config/build.meta' }}
56+
defaults:
57+
run:
58+
shell: bash
59+
60+
jobs:
61+
reusable-ubuntu-ci:
62+
runs-on: ${{ inputs.os-version }}
63+
if: ${{ inputs.run-build == true }}
64+
strategy:
65+
fail-fast: false
66+
matrix:
67+
cmake-build-type:
68+
- 'RelWithDebInfo'
69+
steps:
70+
- name: Add ci-pending label if PR
71+
if: ${{ github.event_name == 'pull_request' }}
72+
uses: eProsima/eProsima-CI/external/add_labels@v0
73+
with:
74+
labels: ci-pending
75+
number: ${{ github.event.number }}
76+
repo: eProsima/Fast-DDS-docs
77+
78+
- name: Sync eProsima/Fast-DDS-docs repository
79+
uses: eProsima/eProsima-CI/external/checkout@v0
80+
with:
81+
path: src/fastdds-docs
82+
ref: ${{ inputs.fastdds-docs-branch }}
83+
84+
- name: Install Fix Python version
85+
uses: eProsima/eProsima-CI/external/setup-python@v0
86+
with:
87+
python-version: '3.11'
88+
89+
- name: Get minimum supported version of CMake
90+
uses: eProsima/eProsima-CI/external/get-cmake@v0
91+
with:
92+
cmakeVersion: '3.22.6'
93+
94+
- name: Install apt dependencies
95+
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
96+
with:
97+
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen imagemagick plantuml
98+
update: false
99+
upgrade: false
100+
101+
- name: Install colcon
102+
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
103+
104+
- name: Install Python dependencies
105+
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
106+
with:
107+
packages: vcstool xmlschema
108+
upgrade: false
109+
110+
- name: Install Fast DDS Docs required python packages
111+
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
112+
with:
113+
upgrade: false
114+
requirements_file_name: src/fastdds-docs/docs/requirements.txt
115+
116+
- name: Setup CCache
117+
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
118+
if: ${{ inputs.use-ccache == true }}
119+
with:
120+
api_token: ${{ secrets.GITHUB_TOKEN }}
121+
122+
- name: Get Fast DDS branch
123+
id: get_fastdds_branch
124+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
125+
with:
126+
remote_repository: eProsima/Fast-DDS
127+
fallback_branch: ${{ inputs.fastdds-branch }}
128+
129+
- name: Obtain Fast DDS dependencies
130+
uses: eProsima/eProsima-CI/multiplatform/get_file_from_repo@v0
131+
with:
132+
source_repository_branch: ${{ steps.get_fastdds_branch.outputs.deduced_branch }}
133+
source_repository: eProsima/Fast-DDS
134+
file_name: fastrtps.repos
135+
file_result: ${{ github.workspace }}/fastrtps.repos
136+
137+
- name: Fetch Fast DDS dependencies
138+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
139+
with:
140+
vcs_repos_file: ${{ github.workspace }}/fastrtps.repos
141+
destination_workspace: src
142+
skip_existing: 'true'
143+
144+
- name: Get Fast DDS Python branch
145+
id: get_fastdds_python_branch
146+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
147+
with:
148+
remote_repository: eProsima/Fast-DDS-python
149+
fallback_branch: ${{ inputs.fastdds-python-branch }}
150+
151+
- name: Obtain Fast DDS Python dependencies
152+
uses: eProsima/eProsima-CI/external/checkout@v0
153+
with:
154+
path: src/fastdds_python
155+
repository: eProsima/Fast-DDS-python
156+
ref: ${{ steps.get_fastdds_python_branch.outputs.deduced_branch }}
157+
158+
- name: Fetch Fast DDS Docs CI dependencies
159+
if: ${{ inputs.run-tests == true }}
160+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
161+
with:
162+
vcs_repos_file: ${{ github.workspace }}/src/fastdds-docs/.github/workflows/config/test.repos
163+
destination_workspace: src
164+
skip_existing: 'true'
165+
166+
- name: Colcon build
167+
continue-on-error: false
168+
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
169+
with:
170+
colcon_meta_file: ${{ env.build-meta }}
171+
colcon_build_args: ${{ inputs.colcon-args }}
172+
cmake_args: ${{ inputs.cmake-args }}
173+
cmake_build_type: ${{ matrix.cmake-build-type }}
174+
workspace: ${{ github.workspace }}
175+
176+
- name: Colcon test
177+
if: ${{ inputs.run-tests == true }}
178+
id: fastdds_docs_test
179+
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
180+
with:
181+
colcon_meta_file: ${{ github.workspace }}/src/fastdds-docs/.github/workflows/config/test.meta
182+
colcon_test_args: ${{ inputs.colcon-args }}
183+
colcon_test_args_default: --event-handlers=console_direct+
184+
ctest_args: ${{ inputs.ctest-args }}
185+
packages_names: fastdds-docs
186+
workspace: ${{ github.workspace }}
187+
workspace_dependencies: ''
188+
test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}
189+
190+
- name: Fast DDS Docs test summary
191+
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
192+
if: ${{ !cancelled() && inputs.run-tests == true }}
193+
with:
194+
junit_reports_dir: "${{ steps.fastdds_docs_test.outputs.ctest_results_path }}"
195+
print_summary: 'True'
196+
show_failed: 'True'
197+
show_disabled: 'False'
198+
show_skipped: 'False'

‎.github/workflows/ubuntu-ci.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
name: Fast DDS Docs Ubuntu CI
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
os-version:
8+
description: 'OS version to run the workflow'
9+
required: false
10+
default: 'ubuntu-20.04'
11+
type: string
12+
colcon-args:
13+
description: 'Extra arguments for colcon cli'
14+
required: false
15+
type: string
16+
cmake-args:
17+
description: 'Extra arguments for cmake cli'
18+
required: false
19+
type: string
20+
ctest-args:
21+
description: 'Extra arguments for ctest cli'
22+
required: false
23+
type: string
24+
fastdds-docs-branch:
25+
description: 'Branch or tag of Fast DDS Docs repository'
26+
type: string
27+
required: true
28+
fastdds-branch:
29+
description: 'Branch or tag of Fast DDS repository'
30+
type: string
31+
required: true
32+
fastdds-python-branch:
33+
description: 'Branch or tag of Fast DDS Python repository'
34+
required: true
35+
type: string
36+
run-tests:
37+
description: 'Run test suite of Fast DDS Docs'
38+
required: false
39+
type: boolean
40+
default: true
41+
use-ccache:
42+
description: 'Use CCache to speed up the build'
43+
required: false
44+
type: boolean
45+
default: false
46+
47+
pull_request:
48+
types:
49+
- review_requested
50+
paths-ignore:
51+
- '**.md'
52+
- '**.txt'
53+
- '!**/CMakeLists.txt'
54+
55+
concurrency:
56+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
57+
cancel-in-progress: true
58+
59+
jobs:
60+
ubuntu-ci:
61+
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
62+
uses: ./.github/workflows/reusable-ubuntu-ci.yml
63+
with:
64+
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
65+
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
66+
os-version: ${{ inputs.os-version || 'ubuntu-20.04' }}
67+
label: 'ubuntu-ci-2.6.x-1.0.x'
68+
colcon-args: ${{ inputs.colcon-args }}
69+
cmake-args: ${{ inputs.cmake-args }}
70+
ctest-args: ${{ inputs.ctest-args }}
71+
fastdds-docs-branch: ${{ inputs.fastdds-docs-branch || github.ref }}
72+
fastdds-branch: ${{ inputs.fastdds-branch || '2.6.x' }}
73+
fastdds-python-branch: ${{ inputs.fastdds-python-branch || 'main' }}
74+
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
75+
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
76+
use-ccache: ${{ inputs.use-ccache || false }}

‎RELEASE_SUPPORT.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Release support
2+
3+
4+
Please, refer to the [master branch](https://github.com/eProsima/Fast-DDS-docs/blob/master/RELEASE_SUPPORT.md) for the latest version of this document.
5+
6+
*eProsima Fast DDS docs* maintains the same releases and have the same support cycles as their corresponding release in *Fast DDS*.
7+
8+
**Refer to [*eProsima Fast DDS* release support section](https://github.com/eProsima/Fast-DDS/blob/master/RELEASE_SUPPORT.md) for further information.**

0 commit comments

Comments
 (0)
Please sign in to comment.