Skip to content

Commit 9cd6a43

Browse files
committed
Refactor dev-utils CI
Signed-off-by: Raul Sanchez-Mateos <raul@eprosima.com>
1 parent 6c89418 commit 9cd6a43

6 files changed

Lines changed: 441 additions & 239 deletions

File tree

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
# Nightly test workflow for dev-utils
2-
name: nightly-dev-utils
1+
# Nightly test workflow for DDS Pipe
2+
name: nightly-ubuntu-ci
33

44
on:
55
workflow_dispatch:
6-
76
schedule:
87
- cron: '0 5 * * *'
98

109
jobs:
1110

1211
reusable_tests_v2:
1312
name: reusable_tests_v2
14-
uses: ./.github/workflows/reusable-workflow.yml
13+
uses: ./.github/workflows/reusable-ubuntu-ci.yml
1514
with:
1615
custom_version_build: 'v2'
1716
dependencies_artifact_postfix: '_nightly'
18-
ref: '0.x'
17+
ref: '2.x'
1918
secrets: inherit
2019

2120
reusable_tests_v3:
2221
name: reusable_tests_v3
23-
uses: ./.github/workflows/reusable-workflow.yml
22+
uses: ./.github/workflows/reusable-ubuntu-ci.yml
2423
with:
2524
custom_version_build: 'v3'
2625
dependencies_artifact_postfix: '_nightly'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Nightly test workflow for DDS Pipe
2+
name: nightly-windows-ci
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 5 * * *'
8+
9+
jobs:
10+
11+
reusable_tests_v2:
12+
name: reusable_tests_v2
13+
uses: ./.github/workflows/reusable-windows-ci.yml
14+
with:
15+
custom_version_build: 'v2'
16+
dependencies_artifact_postfix: '_nightly'
17+
ref: '2.x'
18+
secrets: inherit
19+
20+
reusable_tests_v3:
21+
name: reusable_tests_v3
22+
uses: ./.github/workflows/reusable-windows-ci.yml
23+
with:
24+
custom_version_build: 'v3'
25+
dependencies_artifact_postfix: '_nightly'
26+
ref: 'main'
27+
secrets: inherit
28+
Lines changed: 312 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
# Reusable workflow to run the following jobs:
2+
#
3+
# - multiplatform-tests
4+
# - [ ubuntu-22.04 | ubuntu-24.04 ]
5+
# - [ Debug | Release ]
6+
# - execute tests in different versions of ubuntu with different build types
7+
#
8+
# - asan
9+
# - ubuntu-22.04
10+
# - execute tests with ASAN flag
11+
#
12+
# - tsan
13+
# - ubuntu-22.04
14+
# - execute tests with TSAN flag
15+
#
16+
# - clang
17+
# - ubuntu-22.04
18+
# - execute clang-tidy check
19+
#
20+
# - coverage
21+
# - ubuntu-22.04
22+
# - execute test with coverage flag and upload results
23+
#
24+
# - flaky
25+
# - ubuntu-22.04
26+
# - execute flaky tests
27+
#
28+
# - docs
29+
# - ubuntu-22.04
30+
# - execute docs compile and tests
31+
#
32+
# - uncrustify
33+
# - ubuntu-22.04
34+
# - test uncrustify
35+
#
36+
# - python-linter
37+
# - ubuntu-22.04
38+
# - test python linter
39+
#
40+
41+
name: ubuntu-ci
42+
43+
on:
44+
45+
workflow_call:
46+
inputs:
47+
48+
custom_version_build:
49+
description: >
50+
Version of Fast DDS build from eProsima-CI.
51+
required: true
52+
type: string
53+
54+
dependencies_artifact_postfix:
55+
description: >
56+
Postfix name to add to artifact name to download dependencies.
57+
This is use to download a specific artifact version from eProsima-CI.
58+
required: true
59+
default: '_nightly'
60+
type: string
61+
62+
ref:
63+
description: >
64+
The branch or tag name to checkout.
65+
required: true
66+
type: string
67+
default: 'main'
68+
69+
env:
70+
cpp_packages_names: 'cmake_utils cpp_utils py_utils'
71+
cpp_packages_names: 'cmake_utils cpp_utils'
72+
py_packages_names: 'py_utils'
73+
74+
jobs:
75+
76+
#####################################################################
77+
# TEST
78+
79+
multiplatform-tests:
80+
name: ${{ matrix.os }}-ci
81+
strategy:
82+
fail-fast: false
83+
matrix:
84+
os:
85+
- ubuntu-22.04
86+
- ubuntu-24.04
87+
uses: ./.github/workflows/reusable-workflow.yml
88+
with:
89+
os: ${{ matrix.os }}
90+
custom_version_build: ${{ inputs.custom_version_build || 'v3' }}
91+
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix || '_nightly' }}
92+
ref: ${{ inputs.ref }}
93+
secrets: inherit
94+
95+
#####################################################################
96+
# ASAN
97+
98+
asan:
99+
runs-on: ubuntu-22.04
100+
steps:
101+
102+
- name: Sync repository
103+
uses: eProsima/eProsima-CI/external/checkout@v0
104+
with:
105+
path: src
106+
ref: ${{ inputs.ref }}
107+
108+
- name: Download dependencies and install requirements
109+
uses: ./src/.github/actions/project_dependencies
110+
with:
111+
os: ubuntu-22.04
112+
cmake_build_type: Debug
113+
custom_version_build: ${{ inputs.custom_version_build }}
114+
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}
115+
secret_token: ${{ secrets.GITHUB_TOKEN }}
116+
117+
- name: Compile and run tests
118+
id: compile_and_test
119+
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@main
120+
with:
121+
packages_names: ${{ env.cpp_packages_names }}
122+
workspace_dependencies: install
123+
cmake_build_type: Debug
124+
cmake_args: -DBUILD_TESTS=ON -DASAN_BUILD=ON
125+
ctest_args: --label-exclude "xfail|xtsan"
126+
test_report_artifact: test_report_asan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}
127+
128+
129+
- name: Test Report
130+
uses: eProsima/eProsima-CI/external/test-reporter@v0
131+
if: success() || failure()
132+
with:
133+
name: "Report: ASAN "
134+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
135+
working-directory: 'src'
136+
list-tests: 'failed'
137+
list-suites: 'failed'
138+
139+
#####################################################################
140+
# TSAN
141+
142+
tsan:
143+
runs-on: ubuntu-22.04
144+
steps:
145+
146+
- name: Sync repository
147+
uses: eProsima/eProsima-CI/external/checkout@v0
148+
with:
149+
path: src
150+
ref: ${{ inputs.ref }}
151+
152+
- name: Download dependencies and install requirements
153+
uses: ./src/.github/actions/project_dependencies
154+
with:
155+
os: ubuntu-22.04
156+
cmake_build_type: Debug
157+
custom_version_build: ${{ inputs.custom_version_build }}
158+
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}_tsan
159+
secret_token: ${{ secrets.GITHUB_TOKEN }}
160+
161+
- name: Compile and run tests
162+
id: compile_and_test
163+
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
164+
env:
165+
# GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols
166+
# These issues were fixed in GCC 12 so we upgrade to that version.
167+
CC: gcc-12
168+
CXX: g++-12
169+
with:
170+
packages_names: ${{ env.cpp_packages_names }}
171+
workspace_dependencies: install
172+
cmake_build_type: Debug
173+
cmake_args: -DBUILD_TESTS=ON -DTSAN_BUILD=ON
174+
ctest_args: --label-exclude "xfail|xasan"
175+
test_report_artifact: test_report_tsan${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}
176+
177+
- name: Test Report
178+
uses: eProsima/eProsima-CI/external/test-reporter@v0
179+
if: success() || failure()
180+
with:
181+
name: "Report: TSAN "
182+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
183+
working-directory: 'src'
184+
list-tests: 'failed'
185+
list-suites: 'failed'
186+
187+
#####################################################################
188+
# CLANG
189+
190+
clang:
191+
runs-on: ubuntu-22.04
192+
steps:
193+
194+
- name: Sync repository
195+
uses: eProsima/eProsima-CI/external/checkout@v0
196+
with:
197+
path: src
198+
ref: ${{ inputs.ref }}
199+
200+
- name: Download dependencies and install requirements
201+
uses: ./src/.github/actions/project_dependencies
202+
with:
203+
os: ubuntu-22.04
204+
cmake_build_type: Release
205+
custom_version_build: ${{ inputs.custom_version_build }}
206+
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}
207+
secret_token: ${{ secrets.GITHUB_TOKEN }}
208+
209+
- name: Compile and run tests
210+
uses: eProsima/eProsima-CI/multiplatform/clang_build_test@v0
211+
with:
212+
packages_names: ${{ env.cpp_packages_names }}
213+
workspace_dependencies: install
214+
215+
216+
#####################################################################
217+
# COVERAGE
218+
219+
coverage:
220+
runs-on: ubuntu-22.04
221+
environment:
222+
name: codecov
223+
steps:
224+
225+
- name: Sync repository
226+
uses: eProsima/eProsima-CI/external/checkout@v0
227+
with:
228+
path: src
229+
ref: ${{ inputs.ref }}
230+
231+
- name: Download dependencies and install requirements
232+
uses: ./src/.github/actions/project_dependencies
233+
with:
234+
os: ubuntu-22.04
235+
cmake_build_type: Release
236+
custom_version_build: ${{ inputs.custom_version_build }}
237+
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}
238+
secret_token: ${{ secrets.GITHUB_TOKEN }}
239+
240+
- name: Compile and run tests
241+
uses: eProsima/eProsima-CI/ubuntu/coverage_build_test_upload@v0
242+
with:
243+
packages_names: ${{ env.cpp_packages_names }}
244+
workspace_dependencies: install
245+
codecov_token: ${{ secrets.CODECOV_TOKEN }}
246+
codecov_fix_file_path: src/codecov.yml
247+
test_report_artifact: test_report_coverage${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}
248+
249+
250+
#####################################################################
251+
# FLAKY
252+
253+
flaky:
254+
runs-on: ubuntu-22.04
255+
steps:
256+
257+
- name: Sync repository
258+
uses: eProsima/eProsima-CI/external/checkout@v0
259+
with:
260+
path: src
261+
ref: ${{ inputs.ref }}
262+
263+
- name: Download dependencies and install requirements
264+
uses: ./src/.github/actions/project_dependencies
265+
with:
266+
os: ubuntu-22.04
267+
cmake_build_type: Release
268+
custom_version_build: ${{ inputs.custom_version_build }}
269+
dependencies_artifact_postfix: ${{ inputs.dependencies_artifact_postfix }}
270+
secret_token: ${{ secrets.GITHUB_TOKEN }}
271+
272+
- name: Compile and run tests
273+
id: compile_and_test
274+
uses: eProsima/eProsima-CI/multiplatform/colcon_build_test@v0
275+
with:
276+
packages_names: ${{ env.code_packages_names }}
277+
workspace_dependencies: install
278+
cmake_args: -DBUILD_TESTS=ON
279+
ctest_args: --label-regex "xfail"
280+
test_report_artifact: test_report_flaky${{ inputs.dependencies_artifact_postfix }}_${{ inputs.custom_version_build }}
281+
282+
- name: Test Report
283+
uses: eProsima/eProsima-CI/external/test-reporter@v0
284+
if: success() || failure()
285+
with:
286+
name: "Report: Flaky "
287+
path: "${{ steps.compile_and_test.outputs.ctest_results_path }}*.xml"
288+
working-directory: 'src'
289+
fail-on-empty: 'false'
290+
list-tests: 'failed'
291+
list-suites: 'failed'
292+
293+
#####################################################################
294+
# UNCRUSTIFY
295+
296+
uncrustify:
297+
runs-on: ubuntu-22.04
298+
steps:
299+
300+
- name: Uncrustify
301+
uses: eProsima/eProsima-CI/ubuntu/uncrustify@v0
302+
303+
304+
#####################################################################
305+
# PYTHON LINTER
306+
307+
python-linter:
308+
runs-on: ubuntu-22.04
309+
steps:
310+
311+
- name: Python Linter
312+
uses: eProsima/eProsima-CI/ubuntu/python_linter@v0

0 commit comments

Comments
 (0)