OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CI] [GHA] Build and run samples on GPU; remedy false positive failures for `semgrep` scan (#37010)
Andrei Kashchikhin66da4eb1ba49
diff --git a/.github/dockerfiles/docker_tag b/.github/dockerfiles/docker_tagindex 2f529578726..90c6e09b17e 100644--- a/.github/dockerfiles/docker_tag+++ b/.github/dockerfiles/docker_tag@@ -1 +1 @@-pr-36049+pr-37010diff --git a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_igpu/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_igpu/Dockerfileindex 3e3313fbd56..e185144fb05 100644--- a/.github/dockerfiles/ov_test/ubuntu_22_04_x64_igpu/Dockerfile+++ b/.github/dockerfiles/ov_test/ubuntu_22_04_x64_igpu/Dockerfile@@ -20,6 +20,7 @@ RUN apt-get update && \apt-get install \curl \git \+ git-lfs \ca-certificates \gpg-agent \tzdata \diff --git a/.github/dockerfiles/ov_test/ubuntu_24_04_x64_dgpu/Dockerfile b/.github/dockerfiles/ov_test/ubuntu_24_04_x64_dgpu/Dockerfileindex f118bc9102d..c2c45e7dd3f 100644--- a/.github/dockerfiles/ov_test/ubuntu_24_04_x64_dgpu/Dockerfile+++ b/.github/dockerfiles/ov_test/ubuntu_24_04_x64_dgpu/Dockerfile@@ -18,6 +18,7 @@ RUN apt-get update && \apt-get install \curl \git \+ git-lfs \gpg-agent \tzdata \wget \diff --git a/.github/workflows/android.yml b/.github/workflows/android.ymlindex 47d6d7ce21e..f348000c1fe 100644--- a/.github/workflows/android.yml+++ b/.github/workflows/android.yml@@ -143,6 +143,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.ymlindex 30f0192f967..c1be1f88288 100644--- a/.github/workflows/build_doc.yml+++ b/.github/workflows/build_doc.yml@@ -128,6 +128,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/dev_cpu_linux_snippets_libxsmm.yml b/.github/workflows/dev_cpu_linux_snippets_libxsmm.ymlindex 9883edba22f..496a7444438 100644--- a/.github/workflows/dev_cpu_linux_snippets_libxsmm.yml+++ b/.github/workflows/dev_cpu_linux_snippets_libxsmm.yml@@ -121,6 +121,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/job_build_linux.yml b/.github/workflows/job_build_linux.ymlindex 3b41c3dfddd..adbb18dec0d 100644--- a/.github/workflows/job_build_linux.yml+++ b/.github/workflows/job_build_linux.yml@@ -137,6 +137,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/job_clang_tidy.yml b/.github/workflows/job_clang_tidy.ymlindex 20181c6d7e4..b79107eadfb 100644--- a/.github/workflows/job_clang_tidy.yml+++ b/.github/workflows/job_clang_tidy.yml@@ -80,6 +80,7 @@ jobs:- name: Append the environment variable - load SCCACHE_AZURE_CONNECTION_STRING from filerun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/job_gpu_tests.yml b/.github/workflows/job_gpu_tests.ymlindex 11635d18c8f..62a80f866dc 100644--- a/.github/workflows/job_gpu_tests.yml+++ b/.github/workflows/job_gpu_tests.yml@@ -57,6 +57,8 @@ jobs:DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user inputINSTALL_DIR: ${{ github.workspace }}/installINSTALL_TEST_DIR: ${{ github.workspace }}/install/tests+ BUILD_DIR: ${{ github.workspace }}/build+ MODELS_PATH: ${{ github.workspace }}/testdataGTEST_PARALLEL_SCRIPT: /usr/local/bin/gtest_parallel.pyNODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crtNEO_CACHE_DIR: /root/.cache/neo_compiler_cache@@ -85,6 +87,43 @@ jobs:timeout-minutes: 5run: clinfo+ #+ # Samples+ #++ - name: Build cpp samples+ if: ${{ inputs.test_type == 'unit' }}+ run: $INSTALL_DIR/samples/cpp/build_samples.sh -i $INSTALL_DIR -b $BUILD_DIR/cpp_samples++ # git uses the system CA bundle, so add the proxy root CA (mounted at+ # /usr/local/share/ca-certificates) to it before cloning over HTTPS,+ # otherwise git fails with "server certificate verification failed".+ - name: Add proxy CA certificate to system trust store+ if: ${{ inputs.test_type == 'unit' }}+ run: update-ca-certificates++ - name: Clone test models+ if: ${{ inputs.test_type == 'unit' }}+ uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries+ timeout-minutes: 15+ with:+ repository: 'openvinotoolkit/testdata'+ path: ${{ env.MODELS_PATH }}+ lfs: 'true'+ ref: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref_name }}++ - name: Run hello_query_device sample+ if: ${{ inputs.test_type == 'unit' }}+ run: |+ source ${INSTALL_DIR}/setupvars.sh+ $INSTALL_DIR/samples_bin/hello_query_device++ - name: Run benchmark_app sample+ if: ${{ inputs.test_type == 'unit' }}+ run: |+ source ${INSTALL_DIR}/setupvars.sh+ $INSTALL_DIR/samples_bin/benchmark_app -niter 1 -nireq 1 -m ${MODELS_PATH}/models/test_model/test_model_fp32.xml -d GPU+## Tests#@@ -105,7 +144,7 @@ jobs:test_filter=''if [[ -n "${CUSTOM_TEST_FILTER}" ]]; thentest_filter="${CUSTOM_TEST_FILTER}"- elif [[ "${TEST_TYPE}" == "unit" ]]; then+ elif [[ "${TEST_TYPE}" == 'unit' ]]; thentest_filter='-*scatter_nd_update_gpu.dynamic_padded_output*:*border_gpu.basic_zero_input*:*bicubic_zeros_no_align_data1x1*:*bicubic_border_align_batches*:*bilinear_zeros_no_align_data1x1*:*non_zero_gpu.empty_input*:*mark_shape_of_subgraphs.concat_with_empty_tensor_inputs*:*concat_cpu_impl.dynamic_4d_f*:*border_gpu.basic_zero_input_dynamic*:*network_test.model_with_empty_input_is_not_dynamic*:*bicubic_zeros_align_data1x1*'elsetest_filter='*smoke*'diff --git a/.github/workflows/job_onnx_runtime.yml b/.github/workflows/job_onnx_runtime.ymlindex 214e83cf30d..a01b6d3d904 100644--- a/.github/workflows/job_onnx_runtime.yml+++ b/.github/workflows/job_onnx_runtime.yml@@ -56,6 +56,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/linux_conditional_compilation.yml b/.github/workflows/linux_conditional_compilation.ymlindex 2dd54c3dd6c..901bd0ad711 100644--- a/.github/workflows/linux_conditional_compilation.yml+++ b/.github/workflows/linux_conditional_compilation.yml@@ -133,6 +133,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"@@ -288,6 +289,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/linux_sanitizers.yml b/.github/workflows/linux_sanitizers.ymlindex ff51cdae7c4..258618af73f 100644--- a/.github/workflows/linux_sanitizers.yml+++ b/.github/workflows/linux_sanitizers.yml@@ -134,6 +134,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/manylinux_2_28.yml b/.github/workflows/manylinux_2_28.ymlindex e0099824fe6..bca0965587d 100644--- a/.github/workflows/manylinux_2_28.yml+++ b/.github/workflows/manylinux_2_28.yml@@ -134,6 +134,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/ubuntu_22.yml b/.github/workflows/ubuntu_22.ymlindex 30576636c9f..fe67b90f408 100644--- a/.github/workflows/ubuntu_22.yml+++ b/.github/workflows/ubuntu_22.yml@@ -531,6 +531,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.ymlindex 047bfb92be8..40893aa01a6 100644--- a/.github/workflows/webassembly.yml+++ b/.github/workflows/webassembly.yml@@ -115,6 +115,7 @@ jobs:shell: bashrun: |SCCACHE_AZURE_CONNECTION_STRING="$(cat /secrets/sccache/connection-string)"+ # nosemgrep: yaml.github-actions.security.audit.unsafe-add-mask-workflow-command.unsafe-add-mask-workflow-commandecho "::add-mask::${SCCACHE_AZURE_CONNECTION_STRING}"echo "SCCACHE_AZURE_CONNECTION_STRING=${SCCACHE_AZURE_CONNECTION_STRING}" >> $GITHUB_ENVecho "✓ Connection string loaded and masked"diff --git a/.github/workflows/workflows_scans.yml b/.github/workflows/workflows_scans.ymlindex bf1b2870c89..69b55c51dd2 100644--- a/.github/workflows/workflows_scans.yml+++ b/.github/workflows/workflows_scans.yml@@ -67,4 +67,4 @@ jobs:- name: Semgrep scanrun: |- semgrep scan --error -j 8 --config "p/github-actions" .github/workflows/*+ semgrep scan '--exclude=*.lock.yml' --error -j 8 --config "p/github-actions" .github/workflows