21
21
description : ' A string of options passed to CMake'
22
22
type : string
23
23
required : true
24
+ build-additional-python-wheels :
25
+ description : ' Whether to build additional, i.e., non-system Python wheels. Should have Python 3.9-3.12 installed'
26
+ type : boolean
27
+ required : false
28
+ default : false
24
29
25
30
permissions : read-all
26
31
@@ -157,8 +162,7 @@ jobs:
157
162
run : echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV
158
163
159
164
- name : CMake configure
160
- run : |
161
- cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}
165
+ run : cmake -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} ${{ inputs.cmake-options }}
162
166
163
167
- name : Clean ccache stats
164
168
run : ' & ccache --zero-stats'
@@ -176,6 +180,54 @@ jobs:
176
180
cmake --install . --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests
177
181
working-directory : ${{ env.BUILD_DIR }}
178
182
183
+ # Setup additional Python versions for wheels building
184
+ - name : Setup Python 3.9
185
+ if : ${{ inputs.build-additional-python-wheels }}
186
+ uses : ./openvino/.github/actions/setup_python
187
+ with :
188
+ version : ' 3.9'
189
+ pip-cache-path : ${{ env.PIP_CACHE_PATH }}
190
+ should-setup-pip-paths : ' true'
191
+ self-hosted-runner : ' true'
192
+
193
+ # Setup additional Python versions for wheels building
194
+ - name : Setup Python 3.10
195
+ if : ${{ inputs.build-additional-python-wheels }}
196
+ uses : ./openvino/.github/actions/setup_python
197
+ with :
198
+ version : ' 3.10'
199
+ pip-cache-path : ${{ env.PIP_CACHE_PATH }}
200
+ should-setup-pip-paths : ' true'
201
+ self-hosted-runner : ' true'
202
+
203
+ # Setup additional Python versions for wheels building
204
+ - name : Setup Python 3.12
205
+ if : ${{ inputs.build-additional-python-wheels }}
206
+ uses : ./openvino/.github/actions/setup_python
207
+ with :
208
+ version : ' 3.12'
209
+ pip-cache-path : ${{ env.PIP_CACHE_PATH }}
210
+ should-setup-pip-paths : ' true'
211
+ self-hosted-runner : ' true'
212
+
213
+ - name : Build additional Python wheels
214
+ if : ${{ inputs.build-additional-python-wheels }}
215
+ run : |
216
+ $pyVersions = '3.9', '3.10', '3.12'
217
+ foreach ($pyVersion in $pyVersions) {
218
+ $pyBuildDir = "${{ github.workspace }}/py$pyVersion"
219
+ New-Item -ItemType Directory -Path "$pyBuildDir" -Force
220
+
221
+ $pythonCommand = "py -$pyVersion -c `"import sys; print(f'{sys.executable}')`""
222
+ $pythonExecutablePath = & cmd /c $pythonCommand
223
+
224
+ & $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
225
+
226
+ cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir"
227
+ cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
228
+ cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
229
+ }
230
+
179
231
- name : Pack Artifacts
180
232
run : |
181
233
$file = Get-ChildItem -Path "${{ env.INSTALL_DIR }}"
@@ -220,7 +272,7 @@ jobs:
220
272
uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
221
273
with :
222
274
name : openvino_wheels
223
- path : ${{ env.BUILD_DIR }}/wheels/*.whl
275
+ path : ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
224
276
if-no-files-found : ' error'
225
277
226
278
- name : Upload openvino tests package
0 commit comments