4
4
# run daily at 00:00
5
5
- cron : ' 0 0 * * *'
6
6
workflow_dispatch :
7
+ inputs :
8
+ # to be defined for specified test scopes (e.g. CPU func. tests)
9
+ sanitizerMode :
10
+ description : ' Sanitizer mode for func_tests (All || AddressAndLeak || UndefinedBehavior || Thread).'
11
+ required : false
12
+ default : ' All'
13
+ gtestFilter :
14
+ description : ' Filter for func_tests.'
15
+ required : false
16
+ default : ' *smoke*'
17
+ pull_request :
18
+ paths :
19
+ - ' .github/workflows/linux_sanitizers.yml'
7
20
8
21
concurrency :
9
22
# github.ref is not unique in post-commit
@@ -14,6 +27,14 @@ permissions: read-all
14
27
15
28
env :
16
29
TARGET_BRANCH : ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }}
30
+ BUILD_DIR : /__w/openvino/openvino/openvino_build
31
+ OPENVINO_REPO : /__w/openvino/openvino/openvino
32
+ INSTALL_TEST_DIR : /__w/openvino/openvino/openvino_install/tests/
33
+ INSTALL_DIR : /__w/openvino/openvino/openvino_install
34
+ TBB_ENABLE_SANITIZERS : 1
35
+ ASAN_OPTIONS : halt_on_error=0:suppressions=/__w/openvino/openvino/openvino/tests/sanitizers/asan/suppressions.supp
36
+ LSAN_OPTIONS : suppressions=/__w/openvino/openvino/openvino/tests/sanitizers/lsan/suppressions.txt:NEOReadDebugKeys=1:DisableDeepBind=1
37
+ TSAN_OPTIONS : suppressions=/__w/openvino/openvino/openvino/tests/sanitizers/tsan/suppressions.txt
17
38
18
39
jobs :
19
40
Smart_CI :
@@ -93,11 +114,7 @@ jobs:
93
114
CMAKE_BUILD_TYPE : ' RelWithDebInfo'
94
115
CMAKE_GENERATOR : ' Ninja'
95
116
GITHUB_WORKSPACE : ' /__w/openvino/openvino'
96
- OPENVINO_REPO : /__w/openvino/openvino/openvino
97
117
OPENVINO_CONTRIB_REPO : /__w/openvino/openvino/openvino_contrib
98
- INSTALL_DIR : /__w/openvino/openvino/openvino_install
99
- INSTALL_TEST_DIR : /__w/openvino/openvino/tests_install
100
- BUILD_DIR : /__w/openvino/openvino/openvino_build
101
118
CMAKE_CXX_COMPILER_LAUNCHER : sccache
102
119
CMAKE_C_COMPILER_LAUNCHER : sccache
103
120
SCCACHE_IGNORE_SERVER_IO_ERROR : 1
@@ -251,15 +268,6 @@ jobs:
251
268
- SANITIZER : ' AddressAndLeak'
252
269
- SANITIZER : ' UndefinedBehavior'
253
270
- SANITIZER : ' Thread'
254
- env :
255
- OPENVINO_REPO : /__w/openvino/openvino/openvino
256
- INSTALL_DIR : /__w/openvino/openvino/install
257
- INSTALL_TEST_DIR : /__w/openvino/openvino/install/tests
258
- BUILD_DIR : /__w/openvino/openvino/openvino_build
259
- TBB_ENABLE_SANITIZERS : 1
260
- ASAN_OPTIONS : halt_on_error=0:suppressions=/__w/openvino/openvino/openvino/tests/sanitizers/asan/suppressions.supp
261
- LSAN_OPTIONS : suppressions=/__w/openvino/openvino/openvino/tests/sanitizers/lsan/suppressions.txt:NEOReadDebugKeys=1:DisableDeepBind=1
262
- TSAN_OPTIONS : suppressions=/__w/openvino/openvino/openvino/tests/sanitizers/tsan/suppressions.txt
263
271
264
272
steps :
265
273
- name : Download OpenVINO package
@@ -483,6 +491,96 @@ jobs:
483
491
uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
484
492
if : ${{ !cancelled() }}
485
493
with :
486
- name : test-results-cpp_${{ matrix.SANITIZER }}
494
+ name : unit-test-results-cpp_${{ matrix.SANITIZER }}
495
+ path : ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
496
+ if-no-files-found : ' error'
497
+
498
+ CXX_Func_Tests :
499
+ # todo: move another plugin's func tests here
500
+ name : C++ func tests
501
+ if : ${{ github.repository_owner == 'openvinotoolkit' }}
502
+ needs : [Docker, Build]
503
+ timeout-minutes : 120
504
+ runs-on : aks-linux-8-cores-16gb
505
+ container :
506
+ image : ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_22_04_x64 }}
507
+ defaults :
508
+ run :
509
+ shell : bash
510
+ strategy :
511
+ max-parallel : 3
512
+ fail-fast : false
513
+ matrix :
514
+ include :
515
+ - SANITIZER : ' AddressAndLeak'
516
+ - SANITIZER : ' UndefinedBehavior'
517
+ - SANITIZER : ' Thread'
518
+
519
+ steps :
520
+ - name : Check matrix
521
+ id : check_matrix
522
+ # by default in scheduled launch we run only AddressAndLeak with *smoke*Conv_* pattern
523
+ # to prevent false-positive alerts and time exceeded error,
524
+ # in workflow_dispatch case all smoke tests will be launched with all types of sanitizers
525
+ # if gtestFilter and sanMode inputs are not specified
526
+ if : ${{ (github.event_name == 'workflow_dispatch' && (inputs.sanitizerMode == 'All' || inputs.sanitizerMode == matrix.SANITIZER) || matrix.SANITIZER == 'AddressAndLeak')}}
527
+ run : |
528
+ echo 'Sanitizer mode: ${{ inputs.sanitizerMode }}'
529
+
530
+ - name : Download OpenVINO package
531
+ if : ${{ steps.check_matrix.conclusion != 'skipped' }}
532
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
533
+ with :
534
+ name : ${{ format('openvino_package_{0}', matrix.SANITIZER) }}
535
+ path : ${{ env.INSTALL_DIR }}
536
+
537
+ - name : Download OpenVINO tests package
538
+ if : ${{ steps.check_matrix.conclusion != 'skipped' }}
539
+ uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
540
+ with :
541
+ name : ${{ format('openvino_tests_{0}', matrix.SANITIZER) }}
542
+ path : ${{ env.INSTALL_TEST_DIR }}
543
+
544
+ - name : Extract OpenVINO packages
545
+ if : ${{ steps.check_matrix.conclusion != 'skipped' }}
546
+ run : |
547
+ pushd $INSTALL_DIR
548
+ pigz -dc openvino_package.tar.gz | tar -xf - -C ${INSTALL_DIR}
549
+ popd
550
+ pushd $INSTALL_TEST_DIR
551
+ pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_DIR}
552
+ popd
553
+
554
+ - name : Fetch Sanitizer Suppression Lists
555
+ if : ${{ steps.check_matrix.conclusion != 'skipped' }}
556
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
557
+ timeout-minutes : 15
558
+ with :
559
+ sparse-checkout : |
560
+ tests/sanitizers/lsan/suppressions.txt
561
+ tests/sanitizers/asan/suppressions.supp
562
+ tests/sanitizers/tsan/suppressions.txt
563
+ sparse-checkout-cone-mode : false
564
+ path : ${{ env.OPENVINO_REPO }}
565
+
566
+ #
567
+ # Tests
568
+ #
569
+
570
+ - name : CPU plugin func tests
571
+ if : ${{ steps.check_matrix.conclusion != 'skipped' }}
572
+ env :
573
+ GTEST_FILTER : ${{ github.event_name == 'workflow_dispatch' && inputs.gtestFilter || '*smoke*Conv_*' }}
574
+ run : |
575
+ source ${INSTALL_DIR}/setupvars.sh
576
+ ${INSTALL_TEST_DIR}/ov_cpu_func_tests --gtest_print_time=1 \
577
+ --gtest_filter=${{ env.GTEST_FILTER }} \
578
+ --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-CPUFuncTests.xml
579
+
580
+ - name : Upload Test Results
581
+ uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
582
+ if : ${{ steps.check_matrix.conclusion != 'skipped' }}
583
+ with :
584
+ name : func-test-results-cpp_${{ matrix.SANITIZER }}
487
585
path : ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
488
586
if-no-files-found : ' error'
0 commit comments