-
Notifications
You must be signed in to change notification settings - Fork 3.3k
1004 lines (904 loc) · 37.7 KB
/
Copy pathcoverage.yml
File metadata and controls
1004 lines (904 loc) · 37.7 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
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Code coverage
run-name: ${{ github.event_name == 'schedule' && 'Code coverage - Nightly' || 'Code coverage' }}
on:
schedule:
# run daily at 00:00 UTC
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
run-cpu-tests:
description: 'Run the standard CPU coverage lanes'
type: boolean
required: false
default: true
run-gpu-tests:
description: 'Build with GPU support and run the GPU coverage lanes'
type: boolean
required: false
default: true
concurrency:
group: ${{ github.event_name == 'pull_request' && github.run_id || format('{0}-{1}', github.workflow, github.ref) }}
cancel-in-progress: false
permissions: read-all
env:
ENABLE_BRANCH_COVERAGE: 'false'
LCOV_CAPTURE_TIMEOUT_SECONDS: '3600'
NODE_VERSION: '21'
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crt
IGPU_DRIVER_PACKAGES: |-
https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15985.7/intel-igc-core_1.0.15985.7_amd64.deb
https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.15985.7/intel-igc-opencl_1.0.15985.7_amd64.deb
https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-level-zero-gpu_1.3.28454.6_amd64.deb
https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/intel-opencl-icd_24.05.28454.6_amd64.deb
https://github.com/intel/compute-runtime/releases/download/24.05.28454.6/libigdgmm12_22.3.11_amd64.deb
DGPU_DRIVER_PACKAGES: |-
https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-core_1.0.17791.9_amd64.deb
https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.17791.9/intel-igc-opencl_1.0.17791.9_amd64.deb
https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-level-zero-gpu_1.6.31294.12_amd64.deb
https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/intel-opencl-icd_24.39.31294.12_amd64.deb
https://github.com/intel/compute-runtime/releases/download/24.39.31294.12/libigdgmm12_22.5.2_amd64.deb
jobs:
Docker:
name: Coverage Docker Images
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-cpu-tests == 'true' || github.event.inputs.run-gpu-tests == 'true' }}
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:
- name: Checkout
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
- uses: ./.github/actions/handle_docker
id: handle_docker
with:
images: |
ov_build/ubuntu_22_04_x64
ov_test/ubuntu_22_04_x64
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: '{"docker_env":false,"dockerfiles":false}'
Build:
name: Coverage Build Artifacts
needs: Docker
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-cpu-tests == 'true' || github.event.inputs.run-gpu-tests == 'true' }}
uses: ./.github/workflows/job_build_linux.yml
with:
runner: 'aks-linux-16-cores-32gb'
image: ${{ fromJSON(needs.Docker.outputs.images).ov_build.ubuntu_22_04_x64 }}
affected-components: '{"JS_API":true}'
event-name: ${{ github.event_name }}
os: 'ubuntu_22_04'
build-js: true
build-additional-python-packages: false
build-debian-packages: false
upload-coverage-notes: true
use_latest_onednn: false
cmake-options: >-
-G 'Ninja Multi-Config'
-DENABLE_NCC_STYLE=OFF
-DENABLE_TESTS=ON
-DENABLE_FUNCTIONAL_TESTS=ON
-DENABLE_STRICT_DEPENDENCIES=OFF
-DENABLE_SYSTEM_OPENCL=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCPACK_GENERATOR=TGZ
-DENABLE_WHEEL=ON
-DENABLE_PYTHON=ON
-DENABLE_JS=ON
-DENABLE_COVERAGE=ON
-DENABLE_OV_ONNX_FRONTEND=ON
-DENABLE_OV_PADDLE_FRONTEND=ON
-DENABLE_OV_PYTORCH_FRONTEND=ON
-DENABLE_OV_TF_FRONTEND=ON
-DENABLE_OV_TF_LITE_FRONTEND=ON
-DENABLE_INTEL_NPU=OFF
${{ (github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-gpu-tests == 'true') && '-DENABLE_INTEL_GPU=ON' || '-DENABLE_INTEL_GPU=OFF' }}
${{ (github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-gpu-tests == 'true') && '-DENABLE_ONEDNN_FOR_GPU=ON' || '-DENABLE_ONEDNN_FOR_GPU=OFF' }}
CoverageCpp:
name: Coverage C++ (CPU)
needs: [Docker, Build]
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-cpu-tests == 'true' }}
runs-on: aks-linux-16-cores-32gb
container:
image: ${{ fromJSON(needs.Docker.outputs.images).ov_test.ubuntu_22_04_x64 }}
volumes:
- /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro
- /mount:/mount
- ${{ github.workspace }}:${{ github.workspace }}
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
env:
TEST_PROFILE: cpu
OV_WORKSPACE: ${{ github.workspace }}
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
INSTALL_PKG_DIR: ${{ github.workspace }}/install
BIN_DIR: ${{ github.workspace }}/install/tests
BUILD_DIR: ${{ github.workspace }}/openvino/openvino_build
BUILD_JS_DIR: ${{ github.workspace }}/openvino/openvino_build_js
COVERAGE_WRITE_STEP_SUMMARY: 'false'
steps:
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: Download OpenVINO package
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_tests
path: ${{ env.INSTALL_DIR }}
- name: Download coverage build notes
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: coverage_build_notes
path: ${{ github.workspace }}/coverage_notes
- name: Extract OpenVINO packages
run: |
pigz -dc openvino_package.tar.gz | tar -xf - -C "${INSTALL_DIR}"
pigz -dc openvino_tests.tar.gz | tar -xf - -C "${INSTALL_DIR}"
working-directory: ${{ env.INSTALL_DIR }}
- name: Restore coverage notes
run: |
set -euo pipefail
notes_root="${{ github.workspace }}/coverage_notes"
if [[ -d "${notes_root}/coverage_build_notes" ]]; then
notes_root="${notes_root}/coverage_build_notes"
fi
rm -rf "${BUILD_DIR}" "${BUILD_JS_DIR}"
mkdir -p "${BUILD_DIR}" "${BUILD_JS_DIR}"
cp -a "${notes_root}/main-build/." "${BUILD_DIR}/"
if [[ -d "${notes_root}/js-build" ]]; then
cp -a "${notes_root}/js-build/." "${BUILD_JS_DIR}/"
fi
- name: Setup Python 3.11
uses: ./.github/actions/setup_python
with:
version: '3.11'
use-pip-proxy: 'true'
set-pip-install-path: 'true'
self-hosted-runner: 'true'
- name: Install coverage Python dependencies
uses: ./.github/actions/coverage_toolkit
with:
command: install-requirements
- name: Run CPU C++ coverage tests
uses: ./.github/actions/coverage_toolkit
with:
command: run-suite
suite: cpp
profile: cpu
lane: cpu
- name: Generate CPU native C/C++ coverage report
uses: ./.github/actions/coverage_toolkit
with:
command: collect-native
profile: cpu
- name: Collect C++ CPU results
id: cpu_artifact
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: collect-results
suite: cpp
profile: cpu
lane: cpu
- name: Upload C++ CPU artifact
if: ${{ always() }}
uses: ababushk/upload-artifact@ebc7d74ace101c08868aed05dba2aaf274b9a2c7 # main
with:
name: ${{ steps.cpu_artifact.outputs['artifact-name'] }}
path: ${{ steps.cpu_artifact.outputs.dir }}
if-no-files-found: warn
retention-days: 7
compression-level: 0
overwrite: true
CoverageCppGpu:
name: Coverage C++ (${{ matrix.gpu.name }}, ${{ matrix.lane.name }})
needs: Build
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-gpu-tests == 'true' }}
runs-on: ${{ fromJSON(matrix.gpu.runs_on) }}
container:
image: ubuntu:22.04
volumes:
- /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro
- /mount:/mount
- ${{ github.workspace }}:${{ github.workspace }}
options: ${{ matrix.gpu.container_options }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
gpu:
- id: igpu
name: iGPU
runs_on: '["self-hosted","igpu","Linux"]'
container_options: "--group-add 44 --group-add 993 --device /dev/dri/renderD128:/dev/dri/renderD128"
- id: dgpu
name: dGPU Arc A770
runs_on: '["self-hosted","dgpu","Arc-A770","Linux"]'
container_options: "--group-add 44 --group-add 993 --device /dev/dri/renderD129:/dev/dri/renderD129"
lane:
- id: unit
name: GPU Unit Tests
test_names: ov_onnx_frontend_tests,ov_onnx_frontend_tests (ONNX_ITERATOR=0),ov_gpu_unit_tests,test_inference_async,test_inference_sync
- id: func
name: GPU Functional Tests
test_names: ov_gpu_func_tests
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
env:
TEST_PROFILE: gpu
CXX_TEST_NAMES: ${{ matrix.lane.test_names }}
OV_WORKSPACE: ${{ github.workspace }}
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
INSTALL_PKG_DIR: ${{ github.workspace }}/install
BIN_DIR: ${{ github.workspace }}/install/tests
BUILD_DIR: ${{ github.workspace }}/openvino/openvino_build
BUILD_JS_DIR: ${{ github.workspace }}/openvino/openvino_build_js
COVERAGE_WRITE_STEP_SUMMARY: 'false'
PYTHONDONTWRITEBYTECODE: '1'
steps:
- name: Prepare ${{ matrix.gpu.name }} test container
run: |
apt-get update && apt-get install -y pigz wget software-properties-common ca-certificates gpg-agent tzdata clinfo git lcov python3-yaml
env:
DEBIAN_FRONTEND: noninteractive
TZ: "Europe/London"
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: Download OpenVINO package
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_tests
path: ${{ env.INSTALL_DIR }}
- name: Download coverage build notes
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: coverage_build_notes
path: ${{ github.workspace }}/coverage_notes
- name: Extract OpenVINO packages
run: |
pigz -dc openvino_package.tar.gz | tar -xf - -C "${INSTALL_DIR}"
pigz -dc openvino_tests.tar.gz | tar -xf - -C "${INSTALL_DIR}"
working-directory: ${{ env.INSTALL_DIR }}
- name: Install GPU driver dependencies
run: |
set -euo pipefail
"${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh" -c=core -c=dev -c=gpu -y
case "${{ matrix.gpu.id }}" in
igpu)
driver_packages="${IGPU_DRIVER_PACKAGES}"
;;
dgpu)
driver_packages="${DGPU_DRIVER_PACKAGES}"
;;
*)
echo "Unsupported GPU device '${{ matrix.gpu.id }}'"
exit 1
;;
esac
tmp_dir="$(mktemp -d)"
trap 'rm -rf "${tmp_dir}"' EXIT
pushd "${tmp_dir}"
while IFS= read -r package_url; do
[[ -n "${package_url}" ]] || continue
wget "${package_url}"
done <<< "${driver_packages}"
dpkg -i *.deb
popd
- name: Verify GPU device availability
run: clinfo
- name: Restore coverage notes
run: |
set -euo pipefail
notes_root="${{ github.workspace }}/coverage_notes"
if [[ -d "${notes_root}/coverage_build_notes" ]]; then
notes_root="${notes_root}/coverage_build_notes"
fi
rm -rf "${BUILD_DIR}" "${BUILD_JS_DIR}"
mkdir -p "${BUILD_DIR}" "${BUILD_JS_DIR}"
cp -a "${notes_root}/main-build/." "${BUILD_DIR}/"
if [[ -d "${notes_root}/js-build" ]]; then
cp -a "${notes_root}/js-build/." "${BUILD_JS_DIR}/"
fi
- name: Run ${{ matrix.gpu.name }} ${{ matrix.lane.name }} C++ coverage tests
uses: ./.github/actions/coverage_toolkit
with:
command: run-suite
suite: cpp
profile: gpu
lane: ${{ matrix.gpu.id }}-${{ matrix.lane.id }}
test-names: ${{ matrix.lane.test_names }}
- name: Generate ${{ matrix.gpu.name }} ${{ matrix.lane.name }} native C/C++ coverage report
uses: ./.github/actions/coverage_toolkit
with:
command: collect-native
profile: gpu
- name: Collect C++ ${{ matrix.gpu.name }} ${{ matrix.lane.name }} results
id: lane_artifact
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: collect-results
suite: cpp
profile: gpu
lane: ${{ matrix.gpu.id }}-${{ matrix.lane.id }}
test-names: ${{ matrix.lane.test_names }}
- name: Upload C++ ${{ matrix.gpu.name }} ${{ matrix.lane.name }} artifact
if: ${{ always() }}
uses: ababushk/upload-artifact@ebc7d74ace101c08868aed05dba2aaf274b9a2c7 # main
with:
name: ${{ steps.lane_artifact.outputs['artifact-name'] }}
path: ${{ steps.lane_artifact.outputs.dir }}
if-no-files-found: warn
retention-days: 7
compression-level: 0
overwrite: true
CoveragePython:
name: Coverage Python (CPU)
needs: [Docker, Build]
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-cpu-tests == 'true' }}
runs-on: aks-linux-16-cores-32gb
container:
image: ${{ fromJSON(needs.Docker.outputs.images).ov_test.ubuntu_22_04_x64 }}
volumes:
- /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro
- /mount:/mount
- ${{ github.workspace }}:${{ github.workspace }}
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
env:
TEST_PROFILE: cpu
OV_WORKSPACE: ${{ github.workspace }}
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
INSTALL_PKG_DIR: ${{ github.workspace }}/install
BUILD_DIR: ${{ github.workspace }}/openvino/openvino_build
BUILD_JS_DIR: ${{ github.workspace }}/openvino/openvino_build_js
COVERAGE_WRITE_STEP_SUMMARY: 'false'
steps:
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: Download OpenVINO package
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_tests
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO wheels
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_wheels
path: ${{ env.INSTALL_DIR }}
- name: Download coverage build notes
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: coverage_build_notes
path: ${{ github.workspace }}/coverage_notes
- name: Extract OpenVINO packages
run: |
pigz -dc openvino_package.tar.gz | tar -xf - -C "${INSTALL_DIR}"
pigz -dc openvino_tests.tar.gz | tar -xf - -C "${INSTALL_DIR}"
working-directory: ${{ env.INSTALL_DIR }}
- name: Restore coverage notes
run: |
set -euo pipefail
notes_root="${{ github.workspace }}/coverage_notes"
if [[ -d "${notes_root}/coverage_build_notes" ]]; then
notes_root="${notes_root}/coverage_build_notes"
fi
rm -rf "${BUILD_DIR}" "${BUILD_JS_DIR}"
mkdir -p "${BUILD_DIR}" "${BUILD_JS_DIR}"
cp -a "${notes_root}/main-build/." "${BUILD_DIR}/"
if [[ -d "${notes_root}/js-build" ]]; then
cp -a "${notes_root}/js-build/." "${BUILD_JS_DIR}/"
fi
- name: Setup Python 3.11
uses: ./.github/actions/setup_python
with:
version: '3.11'
use-pip-proxy: 'true'
set-pip-install-path: 'true'
self-hosted-runner: 'true'
- name: Install coverage Python dependencies
uses: ./.github/actions/coverage_toolkit
with:
command: install-requirements
- name: Install OpenVINO Python wheels
uses: ./.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_DIR }}
wheels-to-install: 'openvino'
- name: Install Python test dependencies
run: |
python3 -m pip install -r "${INSTALL_DIR}/tests/bindings/python/requirements_test.txt"
python3 -m pip install -r "${INSTALL_DIR}/tests/python/preprocess/torchvision/requirements.txt"
python3 -m pip install -r "${INSTALL_DIR}/tests/layer_tests/requirements.txt"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_onnx"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_jax"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_pytorch"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_tensorflow"
- name: Run CPU Python coverage tests
uses: ./.github/actions/coverage_toolkit
with:
command: run-suite
suite: python
profile: cpu
lane: cpu
- name: Generate CPU native C/C++ coverage report
uses: ./.github/actions/coverage_toolkit
with:
command: collect-native
profile: cpu
- name: Collect Python CPU results
id: cpu_artifact
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: collect-results
suite: python
profile: cpu
lane: cpu
- name: Upload Python CPU artifact
if: ${{ always() }}
uses: ababushk/upload-artifact@ebc7d74ace101c08868aed05dba2aaf274b9a2c7 # main
with:
name: ${{ steps.cpu_artifact.outputs['artifact-name'] }}
path: ${{ steps.cpu_artifact.outputs.dir }}
if-no-files-found: warn
retention-days: 7
compression-level: 0
overwrite: true
CoveragePythonGpu:
name: Coverage Python (${{ matrix.gpu.name }})
needs: Build
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-gpu-tests == 'true' }}
runs-on: ${{ fromJSON(matrix.gpu.runs_on) }}
container:
image: ubuntu:22.04
volumes:
- /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro
- /mount:/mount
- ${{ github.workspace }}:${{ github.workspace }}
options: ${{ matrix.gpu.container_options }}
strategy:
fail-fast: false
matrix:
gpu:
- id: igpu
name: iGPU
runs_on: '["self-hosted","igpu","Linux"]'
container_options: "--group-add 44 --group-add 993 --device /dev/dri/renderD128:/dev/dri/renderD128"
- id: dgpu
name: dGPU Arc A770
runs_on: '["self-hosted","dgpu","Arc-A770","Linux"]'
container_options: "--group-add 44 --group-add 993 --device /dev/dri/renderD129:/dev/dri/renderD129"
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
env:
TEST_PROFILE: gpu
OV_WORKSPACE: ${{ github.workspace }}
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
INSTALL_PKG_DIR: ${{ github.workspace }}/install
BUILD_DIR: ${{ github.workspace }}/openvino/openvino_build
BUILD_JS_DIR: ${{ github.workspace }}/openvino/openvino_build_js
COVERAGE_WRITE_STEP_SUMMARY: 'false'
PYTHONDONTWRITEBYTECODE: '1'
REQUESTS_CA_BUNDLE: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crt
steps:
- name: Prepare ${{ matrix.gpu.name }} test container
run: |
apt-get update && apt-get install -y pigz wget software-properties-common ca-certificates gpg-agent tzdata clinfo git lcov python3-yaml
env:
DEBIAN_FRONTEND: noninteractive
TZ: "Europe/London"
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: Download OpenVINO package
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_tests
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO wheels
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_wheels
path: ${{ env.INSTALL_DIR }}
- name: Download coverage build notes
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: coverage_build_notes
path: ${{ github.workspace }}/coverage_notes
- name: Extract OpenVINO packages
run: |
pigz -dc openvino_package.tar.gz | tar -xf - -C "${INSTALL_DIR}"
pigz -dc openvino_tests.tar.gz | tar -xf - -C "${INSTALL_DIR}"
working-directory: ${{ env.INSTALL_DIR }}
- name: Install GPU driver dependencies
run: |
set -euo pipefail
"${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh" -c=core -c=dev -c=gpu -y
case "${{ matrix.gpu.id }}" in
igpu)
driver_packages="${IGPU_DRIVER_PACKAGES}"
;;
dgpu)
driver_packages="${DGPU_DRIVER_PACKAGES}"
;;
*)
echo "Unsupported GPU device '${{ matrix.gpu.id }}'"
exit 1
;;
esac
tmp_dir="$(mktemp -d)"
trap 'rm -rf "${tmp_dir}"' EXIT
pushd "${tmp_dir}"
while IFS= read -r package_url; do
[[ -n "${package_url}" ]] || continue
wget "${package_url}"
done <<< "${driver_packages}"
dpkg -i *.deb
popd
- name: Verify GPU device availability
run: clinfo
- name: Restore coverage notes
run: |
set -euo pipefail
notes_root="${{ github.workspace }}/coverage_notes"
if [[ -d "${notes_root}/coverage_build_notes" ]]; then
notes_root="${notes_root}/coverage_build_notes"
fi
rm -rf "${BUILD_DIR}" "${BUILD_JS_DIR}"
mkdir -p "${BUILD_DIR}" "${BUILD_JS_DIR}"
cp -a "${notes_root}/main-build/." "${BUILD_DIR}/"
if [[ -d "${notes_root}/js-build" ]]; then
cp -a "${notes_root}/js-build/." "${BUILD_JS_DIR}/"
fi
- name: Setup Python 3.11
uses: ./.github/actions/setup_python
with:
version: '3.11'
use-pip-proxy: 'true'
set-pip-install-path: 'true'
self-hosted-runner: 'true'
- name: Install coverage Python dependencies
uses: ./.github/actions/coverage_toolkit
with:
command: install-requirements
- name: Install OpenVINO Python wheels
uses: ./.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_DIR }}
wheels-to-install: 'openvino'
- name: Install Python test dependencies
run: |
python3 -m pip install -r "${INSTALL_DIR}/tests/bindings/python/requirements_test.txt"
python3 -m pip install -r "${INSTALL_DIR}/tests/python/preprocess/torchvision/requirements.txt"
python3 -m pip install -r "${INSTALL_DIR}/tests/layer_tests/requirements.txt"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_onnx"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_jax"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_pytorch"
python3 -m pip install -r "${INSTALL_DIR}/tests/requirements_tensorflow"
- name: Run ${{ matrix.gpu.name }} Python coverage tests
uses: ./.github/actions/coverage_toolkit
with:
command: run-suite
suite: python
profile: gpu
lane: ${{ matrix.gpu.id }}
- name: Generate ${{ matrix.gpu.name }} native C/C++ coverage report
uses: ./.github/actions/coverage_toolkit
with:
command: collect-native
profile: gpu
- name: Collect Python ${{ matrix.gpu.name }} results
id: gpu_artifact
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: collect-results
suite: python
profile: gpu
lane: ${{ matrix.gpu.id }}
- name: Upload Python ${{ matrix.gpu.name }} artifact
if: ${{ always() }}
uses: ababushk/upload-artifact@ebc7d74ace101c08868aed05dba2aaf274b9a2c7 # main
with:
name: ${{ steps.gpu_artifact.outputs['artifact-name'] }}
path: ${{ steps.gpu_artifact.outputs.dir }}
if-no-files-found: warn
retention-days: 7
compression-level: 0
overwrite: true
CoverageJS:
name: Coverage JS (CPU)
needs: [Docker, Build]
if: ${{ github.event_name == 'schedule' || github.event_name == 'pull_request' || github.event.inputs.run-cpu-tests == 'true' }}
runs-on: aks-linux-4-cores-16gb
container:
image: ${{ fromJSON(needs.Docker.outputs.images).ov_test.ubuntu_22_04_x64 }}
volumes:
- /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro
- /mount:/mount
- ${{ github.workspace }}:${{ github.workspace }}
defaults:
run:
shell: bash
working-directory: ${{ github.workspace }}
env:
TEST_PROFILE: cpu
OV_WORKSPACE: ${{ github.workspace }}
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_PKG_DIR: ${{ github.workspace }}/install
OPENVINO_JS_DIR: ${{ github.workspace }}/src/bindings/js/node
BUILD_DIR: ${{ github.workspace }}/openvino/openvino_build
BUILD_JS_DIR: ${{ github.workspace }}/openvino/openvino_build_js
COVERAGE_WRITE_STEP_SUMMARY: 'false'
DISPLAY: ':99'
steps:
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'true'
- name: Download OpenVINO package
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO Node package
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: openvino_node_npm_package
path: ${{ env.OPENVINO_JS_DIR }}
merge-multiple: true
- name: Download coverage build notes
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
name: coverage_build_notes
path: ${{ github.workspace }}/coverage_notes
- name: Extract OpenVINO package
run: pigz -dc openvino_package.tar.gz | tar -xf - -C "${INSTALL_DIR}"
working-directory: ${{ env.INSTALL_DIR }}
- name: Extract OpenVINO Node package
run: pigz -dc openvino_node_npm_package.tar.gz | tar -xf - -v
working-directory: ${{ env.OPENVINO_JS_DIR }}
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: ${{ env.OPENVINO_JS_DIR }}/package-lock.json
- name: Configure OpenVINO JS API
working-directory: ${{ env.OPENVINO_JS_DIR }}
run: npm i
- name: Install JS coverage dependencies
working-directory: ${{ env.OPENVINO_JS_DIR }}
run: npm i --no-save c8
- name: Setup Python 3.11
uses: ./.github/actions/setup_python
with:
version: '3.11'
use-pip-proxy: 'true'
set-pip-install-path: 'true'
self-hosted-runner: 'true'
- name: Install coverage Python dependencies
uses: ./.github/actions/coverage_toolkit
with:
command: install-requirements
- name: Restore coverage notes
run: |
set -euo pipefail
notes_root="${{ github.workspace }}/coverage_notes"
if [[ -d "${notes_root}/coverage_build_notes" ]]; then
notes_root="${notes_root}/coverage_build_notes"
fi
rm -rf "${BUILD_DIR}" "${BUILD_JS_DIR}"
mkdir -p "${BUILD_DIR}" "${BUILD_JS_DIR}"
cp -a "${notes_root}/main-build/." "${BUILD_DIR}/"
if [[ -d "${notes_root}/js-build" ]]; then
cp -a "${notes_root}/js-build/." "${BUILD_DIR}/"
cp -a "${notes_root}/js-build/." "${BUILD_JS_DIR}/"
fi
- name: Install electron deps and run Xvfb
run: Xvfb "$DISPLAY" &
- name: Run CPU JS coverage tests
uses: ./.github/actions/coverage_toolkit
with:
command: run-suite
suite: js
profile: cpu
lane: cpu
js-dir: ${{ env.OPENVINO_JS_DIR }}
- name: Generate CPU native C/C++ coverage report
uses: ./.github/actions/coverage_toolkit
with:
command: collect-native
profile: cpu
- name: Collect JS CPU results
id: cpu_artifact
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: collect-results
suite: js
profile: cpu
lane: cpu
- name: Upload JS CPU artifact
if: ${{ always() }}
uses: ababushk/upload-artifact@ebc7d74ace101c08868aed05dba2aaf274b9a2c7 # main
with:
name: ${{ steps.cpu_artifact.outputs['artifact-name'] }}
path: ${{ steps.cpu_artifact.outputs.dir }}
if-no-files-found: warn
retention-days: 7
compression-level: 0
overwrite: true
CoverageSummary:
name: Coverage Summary
if: ${{ always() && needs.Build.result == 'success' }}
needs: [Build, CoverageCpp, CoverageCppGpu, CoveragePython, CoveragePythonGpu, CoverageJS]
outputs:
upload_matrix_json: ${{ steps.coverage_files.outputs['upload-matrix-json'] || '[]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'false'
- name: Download C++ artifacts
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
pattern: coverage-cpp-*
path: ${{ github.workspace }}/artifacts/cpp
- name: Download Python artifacts
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
pattern: coverage-python-*
path: ${{ github.workspace }}/artifacts/python
- name: Download JS artifacts
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
pattern: coverage-js-*
path: ${{ github.workspace }}/artifacts/js
- name: Install coverage Python dependencies
uses: ./.github/actions/coverage_toolkit
with:
command: install-requirements
- name: Resolve selected lanes
id: lanes
env:
EVENT_NAME: ${{ github.event_name }}
RUN_CPU_TESTS: ${{ github.event.inputs.run-cpu-tests || '' }}
RUN_GPU_TESTS: ${{ github.event.inputs.run-gpu-tests || '' }}
run: |
selected_lanes='none'
if [[ "$EVENT_NAME" == 'schedule' || "$EVENT_NAME" == 'pull_request' ]]; then
selected_lanes='cpu,igpu,igpu-unit,igpu-func,dgpu,dgpu-unit,dgpu-func'
elif [[ "$RUN_CPU_TESTS" == 'true' && "$RUN_GPU_TESTS" == 'true' ]]; then
selected_lanes='cpu,igpu,igpu-unit,igpu-func,dgpu,dgpu-unit,dgpu-func'
elif [[ "$RUN_CPU_TESTS" == 'true' ]]; then
selected_lanes='cpu'
elif [[ "$RUN_GPU_TESTS" == 'true' ]]; then
selected_lanes='igpu,igpu-unit,igpu-func,dgpu,dgpu-unit,dgpu-func'
fi
echo "selected_lanes=${selected_lanes}" >> "$GITHUB_OUTPUT"
- name: Generate final summary
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: render-summary
selection: ${{ steps.lanes.outputs.selected_lanes }}
selected-lanes: ${{ steps.lanes.outputs.selected_lanes }}
- name: Merge duration reports
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: merge-durations
duration-output: ${{ github.workspace }}/coverage-test-durations-all.csv
- name: Upload merged duration artifact
if: ${{ always() }}
uses: ababushk/upload-artifact@ebc7d74ace101c08868aed05dba2aaf274b9a2c7 # main
with:
name: coverage-test-durations
path: coverage-test-durations-all.csv
if-no-files-found: warn
retention-days: 7
compression-level: 0
overwrite: true
- name: Resolve Codecov upload matrix
id: coverage_files
if: ${{ always() }}
uses: ./.github/actions/coverage_toolkit
with:
command: resolve-uploads
CoverageCodecovUploads:
name: Coverage Codecov Upload (${{ matrix.upload.name }})
if: ${{ always() && needs.CoverageSummary.result == 'success' && needs.CoverageSummary.outputs.upload_matrix_json != '[]' }}
needs: CoverageSummary
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
upload: ${{ fromJSON(needs.CoverageSummary.outputs.upload_matrix_json || '[]') }}
steps:
- name: Checkout sources
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'false'
- name: Download coverage artifacts
uses: akashchi/download-artifact@d59a9c15fec3fdb7c9adf09464124d00f9c11415 # main
with:
pattern: ${{ matrix.upload.artifact_pattern }}
path: ${{ github.workspace }}/artifacts/${{ matrix.upload.artifact_group }}
merge-multiple: false
- name: Install coverage Python dependencies
uses: ./.github/actions/coverage_toolkit
with:
command: install-requirements
- name: Resolve Codecov upload files
id: upload_files
uses: ./.github/actions/coverage_toolkit
with:
command: resolve-upload-files
artifact-group: ${{ matrix.upload.artifact_group }}
artifact-names-json: ${{ toJSON(matrix.upload.artifact_names) }}
upload-key: ${{ matrix.upload.key }}
upload-file: ${{ matrix.upload.file }}
- name: Upload Codecov (${{ matrix.upload.name }})
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.upload_files.outputs.files }}
disable_search: true
plugins: noop
flags: ${{ matrix.upload.flag }}