-
Notifications
You must be signed in to change notification settings - Fork 3.1k
347 lines (312 loc) · 14.1 KB
/
manylinux_2_28.yml
File metadata and controls
347 lines (312 loc) · 14.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
name: Manylinux 2_28
on:
workflow_dispatch:
inputs:
target-branch:
description: 'Target branch for the build; taken from event context by default'
type: string
required: false
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
merge_group:
push:
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-manylinux-2-28
cancel-in-progress: true
permissions: read-all
env:
PIP_CACHE_PATH: /mount/caches/pip/linux
jobs:
Smart_CI:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false || github.run_attempt > 1
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
ref_name: ${{ github.ref_name }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg'
- name: Show affected components
run: |
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
shell: bash
Docker:
needs: Smart_CI
runs-on: aks-linux-4-cores-16gb-docker-build
container:
image: openvinogithubactions.azurecr.io/docker_build:0.2
volumes:
- /mount:/mount
outputs:
images: "${{ steps.handle_docker.outputs.images && steps.handle_docker.outputs.images || steps.mock_image.outputs.images }}"
steps:
- name: Set mock output images if pipeline should be skipped
if: ${{ needs.smart_ci.outputs.skip_workflow == 'True' }}
id: mock_image
run: echo "images={\"ov_test\":{\"ubuntu_20_04_x64_py313\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64\":\"mock\"},\"ov_test\":{\"ubuntu_22_04_x64_py314\":\"mock\"},\"ov_test\":{\"ubuntu_24_04_x64\":\"mock\"},\"ov_test\":{\"fedora_33\":\"mock\"},\"ov_test\":{\"debian_10_py310\":\"mock\"},\"ov_build\":{\"manylinux_2_28\":\"mock\"}}" >> "$GITHUB_OUTPUT"
- name: Checkout
if: ${{ needs.smart_ci.outputs.skip_workflow != 'True' }}
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
- uses: ./.github/actions/handle_docker
if: ${{ needs.smart_ci.outputs.skip_workflow != 'True' }}
id: handle_docker
with:
images: |
ov_build/manylinux_2_28
ov_test/ubuntu_20_04_x64_py313
ov_test/ubuntu_22_04_x64
ov_test/ubuntu_22_04_x64_py314
ov_test/ubuntu_22_04_x64_py314t
ov_test/ubuntu_24_04_x64
ov_test/fedora_33
ov_test/debian_10_py310
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}
Build:
needs: [Docker, Smart_CI]
if: "!needs.smart_ci.outputs.skip_workflow"
timeout-minutes: 120
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores-32gb
container:
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.manylinux_2_28 }}
volumes:
- /mount:/mount
- /home/runner/secrets/:/secrets:ro
options: -e SCCACHE_AZURE_BLOB_CONTAINER -v ${{ github.workspace }}:${{ github.workspace }}
env:
CMAKE_BUILD_TYPE: 'Release'
ARCH: 'x86_64'
OPENVINO_REPO: ${{ github.workspace }}/src
INSTALL_DIR: ${{ github.workspace }}/install/openvino
INSTALL_WHEELS_DIR: ${{ github.workspace }}/install/wheels
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
BUILD_DIR: ${{ github.workspace }}/build
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
SCCACHE_IGNORE_SERVER_IO_ERROR: 1
SCCACHE_SERVER_PORT: 35555
SCCACHE_CACHE_SIZE: 50G
SCCACHE_AZURE_KEY_PREFIX: manylinux_2_28
ARTIFACTS_SHARE: "/mount/build-artifacts"
MANIFEST_PATH: ${{ github.workspace }}/manifest.yml
PRODUCT_TYPE: public_manylinux_2_28_x86_64_release
NODE_VERSION: 22
steps:
- name: Append the environment variable - load SCCACHE_AZURE_CONNECTION_STRING from file
shell: bash
run: |
SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"
echo "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"
echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENV
echo "✓ Connection string loaded and masked"
- name: Clone OpenVINO
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
path: ${{ env.OPENVINO_REPO }}
submodules: 'true'
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: System info
uses: ./src/.github/actions/system_info
- name: Generate product manifest and set CI_BUILD_NUMBER & CI_BUILD_DEV_TAG
id: create_manifest
uses: ./src/.github/actions/create_manifest
with:
repos: |
${{ env.OPENVINO_REPO }}
product_type: ${{ env.PRODUCT_TYPE }}
target_arch: ${{ env.ARCH }}
build_type: ${{ env.CMAKE_BUILD_TYPE }}
save_to: ${{ env.MANIFEST_PATH }}
trigger_repo_branch: ${{ inputs.target-branch }}
- name: Build OpenVINO
run: |
python3.12 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
/usr/bin/cmake -DPython3_EXECUTABLE=/usr/local/bin/python3.12 \
-DENABLE_NCC_STYLE=OFF \
-DENABLE_TESTS=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_OV_JAX_FRONTEND=OFF \
-DENABLE_PYTHON=ON \
-DENABLE_WHEEL=ON \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
/usr/bin/cmake --build ${{ env.BUILD_DIR }} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }}
/usr/bin/cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }}
/usr/bin/cmake --install ${{ env.BUILD_DIR }} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_TEST_DIR }} --component tests
env:
CXXFLAGS: "-Wno-dangling-reference" # bug in gcc-14: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107532
- name: Build Python API (Python 3.10-3.14t)
run: |
SUPPORTED_PYTHON_VERSIONS=("3.10" "3.11" "3.12" "3.13" "3.14" "3.14t")
for PY_VER in "${SUPPORTED_PYTHON_VERSIONS[@]}"; do
py_build_dir=${{ github.workspace }}/build_py${PY_VER}
simpler_python_version=$(echo $PY_VER | sed -e 's/\.//g')
if [ "$PY_VER" == "3.14t" ]; then
python_path=/opt/python/cp314-cp314t/bin/python3
else
python_path=/opt/python/cp${simpler_python_version}-cp${simpler_python_version}/bin/python3
fi
PIP_VER=$(${python_path} -c "import pip; print(pip.__version__)")
export "PIP_CACHE_DIR=${{ env.PIP_CACHE_PATH }}/${PIP_VER}"
${python_path} -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
if [[ $PY_VER == "3.14t" ]]; then
/usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_GIL_PYTHON_API=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}
else
/usr/bin/cmake -DPython3_EXECUTABLE=${python_path} -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B ${py_build_dir}
fi
/usr/bin/cmake --build ${py_build_dir} --parallel $(nproc) --config ${{ env.CMAKE_BUILD_TYPE }}
/usr/bin/cmake --install ${py_build_dir} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
/usr/bin/cmake --install ${py_build_dir} --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_DIR }} --component pyopenvino_python${PY_VER}
done
- name: Build OpenVINO JS API
run: |
/usr/bin/cmake -UTBB* -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }} \
-DCPACK_GENERATOR=NPM \
-DENABLE_SYSTEM_TBB=OFF \
-DENABLE_WHEEL=OFF
/usr/bin/cmake --build ${{ env.BUILD_DIR }} --parallel $(nproc)
/usr/bin/cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.OPENVINO_REPO }}/src/bindings/js/node/bin
- name: Pack Artifacts
run: mkdir -p ${{ env.BUILD_DIR }} && tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_package.tar.gz
working-directory: ${{ env.INSTALL_DIR }}
- name: Pack openvino_tests
run: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
working-directory: ${{ env.INSTALL_TEST_DIR }}
- name: Pack openvino_node_npm_package
run: |
npm i
npm pack
tar -czvf ${BUILD_DIR}/openvino_node_npm_package.tar.gz bin openvino-node-*
working-directory: ${{ env.OPENVINO_REPO }}/src/bindings/js/node
#
# Upload build artifacts
#
- name: Upload OpenVINO package
if: ${{ always() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'
- name: Upload OpenVINO wheels
if: ${{ always() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: openvino_wheels
path: ${{ env.INSTALL_WHEELS_DIR }}/wheels/*.whl
if-no-files-found: 'error'
- name: Upload OpenVINO tests package
if: ${{ always() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'
- name: Upload openvino-node NPM package
if: ${{ always() }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: openvino_node_npm_package
path: ${{ env.BUILD_DIR }}/openvino_node_npm_package.tar.gz
if-no-files-found: 'error'
- name: Store artifacts to a shared drive
id: store_artifacts
if: ${{ github.event_name != 'merge_group' }}
uses: ./src/.github/actions/store_artifacts
with:
artifacts: |
${{ env.BUILD_DIR }}/openvino_package.tar.gz
${{ env.BUILD_DIR }}/openvino_tests.tar.gz
${{ env.BUILD_DIR }}/openvino_node_npm_package.tar.gz
${{ env.MANIFEST_PATH }}
${{ env.INSTALL_WHEELS_DIR }}/wheels
storage_dir: ${{ env.PRODUCT_TYPE }}
storage_root: ${{ env.ARTIFACTS_SHARE }}
branch_name: ${{ inputs.target-branch }}
Python_API_Tests:
name: Python API tests
needs: [ Docker, Build, Smart_CI ]
uses: ./.github/workflows/job_python_api_tests.yml
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.10"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.debian_10_py310 }}
- python-version: "3.11"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}
- python-version: "3.12"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_24_04_x64 }}
- python-version: "3.13"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_x64_py313 }}
- python-version: "3.14"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py314 }}
- python-version: "3.14t"
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64_py314t }}
with:
runner: 'aks-linux-4-cores-16gb'
image: ${{ matrix.image }}
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
python-version: ${{ matrix.python-version }}
NodeJS_API_Tests:
name: NodeJS API tests
needs: [ Docker, Build, Smart_CI ]
uses: ./.github/workflows/job_openvino_js.yml
strategy:
fail-fast: false
matrix:
include:
- nodejs-version: 20
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}
- nodejs-version: 22
image: ${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_22_04_x64 }}
with:
runner: 'aks-linux-4-cores-16gb'
image: ${{ matrix.image }}
nodejs-version: ${{ matrix.nodejs-version }}
Overall_Status:
name: ci/gha_overall_status_manylinux_2_28
needs: [Smart_CI, Build, Python_API_Tests, NodeJS_API_Tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1