Skip to content

Commit 5359d7c

Browse files
Improve CI workflows in 1.0.x, and branching model refactor (#149) (#152)
* Refs #21228: Refactor Ubuntu CI Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Refactor Windows CI Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Remove previous workflow Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Add RELEASE_SUPPORT.md with Fast DDS references Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Avoid running tests in 1.0.x Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Fix windows CI removing win2017 Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Deactivate Windows build temporary Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Apply rev suggestions in main PR Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Avoid building dependencies again Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Apply rev suggestions Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> * Refs #21228: Apply rev suggestions Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com> --------- Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
1 parent e9b617c commit 5359d7c

12 files changed

Lines changed: 676 additions & 154 deletions

.github/workflows/build_and_test.yml

Lines changed: 0 additions & 134 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
names:
2+
fastdds:
3+
cmake-args:
4+
- "-DSECURITY=ON"
5+
- "-DLOG_CONSUMER_DEFAULT=STDOUT"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
names:
2+
fastdds_python:
3+
cmake-args:
4+
- "-DBUILD_TESTING=ON"
5+
- "-DBUILD_DOCUMENTATION=ON"
6+
ctest-args: [
7+
"--repeat", "until-pass:3",
8+
"--timeout", "300",
9+
"--label-exclude", "xfail"
10+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
names:
2+
fastdds_python:
3+
cmake-args:
4+
- "-DBUILD_TESTING=ON"
5+
ctest-args: [
6+
"--repeat", "until-pass:3",
7+
"--timeout", "300",
8+
"--label-exclude", "xfail"
9+
]
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
name: Fast DDS Python 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-python-branch:
28+
description: 'Branch or tag of Fast DDS Python 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+
run-build:
36+
description: 'Build Fast DDS Python (CI skipped otherwise)'
37+
required: false
38+
type: boolean
39+
default: true
40+
run-tests:
41+
description: 'Run test suite of Fast DDS python'
42+
required: false
43+
type: boolean
44+
default: false
45+
use-ccache:
46+
description: 'Use CCache to speed up the build'
47+
required: false
48+
type: boolean
49+
default: false
50+
defaults:
51+
run:
52+
shell: bash
53+
54+
jobs:
55+
fastdds_python_build:
56+
runs-on: ${{ inputs.os-version }}
57+
if: ${{ inputs.run-build == true }}
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
cmake-build-type:
62+
- 'RelWithDebInfo'
63+
steps:
64+
- name: Add ci-pending label if PR
65+
if: ${{ github.event_name == 'pull_request' }}
66+
uses: eProsima/eProsima-CI/external/add_labels@v0
67+
with:
68+
labels: ci-pending
69+
number: ${{ github.event.number }}
70+
repo: eProsima/Fast-DDS-Python
71+
72+
- name: Sync eProsima/Fast-DDS-Python repository
73+
uses: eProsima/eProsima-CI/external/checkout@v0
74+
with:
75+
path: src/fastdds_python
76+
ref: ${{ inputs.fastdds-python-branch }}
77+
78+
- name: Install Fix Python version
79+
uses: eProsima/eProsima-CI/external/setup-python@v0
80+
with:
81+
python-version: '3.11'
82+
83+
- name: Get minimum supported version of CMake
84+
uses: eProsima/eProsima-CI/external/get-cmake@v0
85+
with:
86+
cmakeVersion: '3.22.6'
87+
88+
- name: Install apt dependencies
89+
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
90+
with:
91+
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen
92+
update: false
93+
upgrade: false
94+
95+
- name: Install colcon
96+
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
97+
98+
- name: Install Python dependencies
99+
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
100+
with:
101+
packages: vcstool xmlschema
102+
upgrade: false
103+
104+
- name: Setup CCache
105+
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
106+
if: ${{ inputs.use-ccache == true }}
107+
with:
108+
api_token: ${{ secrets.GITHUB_TOKEN }}
109+
110+
- name: Get Fast DDS branch
111+
id: get_fastdds_branch
112+
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
113+
with:
114+
remote_repository: eProsima/Fast-DDS
115+
fallback_branch: ${{ inputs.fastdds-branch }}
116+
117+
- name: Download Fast DDS repo
118+
uses: eProsima/eProsima-CI/external/checkout@v0
119+
with:
120+
repository: eProsima/Fast-DDS
121+
path: src/fastdds
122+
ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }}
123+
124+
- name: Fetch Fast DDS Python dependencies
125+
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
126+
with:
127+
vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos
128+
destination_workspace: src
129+
skip_existing: 'true'
130+
131+
- name: Colcon build
132+
continue-on-error: false
133+
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
134+
with:
135+
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta
136+
colcon_build_args: ${{ inputs.colcon-args }}
137+
cmake_args: ${{ inputs.cmake-args }}
138+
cmake_build_type: ${{ matrix.cmake-build-type }}
139+
workspace: ${{ github.workspace }}
140+
141+
- name: Upload build artifacts
142+
uses: eProsima/eProsima-CI/external/upload-artifact@v0
143+
with:
144+
name: fastdds_python_build_${{ inputs.label }}
145+
path: ${{ github.workspace }}
146+
147+
fastdds_python_test:
148+
needs: fastdds_python_build
149+
runs-on: ${{ inputs.os-version }}
150+
if: ${{ inputs.run-tests == true }}
151+
strategy:
152+
fail-fast: false
153+
matrix:
154+
cmake-build-type:
155+
- 'RelWithDebInfo'
156+
steps:
157+
- name: Download python build artifacts
158+
uses: eProsima/eProsima-CI/external/download-artifact@v0
159+
with:
160+
name: fastdds_python_build_${{ inputs.label }}
161+
path: ${{ github.workspace }}
162+
163+
- name: Install Fix Python version
164+
uses: eProsima/eProsima-CI/external/setup-python@v0
165+
with:
166+
python-version: '3.11'
167+
168+
- name: Get minimum supported version of CMake
169+
uses: eProsima/eProsima-CI/external/get-cmake@v0
170+
with:
171+
cmakeVersion: '3.22.6'
172+
173+
- name: Install apt packages
174+
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
175+
with:
176+
packages: libasio-dev libtinyxml2-dev libssl-dev swig
177+
178+
- name: Install colcon
179+
uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0
180+
181+
- name: Install Python dependencies
182+
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
183+
with:
184+
packages: xmlschema pytest
185+
186+
- name: Setup CCache
187+
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
188+
if: ${{ inputs.use-ccache == true }}
189+
with:
190+
api_token: ${{ secrets.GITHUB_TOKEN }}
191+
192+
- name: Colcon build
193+
continue-on-error: false
194+
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
195+
with:
196+
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
197+
colcon_build_args: ${{ inputs.colcon-args }}
198+
colcon_build_args_default: '--packages-select fastdds_python'
199+
cmake_args: ${{ inputs.cmake-args }}
200+
cmake_build_type: ${{ matrix.cmake-build-type }}
201+
workspace: ${{ github.workspace }}
202+
workspace_dependencies: ${{ github.workspace }}/install
203+
204+
- name: Colcon test
205+
id: python_test
206+
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
207+
with:
208+
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
209+
colcon_test_args: ${{ inputs.colcon-args }}
210+
colcon_test_args_default: --event-handlers=console_direct+
211+
ctest_args: ${{ inputs.ctest-args }}
212+
packages_names: fastdds_python
213+
workspace: ${{ github.workspace }}
214+
workspace_dependencies: ''
215+
test_report_artifact: ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}
216+
217+
- name: Fast DDS Python test summary
218+
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
219+
if: ${{ !cancelled() }}
220+
with:
221+
junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}"
222+
print_summary: 'True'
223+
show_failed: 'True'
224+
show_disabled: 'False'
225+
show_skipped: 'False'

0 commit comments

Comments
 (0)