@@ -59,7 +59,6 @@ defaults:
5959jobs :
6060 fastdds_python_build :
6161 runs-on : ${{ inputs.os-version }}
62- if : ${{ inputs.run-build == true }}
6362 strategy :
6463 fail-fast : false
6564 matrix :
@@ -75,52 +74,60 @@ jobs:
7574 repo : eProsima/Fast-DDS-Python
7675
7776 - name : Sync eProsima/Fast-DDS-Python repository
77+ if : ${{ inputs.run-build == true }}
7878 uses : eProsima/eProsima-CI/external/checkout@v0
7979 with :
8080 path : src/fastdds_python
8181 ref : ${{ inputs.fastdds-python-branch }}
8282
8383 - name : Install Fix Python version
84+ if : ${{ inputs.run-build == true }}
8485 uses : eProsima/eProsima-CI/external/setup-python@v0
8586 with :
8687 python-version : ' 3.11'
8788
8889 - name : Get minimum supported version of CMake
90+ if : ${{ inputs.run-build == true }}
8991 uses : eProsima/eProsima-CI/external/get-cmake@v0
9092 with :
9193 cmakeVersion : ' 3.24.4'
9294
9395 - name : Install apt dependencies
96+ if : ${{ inputs.run-build == true }}
9497 uses : eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
9598 with :
9699 packages : libasio-dev libtinyxml2-dev libssl-dev swig
97100 update : false
98101 upgrade : false
99102
100103 - name : Install colcon
104+ if : ${{ inputs.run-build == true }}
101105 uses : eProsima/eProsima-CI/ubuntu/install_colcon@v0
102106
103107 - name : Install Python dependencies
108+ if : ${{ inputs.run-build == true }}
104109 uses : eProsima/eProsima-CI/multiplatform/install_python_packages@v0
105110 with :
106111 packages : vcstool xmlschema
107112 upgrade : false
108113
109114 - name : Setup CCache
115+ if : ${{ inputs.run-build == true && inputs.use-ccache == true }}
110116 uses : eProsima/eProsima-CI/external/setup-ccache-action@v0
111- if : ${{ inputs.use-ccache == true }}
112117 with :
113118 api_token : ${{ secrets.GITHUB_TOKEN }}
114119
115120 - name : Get Fast CDR branch
116121 id : get_fastcdr_branch
122+ if : ${{ inputs.run-build == true }}
117123 uses : eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
118124 with :
119125 remote_repository : eProsima/Fast-CDR
120126 fallback_branch : ${{ inputs.fastcdr-branch }}
121127 skip_base : true
122128
123129 - name : Download Fast CDR
130+ if : ${{ inputs.run-build == true }}
124131 uses : eProsima/eProsima-CI/external/checkout@v0
125132 with :
126133 repository : eProsima/Fast-CDR
@@ -129,26 +136,30 @@ jobs:
129136
130137 - name : Get Fast DDS branch
131138 id : get_fastdds_branch
139+ if : ${{ inputs.run-build == true }}
132140 uses : eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0
133141 with :
134142 remote_repository : eProsima/Fast-DDS
135143 fallback_branch : ${{ inputs.fastdds-branch }}
136144
137145 - name : Download Fast DDS repo
146+ if : ${{ inputs.run-build == true }}
138147 uses : eProsima/eProsima-CI/external/checkout@v0
139148 with :
140149 repository : eProsima/Fast-DDS
141150 path : src/fastdds
142151 ref : ${{ steps.get_fastdds_branch.outputs.deduced_branch }}
143152
144153 - name : Fetch Fast DDS Python dependencies
154+ if : ${{ inputs.run-build == true }}
145155 uses : eProsima/eProsima-CI/multiplatform/vcs_import@v0
146156 with :
147157 vcs_repos_file : ${{ github.workspace }}/src/fastdds_python/fastdds_python.repos
148158 destination_workspace : src
149159 skip_existing : ' true'
150160
151161 - name : Colcon build
162+ if : ${{ inputs.run-build == true }}
152163 continue-on-error : false
153164 uses : eProsima/eProsima-CI/multiplatform/colcon_build@v0
154165 with :
@@ -159,6 +170,7 @@ jobs:
159170 workspace : ${{ github.workspace }}
160171
161172 - name : Upload build artifacts
173+ if : ${{ inputs.run-build == true }}
162174 uses : eProsima/eProsima-CI/external/upload-artifact@v0
163175 with :
164176 name : fastdds_python_build_${{ inputs.label }}
@@ -167,50 +179,56 @@ jobs:
167179 fastdds_python_test :
168180 needs : fastdds_python_build
169181 runs-on : ${{ inputs.os-version }}
170- if : ${{ inputs.run-tests == true }}
171182 strategy :
172183 fail-fast : false
173184 matrix :
174185 cmake-build-type :
175186 - ' RelWithDebInfo'
176187 steps :
177188 - name : Download python build artifacts
189+ if : ${{ inputs.run-tests == true }}
178190 uses : eProsima/eProsima-CI/external/download-artifact@v0
179191 with :
180192 name : fastdds_python_build_${{ inputs.label }}
181193 path : ${{ github.workspace }}
182194
183195 - name : Install Fix Python version
196+ if : ${{ inputs.run-tests == true }}
184197 uses : eProsima/eProsima-CI/external/setup-python@v0
185198 with :
186199 python-version : ' 3.11'
187200
188201 - name : Get minimum supported version of CMake
202+ if : ${{ inputs.run-tests == true }}
189203 uses : eProsima/eProsima-CI/external/get-cmake@v0
190204 with :
191205 cmakeVersion : ' 3.24.4'
192206
193207 - name : Install apt packages
208+ if : ${{ inputs.run-tests == true }}
194209 uses : eProsima/eProsima-CI/ubuntu/install_apt_packages@v0
195210 with :
196211 packages : libasio-dev libtinyxml2-dev libssl-dev swig doxygen
197212
198213 - name : Install colcon
214+ if : ${{ inputs.run-tests == true }}
199215 uses : eProsima/eProsima-CI/ubuntu/install_colcon@v0
200216
201217 - name : Install Python dependencies
218+ if : ${{ inputs.run-tests == true }}
202219 uses : eProsima/eProsima-CI/ubuntu/install_python_packages@v0
203220 with :
204221 packages : xmlschema pytest
205222
206223 - name : Setup CCache
224+ if : ${{ inputs.run-tests == true && inputs.use-ccache == true }}
207225 uses : eProsima/eProsima-CI/external/setup-ccache-action@v0
208- if : ${{ inputs.use-ccache == true }}
209226 with :
210227 api_token : ${{ secrets.GITHUB_TOKEN }}
211228
212229 - name : Colcon build
213230 continue-on-error : false
231+ if : ${{ inputs.run-tests == true }}
214232 uses : eProsima/eProsima-CI/multiplatform/colcon_build@v0
215233 with :
216234 colcon_meta_file : ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
@@ -223,6 +241,7 @@ jobs:
223241
224242 - name : Colcon test
225243 id : python_test
244+ if : ${{ inputs.run-tests == true }}
226245 uses : eProsima/eProsima-CI/multiplatform/colcon_test@v0
227246 with :
228247 colcon_meta_file : ${{ github.workspace }}/src/fastdds_python/.github/workflows/config/ubuntu_test.meta
@@ -236,7 +255,7 @@ jobs:
236255
237256 - name : Fast DDS Python test summary
238257 uses : eProsima/eProsima-CI/multiplatform/junit_summary@v0
239- if : ${{ !cancelled() }}
258+ if : ${{ inputs.run-tests == true && !cancelled() }}
240259 with :
241260 junit_reports_dir : " ${{ steps.python_test.outputs.ctest_results_path }}"
242261 print_summary : ' True'
0 commit comments