Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[GHA] Switch coverity pipeline to internal docker image (#27385)

Mikhail Ryzhov7daf8009109f
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index d87de4257e0..9797414cde5 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -25,7 +25,56 @@ env:
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }}
jobs:
+
+ Smart_CI:
+ runs-on: ubuntu-latest
+ outputs:
+ affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
+ changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
+ skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
+ steps:
+ - name: checkout action
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ with:
+ sparse-checkout: .github/actions/smart-ci
+
+ - name: Get affected components
+ id: smart_ci
+ uses: ./.github/actions/smart-ci
+ with:
+ repository: ${{ github.repository }}
+ pr: ${{ github.event.number }}
+ commit_sha: ${{ github.sha }}
+ ref_name: ${{ github.ref_name }}
+ component_pattern: "category: (.*)"
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ skip_when_only_listed_labels_set: 'docs'
+ skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg'
+
+ Docker:
+ needs: Smart_CI
+ 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: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+
+ - uses: ./.github/actions/handle_docker
+ id: handle_docker
+ with:
+ images: |
+ ov_build/ubuntu_20_04_x64
+ registry: 'openvinogithubactions.azurecr.io'
+ dockerfiles_root_dir: '.github/dockerfiles'
+ changed_components: ${{ needs.smart_ci.outputs.changed_components }}
+
Build:
+ needs: Docker
timeout-minutes: 150
defaults:
run:
@@ -33,7 +82,10 @@ jobs:
runs-on: aks-linux-16-cores-32gb
if: ${{ github.repository_owner == 'openvinotoolkit' }}
container:
- image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
+ image: ${{ fromJSON(needs.docker.outputs.images).ov_build.ubuntu_20_04_x64 }}
+ volumes:
+ - /mount:/mount
+ options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
CMAKE_BUILD_TYPE: 'Release'
@@ -43,13 +95,16 @@ jobs:
OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib
BUILD_DIR: /__w/openvino/openvino/openvino_build
COVERITY_TOOL_DIR: /__w/openvino/openvino/coverity_tool
+ CMAKE_CXX_COMPILER_LAUNCHER: sccache
+ CMAKE_C_COMPILER_LAUNCHER: sccache
+ SCCACHE_IGNORE_SERVER_IO_ERROR: 1
+ SCCACHE_SERVER_PORT: 35555
+ SCCACHE_ERROR_LOG: /__w/openvino/sccache_log.txt
+ SCCACHE_LOG: warn
+ SCCACHE_AZURE_KEY_PREFIX: coverity_lin
+ SCCACHE_CACHE_SIZE: 50G
steps:
- - name: Install git
- run: |
- apt-get update
- apt-get install --assume-yes --no-install-recommends git ca-certificates
-
- name: Clone OpenVINO
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
@@ -86,7 +141,9 @@ jobs:
#
# Build
#
-
+ - name: Clean sccache stats
+ run: ${SCCACHE_PATH} --zero-stats
+
- name: CMake configure - OpenVINO
run: |
cmake \
@@ -108,12 +165,13 @@ jobs:
- name: Cmake build - OpenVINO with Coverity
run: ${COVERITY_TOOL_DIR}/cov-analysis*/bin/cov-build --dir ${BUILD_DIR}/cov-int cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
+
+ - name: Show sccache stats
+ run: ${SCCACHE_PATH} --show-stats
- name: Pack Artefacts
- run: |
- pushd ${BUILD_DIR}
- tar -cvf - cov-int | pigz > openvino.tgz
- popd
+ run: tar -cvf - cov-int | pigz > openvino.tgz
+ working-directory: ${{ env.BUILD_DIR }}
- name: Submit artefacts
run: |