Skip to content

Commit 6c9df08

Browse files
committed
Similar changes for windows
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
1 parent 1f703e4 commit 6c9df08

2 files changed

Lines changed: 29 additions & 5 deletions

File tree

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

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ defaults:
7171
jobs:
7272
fastdds_python_build:
7373
runs-on: ${{ inputs.os-version }}
74-
if: ${{ inputs.run-build == true }}
7574
strategy:
7675
fail-fast: false
7776
matrix:
@@ -88,27 +87,32 @@ jobs:
8887
repo: eProsima/Fast-DDS-Python
8988

9089
- name: Sync eProsima/Fast-DDS-Python repository
90+
if: ${{ inputs.run-build == true }}
9191
uses: eProsima/eProsima-CI/external/checkout@v0
9292
with:
9393
path: src/fastdds_python
9494
ref: ${{ inputs.fastdds-python-branch }}
9595

9696
- name: Install Fix Python version
97+
if: ${{ inputs.run-build == true }}
9798
uses: eProsima/eProsima-CI/external/setup-python@v0
9899
with:
99100
python-version: '3.11'
100101

101102
- name: Get minimum supported version of CMake
103+
if: ${{ inputs.run-build == true }}
102104
uses: eProsima/eProsima-CI/external/get-cmake@v0
103105
with:
104106
cmakeVersion: ${{ inputs.cmake-version }}
105107

106108
- name: Install OpenSSL
109+
if: ${{ inputs.run-build == true }}
107110
uses: eProsima/eprosima-CI/windows/install_openssl@v0
108111
with:
109112
version: '3.1.1'
110113

111114
- name: Update OpenSSL environment variables
115+
if: ${{ inputs.run-build == true }}
112116
run: |
113117
# Update the environment
114118
if (Test-Path -Path $Env:ProgramW6432\OpenSSL)
@@ -130,26 +134,31 @@ jobs:
130134
}
131135
132136
- name: Install colcon
137+
if: ${{ inputs.run-build == true }}
133138
uses: eProsima/eProsima-CI/windows/install_colcon@v0
134139

135140
- name: Install Python dependencies
141+
if: ${{ inputs.run-build == true }}
136142
uses: eProsima/eProsima-CI/windows/install_python_packages@v0
137143
with:
138144
packages: vcstool xmlschema pywin32
139145

140146
- name: Install swig
147+
if: ${{ inputs.run-build == true }}
141148
shell: pwsh
142149
run: choco install swig --allow-downgrade --version=${{ inputs.swig-version }}
143150

144151
- name: Get Fast CDR branch
145152
id: get_fastcdr_branch
153+
if: ${{ inputs.run-build == true }}
146154
uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
147155
with:
148156
remote_repository: eProsima/Fast-CDR
149157
fallback_branch: ${{ inputs.fastcdr-branch }}
150158
skip_base: true
151159

152160
- name: Download Fast CDR
161+
if: ${{ inputs.run-build == true }}
153162
uses: eProsima/eProsima-CI/external/checkout@v0
154163
with:
155164
repository: eProsima/Fast-CDR
@@ -158,19 +167,22 @@ jobs:
158167

159168
- name: Get Fast DDS branch
160169
id: get_fastdds_branch
170+
if: ${{ inputs.run-build == true }}
161171
uses: eProsima/eProsima-CI/multiplatform/get_related_branch_from_repo@v0
162172
with:
163173
remote_repository: eProsima/Fast-DDS
164174
fallback_branch: ${{ inputs.fastdds-branch }}
165175

166176
- name: Download Fast DDS repo
177+
if: ${{ inputs.run-build == true }}
167178
uses: eProsima/eProsima-CI/external/checkout@v0
168179
with:
169180
repository: eProsima/Fast-DDS
170181
path: src/fastdds
171182
ref: ${{ steps.get_fastdds_branch.outputs.deduced_branch }}
172183

173184
- name: Fetch Fast DDS Python dependencies
185+
if: ${{ inputs.run-build == true }}
174186
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
175187
with:
176188
vcs_repos_file: ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos
@@ -179,6 +191,7 @@ jobs:
179191

180192
- name: Colcon build
181193
continue-on-error: false
194+
if: ${{ inputs.run-build == true }}
182195
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
183196
with:
184197
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta
@@ -190,6 +203,7 @@ jobs:
190203
workspace: ${{ github.workspace }}
191204

