forked from openvinotoolkit/openvino.genai
-
Notifications
You must be signed in to change notification settings - Fork 0
851 lines (749 loc) · 34.1 KB
/
linux.yml
File metadata and controls
851 lines (749 loc) · 34.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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
name: Linux (Ubuntu 22.04, Python 3.11)
on:
workflow_dispatch:
pull_request:
merge_group:
push:
branches:
- master
- "releases/**"
permissions: read-all
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux
cancel-in-progress: true
env:
PYTHON_VERSION: "3.11"
OV_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }}
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
CCACHE_MAXSIZE: 2G
HF_HOME: ~/.cache/huggingface
OV_CACHE: ~/.cache/ov_cache
GENAI_ARCHIVE_NAME: genai.tar.gz
GENAI_SAMPLES_NAME: genai_samples.tar.gz
BASE_PRODUCT_TYPE: public_linux_ubuntu_22_04_x86_64
GENAI_WHEELS_ARTIFACT_NAME: "genai_wheels"
GENAI_ARCHIVE_ARTIFACT_BASE_NAME: "genai_archive"
jobs:
smart_ci:
name: Smart CI
runs-on: ubuntu-latest
outputs:
skip_workflow: "false"
affected_components: '{"continuous_batching": {"test": true}, "LLM": {"test": true}, "visual_language": {"test": true}, "whisper": {"test": true}, "tokenizers": {"test": true}, "sampling": {"test": true}, "text_streamer": {"test": true}, "RAG": {"test": true}, "WWB": {"test": true}, "LLM_samples": {"test": true}, "Whisper_samples": {"test": true}, "Image_generation_samples": {"test": true}, "VLM_samples": {"test": true}, "RAG_samples": {"test": true}, "Speech_generation_samples": {"test": true}, "llm_bench": true, "JS_API": true}'
steps:
- name: checkout action
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
timeout-minutes: 15
- name: Show affected components
run: echo "Running all tests on forked repository"
shell: bash
openvino_download:
needs: smart_ci
name: Download OpenVINO
outputs:
status: ${{ steps.openvino_download.outcome }}
ov_artifact_name: "openvino_package"
ov_wheel_source: "openvino==${{ steps.openvino_download.outputs.ov_version }}"
ov_version: ${{ steps.openvino_download.outputs.ov_version }}
timeout-minutes: 10
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- name: Download OpenVINO Developer Package
id: openvino_download
run: |
# Get latest nightly version info
echo "Getting latest nightly OpenVINO version..."
# Get version from filetree.json API
NIGHTLY_VERSION=$(curl -s https://storage.openvinotoolkit.org/filetree.json | jq -r '.children[] | select(.name == "repositories") | .children[] | select(.name == "openvino") | .children[] | select(.name == "packages") | .children[] | select(.name == "nightly") | .children[] | select(.type == "directory") | .name' | sort -V | tail -1)
if [ -z "$NIGHTLY_VERSION" ]; then
echo "Error: Could not determine nightly version"
exit 1
fi
echo "Using nightly version: $NIGHTLY_VERSION"
echo "ov_version=$NIGHTLY_VERSION" >> $GITHUB_OUTPUT
# Get Linux package list for this version
LINUX_PACKAGES=$(curl -s https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/$NIGHTLY_VERSION/linux/)
# Find the Linux Ubuntu 22 x86_64 tgz file
LINUX_TGZ=$(echo "$LINUX_PACKAGES" | grep -oE 'l_openvino_toolkit_ubuntu22_[^"]+_x86_64\.tgz' | head -1)
if [ -z "$LINUX_TGZ" ]; then
echo "Error: Could not find Linux Ubuntu 22 x86_64 package for version $NIGHTLY_VERSION"
exit 1
fi
echo "Found Linux package: $LINUX_TGZ"
# Download OpenVINO developer package
DOWNLOAD_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/$NIGHTLY_VERSION/linux/$LINUX_TGZ"
echo "Downloading from: $DOWNLOAD_URL"
wget -q "$DOWNLOAD_URL" -O openvino_dev.tgz
# Create directory structure
mkdir -p openvino_package
tar -xzf openvino_dev.tgz -C openvino_package --strip-components=1
# Download Node.js package (simplified)
mkdir -p openvino_package/openvino_node_npm_package
echo "Node.js package placeholder" > openvino_package/openvino_node_npm_package/placeholder.txt
echo "outcome=success" >> $GITHUB_OUTPUT
- name: Upload OpenVINO Package
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: openvino_package
path: openvino_package/
if-no-files-found: "error"
genai_build_cmake:
name: Build Archive - ${{ matrix.build-type }}
strategy:
fail-fast: false
matrix:
build-type: [Release]
needs: [openvino_download]
timeout-minutes: 45
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
CMAKE_GENERATOR: Unix Makefiles
OV_INSTALL_DIR: ${{ github.workspace }}/ov
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TOOLS_DIR: ${{ github.workspace }}/tools
INSTALL_TESTS_DIR: ${{ github.workspace }}/tests
BUILD_DIR: ${{ github.workspace }}/build
SRC_DIR: ${{ github.workspace }}/src
MANIFEST_PATH: ${{ github.workspace }}/manifest.yml
CCACHE_DIR: ${{ github.workspace }}/ccache
steps:
- name: Clone openvino.genai
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ccache \
cmake \
build-essential \
libtbb-dev \
pkg-config \
python3-dev \
python3-pip
- name: Setup ccache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-ccache-${{ matrix.build-type }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-${{ matrix.build-type }}-
- name: Download OpenVINO package
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.openvino_download.outputs.ov_artifact_name }}
path: ${{ env.OV_INSTALL_DIR }}
merge-multiple: true
- name: Generate product manifest
run: |
echo "product_type: ${{ env.BASE_PRODUCT_TYPE }}_${{ matrix.build-type }}" > ${{ env.MANIFEST_PATH }}
echo "target_arch: x86_64" >> ${{ env.MANIFEST_PATH }}
echo "build_type: ${{ matrix.build-type }}" >> ${{ env.MANIFEST_PATH }}
- name: CMake Build
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
cmake -DOpenVINODeveloperPackage_DIR=${{ env.OV_INSTALL_DIR }}/developer_package/cmake \
-DENABLE_PYTHON=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-S ${{ env.SRC_DIR}} \
-B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR}} --config ${{ matrix.build-type }} --parallel $(nproc) --verbose
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.INSTALL_DIR }}
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.INSTALL_TOOLS_DIR }} --component tools_bin
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.INSTALL_TESTS_DIR }} --component tests
- name: Pack Artifacts
run: tar -cvf - * | pigz > ${{ env.BUILD_DIR }}/${{ env.GENAI_ARCHIVE_NAME }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Upload Archive Distribution Package
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: genai_archive_${{ matrix.build-type }}
path: ${{ env.BUILD_DIR }}/${{ env.GENAI_ARCHIVE_NAME }}
if-no-files-found: "error"
- name: Upload Tools
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: genai_tools_${{ matrix.build-type }}
path: ${{ env.INSTALL_TOOLS_DIR }}
if-no-files-found: "error"
- name: Upload Tests
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: genai_tests_${{ matrix.build-type }}
path: ${{ env.INSTALL_TESTS_DIR }}
if-no-files-found: "error"
- name: Upload manifest
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: manifest_${{ matrix.build-type }}
path: ${{ env.MANIFEST_PATH }}
if-no-files-found: "error"
genai_build_wheel:
name: Build Wheel
needs: [openvino_download]
timeout-minutes: 45
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
CMAKE_GENERATOR: Unix Makefiles
OV_INSTALL_DIR: ${{ github.workspace }}/ov
INSTALL_DIR: ${{ github.workspace }}/install
WHEELS_DIR: ${{ github.workspace }}/install/wheels
SRC_DIR: ${{ github.workspace }}/src
OpenVINODeveloperPackage_DIR: ${{ github.workspace }}/ov/developer_package/cmake
steps:
- name: Clone openvino.genai
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
ccache \
cmake \
build-essential \
libtbb-dev \
pkg-config \
python3-dev \
python3-pip
- name: Download OpenVINO package
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.openvino_download.outputs.ov_artifact_name }}
path: ${{ env.OV_INSTALL_DIR }}
merge-multiple: true
- name: Set CI environment
run: |
echo "Setting up environment for wheel build"
- name: Build Tokenizers Wheel
run: |
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \
--config-settings='override=wheel.build_tag="${{ github.run_number }}"' \
--config-settings=override=cross.arch="manylinux_2_31_x86_64" \
${{ needs.openvino_download.outputs.ov_wheel_source }} \
${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers
working-directory: ${{ env.OV_INSTALL_DIR }}
- name: Build GenAI Wheel
run: |
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \
--config-settings=override=cross.arch="manylinux_2_31_x86_64" \
${{ needs.openvino_download.outputs.ov_wheel_source }} \
${{ env.SRC_DIR }}
working-directory: ${{ env.OV_INSTALL_DIR }}
- name: Build WWB Wheel
run: python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} ${{ env.SRC_DIR }}/tools/who_what_benchmark
working-directory: ${{ env.OV_INSTALL_DIR }}
- name: Upload Wheels
if: ${{ always() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ env.GENAI_WHEELS_ARTIFACT_NAME }}
path: ${{ env.INSTALL_DIR }}
if-no-files-found: "error"
genai_build_samples:
name: Build Samples - ${{ matrix.build-type }}
strategy:
fail-fast: false
matrix:
build-type: [Release]
needs: [openvino_download, genai_build_cmake]
timeout-minutes: 10
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
CMAKE_GENERATOR: Unix Makefiles
OV_INSTALL_DIR: ${{ github.workspace }}/ov
INSTALL_DIR: ${{ github.workspace }}/install
BUILD_DIR: ${{ github.workspace }}/build
SRC_DIR: ${{ github.workspace }}/src
steps:
- name: Clone openvino.genai
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Download Build Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }}}"
path: ${{ env.OV_INSTALL_DIR }}
merge-multiple: true
- name: Extract Artifacts
run: pigz -dc ${{ env.GENAI_ARCHIVE_NAME }} | tar -xf - -C ${{ env.OV_INSTALL_DIR }}
working-directory: ${{ env.OV_INSTALL_DIR }}
- name: Build Samples (Release)
if: ${{ 'Release' == matrix.build-type }}
run: |
chmod +x ${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.sh
${{ env.OV_INSTALL_DIR }}/samples/cpp/build_samples.sh -i ${{ env.INSTALL_DIR }}
chmod +x ${{ env.OV_INSTALL_DIR }}/samples/c/build_samples.sh
${{ env.OV_INSTALL_DIR }}/samples/c/build_samples.sh -i ${{ env.INSTALL_DIR }}
- name: Build Samples (${{ matrix.build-type }})
if: ${{ 'Release' != matrix.build-type }}
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ${{ env.OV_INSTALL_DIR }}/samples/cpp/ -B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $(nproc)
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --component samples_bin --prefix ${{ env.INSTALL_DIR }}
- name: Pack Artifacts
run: tar -cvf - * | pigz > ${{ env.INSTALL_DIR }}/${{ env.GENAI_SAMPLES_NAME }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Upload Samples Build Package
if: ${{ always() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: genai_samples_${{ matrix.build-type }}
path: ${{ env.INSTALL_DIR }}/*.tar.gz
if-no-files-found: "error"
genai_build_nodejs:
name: Build Node.js bindings
strategy:
fail-fast: false
matrix:
build-type: [Release]
needs: [openvino_download]
timeout-minutes: 20
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
SRC_DIR: ${{ github.workspace }}/openvino.genai
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_DIR: ${{ github.workspace }}/openvino.genai/src/js/bin
OV_INSTALL_DIR: ${{ github.workspace }}/ov
steps:
- name: Clone openvino.genai
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
path: ${{ env.SRC_DIR }}
- name: Download OpenVINO package
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.openvino_download.outputs.ov_artifact_name }}
path: ${{ env.OV_INSTALL_DIR }}
merge-multiple: true
- name: Build GenAI Node.js bindings
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DENABLE_JS=ON -DCPACK_GENERATOR=NPM \
-DENABLE_PYTHON=OFF -DENABLE_WHEEL=OFF \
-S ${{ env.SRC_DIR }} -B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --parallel $(nproc) --verbose
cmake --install ${{ env.BUILD_DIR }} --config ${{ matrix.build-type }} --prefix ${{ env.INSTALL_DIR }}
- name: Upload Node.js bindings Build Package
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: genai_nodejs_bindings
path: ${{ env.INSTALL_DIR }}
if-no-files-found: "error"
genai_tests_wheel:
name: Python (${{ matrix.test.name}}) Tests (wheel)
needs: [smart_ci, openvino_download, genai_build_wheel]
timeout-minutes: ${{ matrix.test.timeout }}
strategy:
fail-fast: false
matrix:
test:
- name: "Whisper"
cmd: 'tests/python_tests/test_whisper_pipeline.py tests/python_tests/test_whisper_pipeline_static.py -k "not test_smoke[sample_from_dataset0 and not test_whisper_constructors[sample_from_dataset0 and not test_max_new_tokens[sample_from_dataset0 and not test_language_mode[language and not test_task_mode[sample_from_dataset0 and not test_language_autodetect[sample_from_dataset0 and not test_whisper_config_constructor and not test_language_autodetect[sample_from_dataset1 and not test_language_autodetect[sample_from_dataset2 and not test_initial_prompt_hotwords[sample_from_dataset0 and not test_random_sampling[sample_from_dataset0"'
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).whisper.test }}
timeout: 45
- name: "Cacheopt E2E"
cmd: "tests/python_tests/test_kv_cache_eviction.py"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching.test }}
timeout: 60
- name: "LLM & VLM"
cmd: "tests/python_tests/test_llm_pipeline.py tests/python_tests/test_llm_pipeline_static.py tests/python_tests/test_vlm_pipeline.py tests/python_tests/test_structured_output.py"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).visual_language.test || fromJSON(needs.smart_ci.outputs.affected_components).LLM.test }}
timeout: 120
- name: "Tokenizer tests"
cmd: "tests/python_tests/test_tokenizer.py"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).tokenizers.test }}
timeout: 60
- name: "API tests"
cmd: "tests/python_tests/test_continuous_batching.py tests/python_tests/test_generation_config.py tests/python_tests/test_sampling.py tests/python_tests/test_text_streamer.py"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching.test || fromJSON(needs.smart_ci.outputs.affected_components).sampling.test || fromJSON(needs.smart_ci.outputs.affected_components).text_streamer.test }}
timeout: 60
- name: "Rag tests"
cmd: "tests/python_tests/test_rag.py"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).RAG.test }}
timeout: 30
- name: "WWB tests"
cmd: "/tools/who_what_benchmark/tests"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).WWB.test }}
timeout: 90
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
INSTALL_DIR: ${{ github.workspace }}/install
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Clone openvino.genai
if: ${{ matrix.test.run_condition }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Download Build Artifacts
if: ${{ matrix.test.run_condition }}
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_wheels}"
path: ${{ env.INSTALL_DIR }}
merge-multiple: true
- name: Install OpenVINO wheel
if: ${{ matrix.test.run_condition }}
run: |
python3 -m pip install openvino==${{ needs.openvino_download.outputs.ov_version }} ${{ needs.openvino_download.outputs.ov_wheel_source }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Install GenAI Wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino_tokenizers[transformers];openvino_genai;whowhatbench"
requirements_files: "${{ env.SRC_DIR }}/tests/python_tests/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels
- name: Tests
if: ${{ matrix.test.run_condition }}
run: python -m pytest -v ./${{ matrix.test.cmd }}
working-directory: ${{ env.SRC_DIR }}
genai_samples_tests:
name: Samples ${{ matrix.test.name }} (${{ matrix.build-type }})
needs:
[
smart_ci,
openvino_download,
genai_build_cmake,
genai_build_wheel,
genai_build_samples,
genai_build_nodejs,
]
strategy:
fail-fast: false
matrix:
build-type: [Release]
test:
- name: "LLM"
marker: "llm"
cmd: "tests/python_tests/samples"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).LLM_samples.test }}
- name: "Whisper"
marker: "whisper"
cmd: "tests/python_tests/samples"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).Whisper_samples.test }}
- name: "Image generation"
marker: "image_generation"
cmd: "tests/python_tests/samples"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).Image_generation_samples.test }}
- name: "VLM"
marker: "vlm"
cmd: "tests/python_tests/samples"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).VLM_samples.test }}
- name: "Rag"
marker: "rag"
cmd: "tests/python_tests/samples"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).RAG_samples.test }}
- name: "Speech generation"
marker: "speech_generation"
cmd: "tests/python_tests/samples"
run_condition: ${{ fromJSON(needs.smart_ci.outputs.affected_components).Speech_generation_samples.test }}
timeout-minutes: 120
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
INSTALL_DIR: ${{ github.workspace }}/ov
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Clone openvino.genai
if: ${{ matrix.test.run_condition }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Download Build Artifacts
if: ${{ matrix.test.run_condition }}
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_samples_${{ matrix.build-type }},genai_wheels}"
path: ${{ env.INSTALL_DIR }}
merge-multiple: true
- name: Download GenAI JS Bildings Artifacts
if: ${{ matrix.test.run_condition }}
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: genai_nodejs_bindings
path: ${{ env.SRC_DIR }}/src/js/bin
merge-multiple: true
- name: Extract Artifacts
if: ${{ matrix.test.run_condition }}
run: |
pigz -dc ${{ env.GENAI_ARCHIVE_NAME }} | tar -xf - -C ${{ env.INSTALL_DIR }}
pigz -dc ${{ env.GENAI_SAMPLES_NAME }} | tar -xf - -C ${{ env.INSTALL_DIR }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Install OpenVINO wheel
if: ${{ matrix.test.run_condition }}
run: |
python3 -m pip install openvino==${{ needs.openvino_download.outputs.ov_version }} ${{ needs.openvino_download.outputs.ov_wheel_source }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Install GenAI wheels
if: ${{ matrix.test.run_condition }}
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels
- name: Setup Node
if: ${{ matrix.test.run_condition }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 21
- name: Install GenAI NPM package
if: ${{ matrix.test.run_condition }}
working-directory: ${{ env.SRC_DIR }}/src/js
run: |
npm install ${{ env.INSTALL_DIR }}/openvino_node_npm_package/openvino-node-* --ignore-scripts
cp -R ${{ env.INSTALL_DIR }}/openvino_node_npm_package/bin node_modules/openvino-node/bin
npm install --verbose
- name: Install NPM dependencies for samples
if: ${{ matrix.test.run_condition }}
working-directory: ${{ env.SRC_DIR }}/samples/js/text_generation
run: |
npm install ${{ env.SRC_DIR }}/src/js
npm install --verbose
- name: Test Samples (Python and C++)
if: ${{ matrix.test.run_condition }}
run: python -m pytest -vvs ${{ env.SRC_DIR }}/${{ matrix.test.cmd }} -m "${{ matrix.test.marker }}"
env:
LD_LIBRARY_PATH: "${{ env.INSTALL_DIR }}/runtime/lib/intel64:${{ env.INSTALL_DIR }}/runtime/3rdparty/tbb/lib:$LD_LIBRARY_PATH" # Required for C++ samples
SAMPLES_PY_DIR: "${{ env.INSTALL_DIR }}/samples/python"
SAMPLES_JS_DIR: "${{ env.SRC_DIR }}/samples/js"
SAMPLES_CPP_DIR: "${{ env.INSTALL_DIR }}/samples_bin"
SAMPLES_C_DIR: "${{ env.INSTALL_DIR }}/samples_bin/c"
genai_tools_tests:
name: Tools ${{ matrix.build-type }}
strategy:
fail-fast: false
matrix:
build-type: [Release]
needs: [smart_ci, openvino_download, genai_build_cmake, genai_build_wheel]
if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).llm_bench || fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }}
timeout-minutes: 90
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
INSTALL_DIR: ${{ github.workspace }}/ov
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Clone openvino.genai
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Download Build Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
pattern: "{${{ needs.openvino_download.outputs.ov_artifact_name }},genai_archive_${{ matrix.build-type }},genai_tools_${{ matrix.build-type }},genai_tests_${{ matrix.build-type }},genai_wheels}"
path: ${{ env.INSTALL_DIR }}
merge-multiple: true
- name: Extract Artifacts
run: |
pigz -dc ${{ env.GENAI_ARCHIVE_NAME }} | tar -xf - -C ${{ env.INSTALL_DIR }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Fix C++ samples permissions
run: chmod +x ${{ env.INSTALL_DIR }}/samples_bin/*
- name: Install OpenVINO wheel
run: |
python3 -m pip install openvino==${{ needs.openvino_download.outputs.ov_version }} ${{ needs.openvino_download.outputs.ov_wheel_source }}
working-directory: ${{ env.INSTALL_DIR }}
- name: Install GenAI wheels
uses: ./src/.github/actions/install_wheel
with:
packages: "openvino_tokenizers[transformers];openvino_genai[testing]"
requirements_files: "${{ env.SRC_DIR }}/samples/requirements.txt;${{ env.SRC_DIR }}/tools/llm_bench/requirements.txt"
local_wheel_dir: ${{ env.INSTALL_DIR }}/wheels
- name: gtests unit tests
if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }}
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
chmod +x ${{ env.INSTALL_DIR }}/tests/tests_continuous_batching
${{ env.INSTALL_DIR }}/tests/tests_continuous_batching
- name: Test Continuous Batching Tools
if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).continuous_batching }}
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
python -m pytest -vs ${{ env.SRC_DIR }}/tests/python_tests/samples/test_continuous_batching_tools.py -m "samples"
env:
SAMPLES_CPP_DIR: "${{ env.INSTALL_DIR }}/samples_bin"
- name: Test LLM Benchmark Tools
if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).llm_bench }}
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
python -m pytest -vs ${{ env.SRC_DIR }}/tests/python_tests/samples/test_tools_llm_benchmark.py -m "samples"
env:
SAMPLES_PY_DIR: "${{ env.SRC_DIR }}/tools"
genai_nodejs_tests:
name: Node.js bindings tests
needs: [smart_ci, openvino_download, genai_build_nodejs]
if: ${{ fromJSON(needs.smart_ci.outputs.affected_components).JS_API }}
timeout-minutes: 20
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
OV_INSTALL_DIR: ${{ github.workspace }}/ov
SRC_DIR: ${{ github.workspace }}/openvino.genai
INSTALL_DIR: ${{ github.workspace }}/openvino.genai/src/js/bin
NODE_VERSION: 21
steps:
- name: Clone openvino.genai
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Download OpenVINO Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ${{ needs.openvino_download.outputs.ov_artifact_name }}
path: ${{ env.OV_INSTALL_DIR }}
merge-multiple: true
- name: Download GenAI JS Bildings Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: genai_nodejs_bindings
path: ${{ env.INSTALL_DIR }}
merge-multiple: true
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
# JS pacakges uses the OpenVINO and OpenVINO GenAI libraries from the bin directory.
# Here we emulate the installation of the openvino-node package from NPM. The latest
# release of the openvino-node package is installed, and we need to update the binaries
# in the node_modules/openvino-node/bin directory to work correctly with GenAI
- name: Install npm package tests dependencies
working-directory: ${{ env.SRC_DIR }}/src/js
run: |
npm install ${{ env.OV_INSTALL_DIR }}/openvino_node_npm_package/openvino-node-* --ignore-scripts
cp -R ${{ env.OV_INSTALL_DIR }}/openvino_node_npm_package/bin node_modules/openvino-node/bin
npm install --verbose
- name: Check lint
working-directory: ${{ env.SRC_DIR }}/src/js
run: npm run lint
- name: Run npm package tests
working-directory: ${{ env.SRC_DIR }}/src/js
run: npm test
genai_xgrammar_tests:
name: Build & Test XGrammar
needs: [openvino_download]
timeout-minutes: 45
defaults:
run:
shell: bash
runs-on: ubuntu-22.04
env:
CMAKE_GENERATOR: Unix Makefiles
OV_INSTALL_DIR: ${{ github.workspace }}/ov
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build_xgrammar
steps:
- name: Clone openvino.genai
uses: actions/checkout@v4
with:
path: ${{ env.SRC_DIR }}
submodules: recursive
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: ${{ needs.openvino_download.outputs.ov_artifact_name }}
path: ${{ env.OV_INSTALL_DIR }}
merge-multiple: true
- name: CMake Build without XGrammar
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
cmake -DOpenVINODeveloperPackage_DIR=${{ env.OV_INSTALL_DIR }}/developer_package/cmake \
-DENABLE_PYTHON=ON \
-DENABLE_XGRAMMAR=OFF \
-DCMAKE_BUILD_TYPE=Release \
-S ${{ env.SRC_DIR}} \
-B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR}} --config Release --parallel $(nproc) --verbose
- name: Install Python dependencies for tests
run: |
python3 -m pip install -r ${{ env.SRC_DIR }}/tests/python_tests/requirements.txt
python3 -m pip install -r ${{ env.SRC_DIR }}/samples/export-requirements.txt
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python3 -m pip install ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- name: Run test_llm_pipeline.py when -DENABLE_XGRAMMAR=OFF
env:
PYTHONPATH: "${{ env.BUILD_DIR }}:"
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python3 -m pytest -v ${{ env.SRC_DIR }}/tests/python_tests/test_llm_pipeline.py
# python3 -m pytest -v ${{ env.SRC_DIR }}/tests/python_tests/test_structured_output.py
Overall_Status:
name: ci/gha_overall_status_linux
needs:
[
smart_ci,
openvino_download,
genai_build_cmake,
genai_build_wheel,
genai_build_samples,
genai_build_nodejs,
genai_tests_wheel,
genai_samples_tests,
genai_tools_tests,
genai_nodejs_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