33
33
required : false
34
34
type : string
35
35
default : ' RelWithDebInfo'
36
+ run-tests :
37
+ description : ' Run test suite of Fast DDS'
38
+ required : false
39
+ type : boolean
40
+ default : true
36
41
37
42
defaults :
38
43
run :
39
44
shell : pwsh
40
45
41
46
jobs :
42
- reusable-windows-ci :
47
+ fastdds_build :
43
48
runs-on : windows-2022
44
49
strategy :
45
50
fail-fast : false
@@ -98,8 +103,85 @@ jobs:
98
103
with :
99
104
packages : vcstool xmlschema psutil
100
105
106
+ - name : Get Fast CDR branch
107
+ id : get_fastcdr_branch
108
+ uses : eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
109
+ with :
110
+ remote_repository : eProsima/Fast-CDR
111
+ fallback_branch : ${{ inputs.fastcdr_branch }}
112
+
113
+ - name : Download Fast CDR
114
+ uses : eProsima/eProsima-CI/external/checkout@v0
115
+ with :
116
+ repository : eProsima/Fast-CDR
117
+ path : ${{ github.workspace }}/src/fastcdr
118
+ ref : ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
119
+
120
+ - name : Fetch Fast DDS dependencies
121
+ uses : eProsima/eProsima-CI/multiplatform/vcs_import@v0
122
+ with :
123
+ vcs_repos_file : ${{ github.workspace }}\src\fastdds\fastdds.repos
124
+ destination_workspace : src
125
+ skip_existing : ' true'
126
+
127
+ - name : Fetch Fast DDS CI dependencies
128
+ uses : eProsima/eProsima-CI/multiplatform/vcs_import@v0
129
+ with :
130
+ vcs_repos_file : ${{ github.workspace }}\src\fastdds\.github\workflows\config\fastdds_test.repos
131
+ destination_workspace : src
132
+ skip_existing : ' true'
133
+
134
+ - name : Build
135
+ id : build
136
+ continue-on-error : false
137
+ uses : eProsima/eProsima-CI/windows/colcon_build@v0
138
+ with :
139
+ colcon_meta_file : ${{ github.workspace }}\src\fastdds\.github\workflows\config\fastdds_build.meta ${{ github.workspace }}\src\fastdds\.github\workflows\config\fastdds_test.meta
140
+ colcon_build_args : ${{ inputs.colcon-args }}
141
+ # The following Fast DDS CMake options need to be specified here instead of in the meta files
142
+ # because they vary from platform to platform
143
+ cmake_args_default : ${{ inputs.cmake-args }} -T ${{ matrix.vs-toolset }} -DTHIRDPARTY_Asio=FORCE -DTHIRDPARTY_TinyXML2=FORCE -DTHIRDPARTY_fastcdr=OFF -DTHIRDPARTY_UPDATE=ON -DCOMPILE_EXAMPLES=ON -DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS="/MP /WX"
144
+ cmake_build_type : ${{ inputs.cmake-config }}
145
+ workspace : ${{ github.workspace }}
146
+
147
+ - name : Upload build artifacts
148
+ uses : eProsima/eProsima-CI/external/upload-artifact@v0
149
+ with :
150
+ name : fastdds_build_${{ inputs.label }}
151
+ path : ${{ github.workspace }}
152
+
153
+ fastdds_test :
154
+ needs : fastdds_build
155
+ if : ${{ inputs.run-tests == true }}
156
+ name : fastdds_test (${{ matrix.cmake_build_type }}, ${{ matrix.test_filter }})
157
+ runs-on : windows-2022
158
+ strategy :
159
+ fail-fast : false
160
+ matrix :
161
+ vs-toolset :
162
+ - ' v142'
163
+ cmake_build_type :
164
+ - ${{ inputs.cmake-config }}
165
+ test_filter :
166
+ - ' blackbox'
167
+ - ' unittest-I'
168
+ - ' unittest-II'
169
+ - ' examples'
170
+ filter_expression_blackbox :
171
+ - ' BlackboxTests|ParticipantTests|SecureDiscoverServer|SimpleCommunication|system.'
172
+ filter_expression_examples :
173
+ - ' example_tests'
174
+ filter_expression_unittests_I :
175
+ - ' DDSSQLFilterValue'
176
+
177
+ steps :
178
+ - name : Download build artifacts
179
+ uses : eProsima/eProsima-CI/external/download-artifact@v0
180
+ with :
181
+ name : fastdds_build_${{ inputs.label }}
182
+ path : ${{ github.workspace }}
183
+
101
184
- name : Update known hosts file for DNS resolver testing
102
- if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
103
185
run : |
104
186
$hostfile = "$Env:SystemRoot\system32\drivers" -replace "\\", "/"
105
187
$hostfile += "/etc/hosts"
@@ -126,36 +208,53 @@ jobs:
126
208
# Show the result
127
209
gc $hostfile
128
210
129
- - name : Get Fast CDR branch
130
- id : get_fastcdr_branch
131
- uses : eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
211
+ - name : Install Fix Python version
212
+ uses : eProsima/eProsima-CI/external/setup-python@v0
132
213
with :
133
- remote_repository : eProsima/Fast-CDR
134
- fallback_branch : ${{ inputs.fastcdr_branch }}
214
+ python-version : ' 3.11'
135
215
136
- - name : Download Fast CDR
137
- uses : eProsima/eProsima-CI/external/checkout @v0
216
+ - name : Get minimum supported version of CMake
217
+ uses : eProsima/eProsima-CI/external/get-cmake @v0
138
218
with :
139
- repository : eProsima/Fast-CDR
140
- path : ${{ github.workspace }}/src/fastcdr
141
- ref : ${{ steps.get_fastcdr_branch.outputs.deduced_branch }}
219
+ cmakeVersion : ' 3.22.6'
142
220
143
- - name : Fetch Fast DDS dependencies
144
- uses : eProsima/eProsima -CI/multiplatform/vcs_import @v0
221
+ - name : Install OpenSSL
222
+ uses : eProsima/eprosima -CI/windows/install_openssl @v0
145
223
with :
146
- vcs_repos_file : ${{ github.workspace }}\src\fastdds\fastdds.repos
147
- destination_workspace : src
148
- skip_existing : ' true'
224
+ version : ' 3.1.1'
149
225
150
- - name : Fetch Fast DDS CI dependencies
151
- uses : eProsima/eProsima-CI/multiplatform/vcs_import@v0
226
+ - name : Update OpenSSL environment variables
227
+ run : |
228
+ # Update the environment
229
+ if (Test-Path -Path $Env:ProgramW6432\OpenSSL)
230
+ {
231
+ "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM
232
+ }
233
+ elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win)
234
+ {
235
+ "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM
236
+ }
237
+ elseif (Test-Path -Path $Env:ProgramW6432\OpenSSL-Win64)
238
+ {
239
+ "OPENSSL64_ROOT=$Env:ProgramW6432\OpenSSL-Win64" | Out-File $Env:GITHUB_ENV -Append -Encoding OEM
240
+ }
241
+ else
242
+ {
243
+ Write-Error -Message "Cannot find OpenSSL installation."
244
+ exit 1
245
+ }
246
+
247
+ - name : Install colcon
248
+ uses : eProsima/eProsima-CI/windows/install_colcon@v0
249
+
250
+ - name : Install Python dependencies
251
+ uses : eProsima/eProsima-CI/windows/install_python_packages@v0
152
252
with :
153
- vcs_repos_file : ${{ github.workspace }}\src\fastdds\.github\workflows\config\fastdds_test.repos
154
- destination_workspace : src
155
- skip_existing : ' true'
253
+ packages : vcstool xmlschema psutil
156
254
157
- - name : Build
158
- id : build
255
+ # Build Windows examples testing docker image
256
+ - name : Build with example testing
257
+ if : ${{ matrix.test_filter == 'examples' }}
159
258
continue-on-error : false
160
259
uses : eProsima/eProsima-CI/windows/colcon_build@v0
161
260
with :
@@ -168,21 +267,25 @@ jobs:
168
267
workspace : ${{ github.workspace }}
169
268
170
269
- name : Test
171
- if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
172
270
id : test
173
271
uses : eProsima/eProsima-CI/windows/colcon_test@v0
174
272
with :
175
273
colcon_meta_file : ${{ github.workspace }}\src\fastdds\.github\workflows\config\fastdds_test.meta
176
274
colcon_test_args : ${{ inputs.colcon-args }}
177
275
colcon_test_args_default : --event-handlers=console_direct+
178
- ctest_args : ${{ inputs.ctest-args }}
276
+ ctest_args : >
277
+ ${{ inputs.ctest-args }}
278
+ ${{ matrix.test_filter == 'blackbox' && format('-R "{0}"', matrix.filter_expression_blackbox) ||
279
+ matrix.test_filter == 'examples' && format('-R "{0}"', matrix.filter_expression_examples) ||
280
+ matrix.test_filter == 'unittest-I' && format('-R "{0}" -j 4', matrix.filter_expression_unittests_I) ||
281
+ format('-E "{0}|{1}|{2}"', matrix.filter_expression_blackbox, matrix.filter_expression_examples, matrix.filter_expression_unittests_I) }}
179
282
packages_names : fastdds
180
283
workspace : ${{ github.workspace }}
181
284
test_report_artifact : ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}
182
285
183
286
- name : Test summary
184
287
uses : eProsima/eProsima-CI/windows/junit_summary@v0
185
- if : ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }}
288
+ if : ${{ !cancelled() }}
186
289
with :
187
290
junit_reports_dir : " ${{ steps.test.outputs.ctest_results_path }}"
188
291
print_summary : ' True'
0 commit comments