192205
- name: Upload build artifacts
206+
if: ${{ inputs.run-build == true }}
193207
uses: eProsima/eProsima-CI/external/upload-artifact@v0
194208
with:
195209
name: fastdds_python_build_${{ inputs.label }}
@@ -199,35 +213,39 @@ jobs:
199213
fastdds_python_test:
200214
needs: fastdds_python_build
201215
runs-on: ${{ inputs.os-version }}
202-
if: ${{ inputs.run-tests == true }}
203216
strategy:
204217
fail-fast: false
205218
matrix:
206219
cmake-build-type:
207220
- 'RelWithDebInfo'
208221
steps:
209222
- name: Download python build artifacts
223+
if: ${{ inputs.run-tests == true }}
210224
uses: eProsima/eProsima-CI/external/download-artifact@v0
211225
with:
212226
name: fastdds_python_build_${{ inputs.label }}
213227
path: ${{ github.workspace }}
214228

215229
- name: Install Fix Python version
230+
if: ${{ inputs.run-tests == true }}
216231
uses: eProsima/eProsima-CI/external/setup-python@v0
217232
with:
218233
python-version: '3.11'
219234

220235
- name: Get minimum supported version of CMake
236+
if: ${{ inputs.run-tests == true }}
221237
uses: eProsima/eProsima-CI/external/get-cmake@v0
222238
with:
223239
cmakeVersion: ${{ inputs.cmake-version }}
224240

225241
- name: Install OpenSSL
242+
if: ${{ inputs.run-tests == true }}
226243
uses: eProsima/eprosima-CI/windows/install_openssl@v0
227244
with:
228245
version: '3.1.1'
229246

230247
- name: Update OpenSSL environment variables
248+
if: ${{ inputs.run-tests == true }}
231249
run: |
232250
# Update the environment
233251
if (Test-Path -Path $Env:ProgramW6432\OpenSSL)
@@ -249,22 +267,27 @@ jobs:
249267
}
250268
251269
- name: Install colcon
270+
if: ${{ inputs.run-tests == true }}
252271
uses: eProsima/eProsima-CI/windows/install_colcon@v0
253272

254273
- name: Install Python dependencies
274+
if: ${{ inputs.run-tests == true }}
255275
uses: eProsima/eProsima-CI/windows/install_python_packages@v0
256276
with:
257277
packages: vcstool xmlschema pywin32 pytest
258278

259279
- name: Install swig
280+
if: ${{ inputs.run-tests == true }}
260281
shell: pwsh
261282
run: choco install swig --allow-downgrade --version=${{ inputs.swig-version }}
262283

263284
- name: Install doxygen
285+
if: ${{ inputs.run-tests == true }}
264286
uses: eProsima/eProsima-CI/external/install_doxygen@v0
265287

266288
- name: Colcon build
267289
continue-on-error: false
290+
if: ${{ inputs.run-tests == true }}
268291
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
269292
with:
270293
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta
@@ -278,6 +301,7 @@ jobs:
278301

279302
- name: Colcon test
280303
id: python_test
304+
if: ${{ inputs.run-tests == true }}
281305
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
282306
with:
283307
colcon_meta_file: ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/windows_test.meta
@@ -291,7 +315,7 @@ jobs:
291315

292316
- name: Test summary
293317
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
294-
if: ${{ !cancelled() }}
318+
if: ${{ inputs.run-tests == true && !cancelled() }}
295319
with:
296320
junit_reports_dir: "${{ steps.python_test.outputs.ctest_results_path }}"
297321
print_summary: 'True'

.github/workflows/windows-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }}
6969
fastdds-branch: ${{ inputs.fastdds-branch || 'master' }}
7070
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
71-
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
71+
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test')) && !contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
7272

7373
windows-ci-stable-abi:
7474
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
@@ -88,5 +88,5 @@ jobs:
8888
fastdds-python-branch: ${{ inputs.fastdds-python-branch || github.ref }}
8989
fastdds-branch: ${{ inputs.fastdds-branch || 'master' }}
9090
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
91-
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
91+
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test')) && !contains(github.event.pull_request.labels.*.name, 'skip-ci')) }}
9292
swig-version: '4.3.1'

0 commit comments

Comments
 (0)