3333 required : false
3434 type : string
3535 default : ' RelWithDebInfo'
36+ run-tests :
37+ description : ' Run test suite of Fast DDS'
38+ required : false
39+ type : boolean
40+ default : true
3641
3742defaults :
3843 run :
3944 shell : pwsh
4045
4146jobs :
42- reusable-windows-ci :
47+ fastdds_build :
4348 runs-on : windows-2022
4449 strategy :
4550 fail-fast : false
@@ -98,8 +103,85 @@ jobs:
98103 with :
99104 packages : vcstool xmlschema psutil
100105
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+
101184 - name : Update known hosts file for DNS resolver testing
102- if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
103185 run : |
104186 $hostfile = "$Env:SystemRoot\system32\drivers" -replace "\\", "/"
105187 $hostfile += "/etc/hosts"
@@ -126,36 +208,53 @@ jobs:
126208 # Show the result
127209 gc $hostfile
128210
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
132213 with :
133- remote_repository : eProsima/Fast-CDR
134- fallback_branch : ${{ inputs.fastcdr_branch }}
214+ python-version : ' 3.11'
135215
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
138218 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'
142220
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
145223 with :
146- vcs_repos_file : ${{ github.workspace }}\src\fastdds\fastdds.repos
147- destination_workspace : src
148- skip_existing : ' true'
224+ version : ' 3.1.1'
149225
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
152252 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
156254
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' }}
159258 continue-on-error : false
160259 uses : eProsima/eProsima-CI/windows/colcon_build@v0
161260 with :
@@ -168,21 +267,25 @@ jobs:
168267 workspace : ${{ github.workspace }}
169268
170269 - name : Test
171- if : ${{ !contains(github.event.pull_request.labels.*.name, 'no-test') }}
172270 id : test
173271 uses : eProsima/eProsima-CI/windows/colcon_test@v0
174272 with :
175273 colcon_meta_file : ${{ github.workspace }}\src\fastdds\.github\workflows\config\fastdds_test.meta
176274 colcon_test_args : ${{ inputs.colcon-args }}
177275 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) }}
179282 packages_names : fastdds
180283 workspace : ${{ github.workspace }}
181284 test_report_artifact : ${{ format('test_report_{0}_{1}_{2}', inputs.label, github.job, join(matrix.*, '_')) }}
182285
183286 - name : Test summary
184287 uses : eProsima/eProsima-CI/windows/junit_summary@v0
185- if : ${{ !cancelled() && !contains(github.event.pull_request.labels.*.name, 'no-test') }}
288+ if : ${{ !cancelled() }}
186289 with :
187290 junit_reports_dir : " ${{ steps.test.outputs.ctest_results_path }}"
188291 print_summary : ' True'
0 commit comments