Skip to content

Commit 9896305

Browse files
committed
Refs #21228: Apply rev suggestions in main PR
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
1 parent 808e0b5 commit 9896305

7 files changed

Lines changed: 52 additions & 54 deletions

File tree

.github/workflows/config/test.repos

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,3 @@ names:
88
"--timeout", "300",
99
"--label-exclude", "xfail"
1010
]
11-
googletest-distribution:
12-
cmake-args:
13-
- "-Dgtest_force_shared_crt=ON"
14-
- "-DBUILD_SHARED_LIBS=ON"
15-
- "-DBUILD_GMOCK=ON"
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+
]

.github/workflows/reusable-ubuntu-ci.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ on:
4242
required: false
4343
type: boolean
4444
default: true
45+
use-ccache:
46+
description: 'Use CCache to speed up the build'
47+
required: false
48+
type: boolean
49+
default: false
4550

4651
defaults:
4752
run:
@@ -84,7 +89,7 @@ jobs:
8489
- name: Install apt dependencies
8590
uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
8691
with:
87-
packages: libasio-dev libtinyxml2-dev libssl-dev swig
92+
packages: libasio-dev libtinyxml2-dev libssl-dev swig doxygen
8893
update: false
8994
upgrade: false
9095

@@ -97,6 +102,12 @@ jobs:
97102
packages: vcstool xmlschema
98103
upgrade: false
99104

105+
- name: Setup CCache
106+
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
107+
if: ${{ inputs.use-ccache == true }}
108+
with:
109+
api_token: ${{ secrets.GITHUB_TOKEN }}
110+
100111
- name: Get Fast DDS branch
101112
id: get_fastdds_branch
102113
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
@@ -172,20 +183,19 @@ jobs:
172183
- name: Install Python dependencies
173184
uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0
174185
with:
175-
packages: vcstool xmlschema
186+
packages: xmlschema pytest
176187

177-
- name: Fetch Fast DDS Python CI dependencies
178-
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
188+
- name: Setup CCache
189+
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
190+
if: ${{ inputs.use-ccache == true }}
179191
with:
180-
vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.repos
181-
destination_workspace: src
182-
skip_existing: 'true'
192+
api_token: ${{ secrets.GITHUB_TOKEN }}
183193

184194
- name: Colcon build
185195
continue-on-error: false
186196
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
187197
with:
188-
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta
198+
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
189199
colcon_build_args: ${{ inputs.colcon-args }}
190200
cmake_args: ${{ inputs.cmake-args }}
191201
cmake_args_default: ''
@@ -196,7 +206,7 @@ jobs:
196206
id: python_test
197207
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
198208
with:
199-
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta
209+
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
200210
colcon_test_args: ${{ inputs.colcon-args }}
201211
colcon_test_args_default: --event-handlers=console_direct+
202212
ctest_args: ${{ inputs.ctest-args }}

.github/workflows/reusable-windows-ci.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,9 @@ jobs:
126126
shell: pwsh
127127
run: choco install swig --allow-downgrade --version=4.0.2.04082020
128128

129-
# Although this is a ubuntu action becuase it uses bash, it is compatible with windows
130129
- name: Get Fast DDS branch
131130
id: get_fastdds_branch
132-
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
131+
uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0
133132
with:
134133
remote_repository: eProsima/Fast-DDS
135134
fallback_branch: ${{ inputs.fastdds-branch }}
@@ -231,24 +230,14 @@ jobs:
231230
shell: pwsh
232231
run: choco install swig --allow-downgrade --version=4.0.2.04082020
233232

233+
- name: Install doxygen
234+
uses: eProsima/eProsima-CI/external/install_doxygen@v0
234235

235236
- name: Prepare build meta file
236-
run: |
237-
$build_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build.meta'
238-
$test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\test.meta'
239-
$build_test_meta_file = '${{ github.workspace }}\src\fastdds_python\.github\workflows\config\build_test.meta'
240-
241-
# Read the content of the build meta file
242-
$build_meta_content = Get-Content -Path $build_meta_file
243-
244-
# Read the content of the test meta file, starting from line 4 (skipping "name" line [1], cmake project name line [2] and "cmake-args" line [3])
245-
$test_meta_content = Get-Content -Path $test_meta_file | Select-Object -Skip 3
246-
247-
# Combine the content of the build meta file and the test meta file
248-
$combined_content = $build_meta_content + $test_meta_content
249-
250-
# Write the combined content to the build test meta file
251-
$combined_content | Out-File -FilePath $build_test_meta_file -Encoding UTF8
237+
uses: eProsima/eProsima-CI/windows/merge_yaml_metas@v0
238+
with:
239+
metas: "@('${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta', '${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta')"
240+
path: '${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build_test.meta'
252241

