42
42
runs-on : aks-linux-2-cores-8gb
43
43
container :
44
44
image : ' openvinogithubactions.azurecr.io/openvino_provider:0.1.0'
45
- volumes :
45
+ volumes :
46
46
- /mount:/mount
47
47
- ${{ github.workspace }}:${{ github.workspace }}
48
48
@@ -114,11 +114,11 @@ jobs:
114
114
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.SRC_DIR}} -B ${{ env.BUILD_DIR }}
115
115
cmake --build ${{ env.BUILD_DIR}} --config ${{ matrix.build-type }} --parallel $(nproc) --verbose
116
116
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.INSTALL_DIR }}
117
-
117
+
118
118
- name : Pack Artifacts
119
119
run : tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/${{ env.GENAI_ARCHIVE_NAME }}
120
120
working-directory : ${{ env.INSTALL_DIR }}
121
-
121
+
122
122
- name : Upload Archive Distribution Package
123
123
if : ${{ always() }}
124
124
uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
@@ -137,7 +137,7 @@ jobs:
137
137
runs-on : aks-linux-4-cores-16gb
138
138
container :
139
139
image : openvinogithubactions.azurecr.io/ov_build/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }}
140
- volumes :
140
+ volumes :
141
141
- /mount:/mount
142
142
- ${{ github.workspace }}:${{ github.workspace }}
143
143
options : -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
@@ -161,35 +161,35 @@ jobs:
161
161
name : ${{ needs.openvino_download.outputs.ov_artifact_name }}
162
162
path : ${{ env.OV_INSTALL_DIR }}
163
163
merge-multiple : true
164
-
164
+
165
165
- name : Build Tokenizers Wheel
166
166
run : |
167
167
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \
168
168
--config-settings=override=cross.arch="manylinux_2_31_x86_64" \
169
169
${{ needs.openvino_download.outputs.ov_wheel_source }} \
170
170
${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers
171
171
working-directory : ${{ env.OV_INSTALL_DIR }}
172
-
172
+
173
173
- name : Build GenAI Wheel
174
174
run : |
175
175
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \
176
176
--config-settings=override=cross.arch="manylinux_2_31_x86_64" \
177
177
${{ needs.openvino_download.outputs.ov_wheel_source }} \
178
178
${{ env.SRC_DIR }}
179
179
working-directory : ${{ env.OV_INSTALL_DIR }}
180
-
180
+
181
181
- name : Build WWB Wheel
182
182
run : python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ${{ env.SRC_DIR }}/tools/who_what_benchmark
183
183
working-directory : ${{ env.OV_INSTALL_DIR }}
184
-
184
+
185
185
- name : Upload Wheels
186
186
if : ${{ always() }}
187
187
uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
188
188
with :
189
189
name : genai_wheels
190
190
path : ${{ env.INSTALL_DIR }}
191
191
if-no-files-found : ' error'
192
-
192
+
193
193
genai_build_samples :
194
194
name : Build Samples - ${{ matrix.build-type }}
195
195
strategy :
@@ -204,7 +204,7 @@ jobs:
204
204
runs-on : aks-linux-2-cores-8gb
205
205
container :
206
206
image : openvinogithubactions.azurecr.io/ov_build/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }}
207
- volumes :
207
+ volumes :
208
208
- /mount:/mount
209
209
- ${{ github.workspace }}:${{ github.workspace }}
210
210
options : -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
@@ -228,25 +228,25 @@ jobs:
228
228
pattern : " {${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }}}"
229
229
path : ${{ env.OV_INSTALL_DIR }}
230
230
merge-multiple : true
231
-
231
+
232
232
- name : Extract Artifacts
233
233
run : pigz -dc ${{ env.GENAI_ARCHIVE_NAME }} | tar -xf - -C ${{ env.OV_INSTALL_DIR }}
234
234
working-directory : ${{ env.OV_INSTALL_DIR }}
235
-
235
+
236
236
- name : Build Samples (Release)
237
237
if : ${{ 'Release' == matrix.build-type }}
238
238
run : |
239
239
chmod +x ${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.sh
240
240
${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.sh -i ${{ env.INSTALL_DIR }}
241
-
241
+
242
242
- name : Build Samples (${{ matrix.build-type }})
243
243
if : ${{ 'Release' != matrix.build-type }}
244
244
run : |
245
245
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
246
246
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.OV_INSTALL_DIR }}/samples/cpp/ -B ${{ env.BUILD_DIR }}
247
247
cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $(nproc)
248
248
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --component samples_bin --prefix ${{ env.INSTALL_DIR }}
249
-
249
+
250
250
- name : Pack Artifacts
251
251
run : tar -cvf - * | pigz > ${{ env.INSTALL_DIR }}/${{ env.GENAI_SAMPLES_NAME }}
252
252
working-directory : ${{ env.INSTALL_DIR }}
@@ -258,7 +258,7 @@ jobs:
258
258
name : genai_samples_${{ matrix.build-type }}
259
259
path : ${{ env.INSTALL_DIR }}/*.tar.gz
260
260
if-no-files-found : ' error'
261
-
261
+
262
262
genai_tests_wheel :
263
263
name : Python (${{ matrix.test.name}}) Tests (wheel)
264
264
needs : [ openvino_download, genai_build_wheel ]
@@ -279,7 +279,7 @@ jobs:
279
279
runs-on : aks-linux-4-cores-16gb
280
280
container :
281
281
image : openvinogithubactions.azurecr.io/ov_test/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }}
282
- volumes :
282
+ volumes :
283
283
- /mount:/mount
284
284
- ${{ github.workspace }}:${{ github.workspace }}
285
285
@@ -289,47 +289,47 @@ jobs:
289
289
BUILD_DIR : ${{ github.workspace }}/build
290
290
TRANSFORMERS_CACHE : ${{ github.workspace }}/models # Hugging Face transformers cache
291
291
HF_HOME : ${{ github.workspace }}/datasets # Hugging Face datasets cache
292
-
292
+
293
293
steps :
294
294
- name : Clone openvino.genai
295
295
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
296
296
with :
297
297
path : ${{ env.SRC_DIR }}
298
298
submodules : recursive
299
-
299
+
300
300
- name : Download Build Artifacts
301
301
uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
302
302
with :
303
303
pattern : " {${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}"
304
304
path : ${{ env.INSTALL_DIR }}
305
305
merge-multiple : true
306
-
306
+
307
307
- name : Install GenAI Wheels
308
308
uses : ./src/.github/actions/install_wheel
309
309
with :
310
310
packages : " openvino;openvino_tokenizers[transformers];openvino_genai;whowhatbench"
311
311
requirements_files : " ${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
312
312
local_wheel_dir : ${{ env.INSTALL_DIR }}/wheels
313
-
313
+
314
314
- name : Tests
315
315
run : python -m pytest -v ./${{ matrix.test.cmd }}
316
316
working-directory : ${{ env.SRC_DIR }}
317
-
317
+
318
318
genai_samples_tests :
319
319
name : Samples Tests - ${{ matrix.build-type }}
320
320
strategy :
321
321
fail-fast : false
322
322
matrix :
323
323
build-type : [Release]
324
- needs : [ openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples ]
324
+ needs : [ openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples ]
325
325
timeout-minutes : 45
326
326
defaults :
327
327
run :
328
328
shell : bash
329
329
runs-on : aks-linux-2-cores-8gb
330
330
container :
331
331
image : openvinogithubactions.azurecr.io/ov_test/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }}
332
- volumes :
332
+ volumes :
333
333
- /mount:/mount
334
334
- ${{ github.workspace }}:${{ github.workspace }}
335
335
@@ -338,41 +338,41 @@ jobs:
338
338
SRC_DIR : ${{ github.workspace }}/src
339
339
BUILD_DIR : ${{ github.workspace }}/build
340
340
MODELS_DIR : ${{ github.workspace }}/models
341
-
341
+
342
342
steps :
343
343
- name : Clone openvino.genai
344
344
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
345
345
with :
346
346
path : ${{ env.SRC_DIR }}
347
347
submodules : recursive
348
-
348
+
349
349
- name : Download Build Artifacts
350
350
uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
351
351
with :
352
352
pattern : " {${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels}"
353
353
path : ${{ env.INSTALL_DIR }}
354
354
merge-multiple : true
355
-
355
+
356
356
- name : Extract Artifacts
357
357
run : |
358
358
pigz -dc ${{ env.GENAI_ARCHIVE_NAME }} | tar -xf - -C ${{ env.INSTALL_DIR }}
359
359
pigz -dc ${{ env.GENAI_SAMPLES_NAME }} | tar -xf - -C ${{ env.INSTALL_DIR }}
360
360
working-directory : ${{ env.INSTALL_DIR }}
361
-
361
+
362
362
- name : Install Wheels
363
363
uses : ./src/.github/actions/install_wheel
364
364
with :
365
365
packages : " openvino;openvino_tokenizers[transformers];openvino_genai"
366
366
requirements_files : " ${{ env.SRC_DIR }}/samples/requirements.txt"
367
367
local_wheel_dir : ${{ env.INSTALL_DIR }}/wheels
368
-
368
+
369
369
- name : Download & convert Models and data
370
370
run : |
371
371
mkdir -p ${{ env.MODELS_DIR }}
372
372
optimum-cli export openvino --trust-remote-code --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 ${{ env.MODELS_DIR }}/TinyLlama-1.1B-Chat-v1.0
373
373
optimum-cli export openvino --trust-remote-code --model openai/whisper-tiny ${{ env.MODELS_DIR }}/whisper-tiny
374
374
wget https://storage.openvinotoolkit.org/models_contrib/speech/2021.2/librispeech_s5/how_are_you_doing_today.wav -O ${{ env.MODELS_DIR }}/how_are_you_doing_today.wav
375
-
375
+
376
376
- name : Test multinomial_causal_lm.py
377
377
if : ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
378
378
timeout-minutes : 1
@@ -384,10 +384,10 @@ jobs:
384
384
timeout-minutes : 1
385
385
run : ${{ env.INSTALL_DIR }}/samples/python/whisper_speech_recognition/whisper_speech_recognition.py ./whisper-tiny/ how_are_you_doing_today.wav
386
386
working-directory : ${{ env.MODELS_DIR }}
387
-
387
+
388
388
- name : C++ Tests Prerequisites
389
389
run : python -m pip uninstall openvino openvino-tokenizers openvino-genai -y
390
-
390
+
391
391
- name : Test greedy_causal_lm
392
392
run : |
393
393
source ${{ env.INSTALL_DIR }}/setupvars.sh
@@ -400,9 +400,93 @@ jobs:
400
400
${{ env.INSTALL_DIR }}/samples_bin/whisper_speech_recognition ./whisper-tiny/ how_are_you_doing_today.wav
401
401
working-directory : ${{ env.MODELS_DIR }}
402
402
403
+ genai_build_nodejs_bindings :
404
+ name : Build Node.js bindings
405
+ strategy :
406
+ fail-fast : false
407
+ matrix :
408
+ build-type : [Release]
409
+ needs : [ openvino_download ]
410
+ timeout-minutes : 20
411
+ defaults :
412
+ run :
413
+ shell : bash
414
+ runs-on : aks-linux-4-cores-16gb
415
+ container :
416
+ image : openvinogithubactions.azurecr.io/ov_build/ubuntu_22_04_x64:${{ needs.openvino_download.outputs.docker_tag }}
417
+ volumes :
418
+ - /mount:/mount
419
+ options : -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING -v ${{ github.workspace }}:${{ github.workspace }}
420
+ env :
421
+ CMAKE_GENERATOR : Unix Makefiles
422
+ OV_INSTALL_DIR : ${{ github.workspace }}/ov
423
+ BUILD_DIR : ${{ github.workspace }}/build
424
+ SRC_DIR : ${{ github.workspace }}/src
425
+
426
+ steps :
427
+ - name : Clone openvino.genai
428
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
429
+ with :
430
+ path : ${{ env.SRC_DIR }}
431
+ submodules : recursive
432
+
433
+ - name : Download OpenVINO package
434
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
435
+ with :
436
+ name : ${{ needs.openvino_download.outputs.ov_artifact_name }}
437
+ path : ${{ env.OV_INSTALL_DIR }}
438
+ merge-multiple : true
439
+
440
+ - name : Build with ENABLE_JS=ON
441
+ run : |
442
+ source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
443
+ cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DENABLE_JS=ON -S ${{ env.SRC_DIR }} -B ${{ env.BUILD_DIR }}
444
+ cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $(nproc) --verbose
445
+ cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.OV_INSTALL_DIR }}
446
+
447
+ - name : Combine binaries for Node.js package
448
+ run : |
449
+ mkdir -p nodejs
450
+ cp -r runtime/lib/intel64/* nodejs
451
+ cp -r runtime/3rdparty/tbb/lib/* nodejs
452
+ cp genai_node_addon.node nodejs
453
+ GENAI_VERSION=$(grep -oP '(?<=CMAKE_PROJECT_VERSION:STATIC=)[^"]*' ${{ env.BUILD_DIR }}/CMakeCache.txt)
454
+ OV_VERSION=$(echo $GENAI_VERSION | sed 's/..$//')
455
+ patchelf --set-rpath '$ORIGIN' nodejs/libopenvino.so.$OV_VERSION nodejs/libopenvino_genai.so.$GENAI_VERSION
456
+ working-directory : ${{ env.OV_INSTALL_DIR }}
457
+
458
+ - name : Pack Node.js bindings libs
459
+ run : tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/genai_nodejs_bindings.tar.gz
460
+ working-directory : ${{ env.OV_INSTALL_DIR }}/nodejs
461
+
462
+ - name : Upload Archive Package with Node.js bindings
463
+ if : ${{ always() }}
464
+ uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
465
+ with :
466
+ name : genai_nodejs_bindings
467
+ path : ${{ env.BUILD_DIR }}/genai_nodejs_bindings.tar.gz
468
+ if-no-files-found : ' error'
469
+
470
+ - name : Run npm package tests
471
+ working-directory : ${{ env.SRC_DIR }}/src/js
472
+ run : |
473
+ cp -R ${{ env.OV_INSTALL_DIR }}/nodejs bin
474
+ npm install
475
+ npm test
476
+
477
+ - name : Install genai-node samples dependencies
478
+ run : npm install
479
+ working-directory : ${{ env.SRC_DIR }}/samples/js/text_generation
480
+
481
+ - name : Run samples tests
482
+ run : npm test
483
+ env :
484
+ MODEL_PATH : ${{ env.SRC_DIR }}/src/js/tests/models/Llama-3.1-8B-Instruct-FastDraft-150M-int8-ov
485
+ working-directory : ${{ env.SRC_DIR }}/samples/js/text_generation
486
+
403
487
Overall_Status :
404
488
name : ci/gha_overall_status_linux
405
- needs : [openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples, genai_tests_wheel, genai_samples_tests]
489
+ needs : [openvino_download, genai_build_cmake, genai_build_wheel, genai_build_samples, genai_tests_wheel, genai_samples_tests, genai_build_nodejs_bindings ]
406
490
if : ${{ always() }}
407
491
runs-on : ubuntu-latest
408
492
steps :
0 commit comments