253242
- name: Colcon build
254243
continue-on-error: false
@@ -266,7 +255,7 @@ jobs:
266255
id: python_test
267256
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
268257
with:
269-
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/test.meta
258+
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta
270259
colcon_test_args: ${{ inputs.colcon-args }}
271260
colcon_test_args_default: --event-handlers=console_direct+
272261
ctest_args: ${{ inputs.ctest-args }}

.github/workflows/ubuntu-ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ on:
3333
required: false
3434
type: boolean
3535
default: true
36+
use-ccache:
37+
description: 'Use CCache to speed up the build'
38+
required: false
39+
type: boolean
40+
default: false
3641

3742
pull_request:
3843
types:
@@ -51,23 +56,21 @@ jobs:
5156
strategy:
5257
fail-fast: false
5358
matrix:
54-
os-version:
55-
- 'ubuntu-22.04'
56-
fastdds-python-branch:
57-
- '1.4.x'
5859
fastdds-branch:
5960
- '2.14.x'
6061
- '2.13.x'
62+
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }}
6163
uses: ./.github/workflows/reusable-ubuntu-ci.yml
6264
with:
6365
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
6466
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
65-
os-version: ${{ inputs.os-version || matrix.os-version }}
66-
label: '${{ matrix.os-version }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}'
67+
os-version: ${{ inputs.os-version || 'ubuntu-22.04' }}
68+
label: 'ubuntu-ci-1.4.x-${{ matrix.fastdds-branch }}'
6769
colcon-args: ${{ inputs.colcon-args }}
6870
cmake-args: ${{ inputs.cmake-args }}
6971
ctest-args: ${{ inputs.ctest-args }}
70-
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }}
72+
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.4.x' }}
7173
fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }}
72-
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }}
74+
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci')) && true || false }}
7375
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }}
76+
use-ccache: ${{ inputs.use-ccache || false }}

.github/workflows/windows-ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,27 +56,24 @@ jobs:
5656
strategy:
5757
fail-fast: false
5858
matrix:
59-
os-version:
60-
- 'windows-2019'
6159
vs-toolset:
6260
- 'v141'
6361
- 'v142'
64-
fastdds-python-branch:
65-
- '1.4.x'
6662
fastdds-branch:
6763
- '2.14.x'
6864
- '2.13.x'
65+
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'conflicts')) && false || true }}
6966
uses: ./.github/workflows/reusable-windows-ci.yml
7067
with:
7168
# It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket:
7269
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
73-
os-version: ${{ inputs.os-version || matrix.os-version }}
70+
os-version: ${{ inputs.os-version || 'windows-2019' }}
7471
vs-toolset: ${{ inputs.vs-toolset || matrix.vs-toolset }}
75-
label: '${{ matrix.os-version }}-${{ matrix.vs-toolset }}-ci-${{ matrix.fastdds-python-branch }}-${{ matrix.fastdds-branch }}'
72+
label: 'windows-${{ matrix.vs-toolset }}-ci-1.4.x-${{ matrix.fastdds-branch }}'
7673
colcon-args: ${{ inputs.colcon-args }}
7774
cmake-args: ${{ inputs.cmake-args }}
7875
ctest-args: ${{ inputs.ctest-args }}
79-
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || matrix.fastdds-python-branch }}
76+
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref || '1.4.x' }}
8077
fastdds-branch: ${{ inputs.fastdds-branch || matrix.fastdds-branch }}
81-
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci') && !contains(github.event.pull_request.labels.*.name, 'conflicts')) && true || false }}
78+
run-build: ${{ !(github.event_name == 'pull_request') && true || (!contains(github.event.pull_request.labels.*.name, 'skip-ci')) && true || false }}
8279
run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) && true || false }}

0 commit comments

Comments
 (0)