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
[GHA] VS 2022 (#28520)
Mikhail Ryzhovcfbc99805bc8
diff --git a/.github/actions/common/constants.py b/.github/actions/common/constants.pyindex 6a1d165fc7d..a9ed34ce7a2 100644--- a/.github/actions/common/constants.py+++ b/.github/actions/common/constants.py@@ -16,6 +16,8 @@ productTypes = ('public_linux_ubuntu_24_04_x86_64_release','public_windows_vs2019_Release','public_windows_vs2019_Debug',+ 'public_windows_vs2022_Release',+ 'public_windows_vs2022_Debug','public_manylinux2014_x86_64_release',)ProductType = Enum('ProductType', {t.upper(): t for t in productTypes})@@ -41,5 +43,5 @@ PlatformMapping = {PlatformKey.UBUNTU20_ARM64: ProductType.PUBLIC_LINUX_UBUNTU_20_04_ARM64_RELEASE,PlatformKey.UBUNTU22_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_22_04_X86_64_RELEASE,PlatformKey.UBUNTU24_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_24_04_X86_64_RELEASE,- PlatformKey.WINDOWS_X86_64: ProductType.PUBLIC_WINDOWS_VS2019_RELEASE,+ PlatformKey.WINDOWS_X86_64: ProductType.PUBLIC_WINDOWS_VS2022_RELEASE,}diff --git a/.github/workflows/job_build_windows.yml b/.github/workflows/job_build_windows.ymlindex 988bec1de7f..e725f15c708 100644--- a/.github/workflows/job_build_windows.yml+++ b/.github/workflows/job_build_windows.yml@@ -56,7 +56,7 @@ jobs:BUILD_DIR: "${{ github.workspace }}\\openvino_build"ARTIFACTS_SHARE: "C:\\mount\\build-artifacts"MANIFEST_PATH: "${{ github.workspace }}\\manifest.yml"- PRODUCT_TYPE: 'public_windows_vs2019_${{ inputs.build-type }}'+ PRODUCT_TYPE: 'public_windows_vs2022_${{ inputs.build-type }}'steps:- name: Clone OpenVINOuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2@@ -154,10 +154,10 @@ jobs:restore-keys: |${{ runner.os }}-${{ runner.arch }}-ccache- - name: Configure Developer Command Prompt for Microsoft Visual C++ (2019)+ - name: Configure Developer Command Prompt for Microsoft Visual C++uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0with:- toolset: 14.29+ toolset: 14.40 # v2022- name: Set SSL_CERT_FILE for model downloading for unit testsrun: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV@@ -229,7 +229,7 @@ jobs:& $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txtcmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" &&- cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }} &&+ cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheelsif ($LASTEXITCODE -ne 0) {Write-Host "Failed to build Python wheels for Python $pyVersion"diff --git a/.github/workflows/job_samples_tests.yml b/.github/workflows/job_samples_tests.ymlindex 07fc17b7975..abcbc62c182 100644--- a/.github/workflows/job_samples_tests.yml+++ b/.github/workflows/job_samples_tests.yml@@ -84,11 +84,11 @@ jobs:version: '3.11'should-setup-pip-paths: 'false'- - name: Configure Developer Command Prompt for Microsoft Visual C++ (2022)+ - name: Configure Developer Command Prompt for Microsoft Visual C++if: runner.os == 'Windows'uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0with:- toolset: 14.40+ toolset: 14.40 # v2022- name: Build cpp samplesrun: $INSTALL_DIR/samples/cpp/build_samples.sh -i $INSTALL_DIR -b $BUILD_DIR/cpp_samplesdiff --git a/.github/workflows/windows_conditional_compilation.yml b/.github/workflows/windows_conditional_compilation.ymlindex 6ce104ad07f..ba990855820 100644--- a/.github/workflows/windows_conditional_compilation.yml+++ b/.github/workflows/windows_conditional_compilation.yml@@ -157,7 +157,7 @@ jobs:- name: Configure Developer Command Prompt for Microsoft Visual C++uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0with:- toolset: 14.40+ toolset: 14.40 # v2022- name: Set SSL_CERT_FILE for model downloading for unit testsrun: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENVdiff --git a/.github/workflows/windows_vs2019_debug.yml b/.github/workflows/windows_vs2019_debug.ymlindex 4fcdc6b58b7..c69ea87d1bc 100644--- a/.github/workflows/windows_vs2019_debug.yml+++ b/.github/workflows/windows_vs2019_debug.yml@@ -1,4 +1,4 @@-name: Windows (VS 2019, Python 3.11, Debug)+name: Windows (VS 2022, Python 3.11, Debug)on:workflow_dispatch:merge_group:@@ -9,7 +9,7 @@ on:- 'releases/**'concurrency:# github.ref is not unique in post-commit- group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows-vs2019-debug+ group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows-vs2022-debugcancel-in-progress: truepermissions: read-all@@ -77,7 +77,7 @@ jobs:with:runner: 'aks-win-4-cores-8gb'affected-components: ${{ needs.smart_ci.outputs.affected_components }}- os: 'windows_2019'+ os: 'windows_2022'build-type: 'Debug'timeout-minutes: 60diff --git a/.github/workflows/windows_vs2019_release.yml b/.github/workflows/windows_vs2019_release.ymlindex d909c186337..0288bef986b 100644--- a/.github/workflows/windows_vs2019_release.yml+++ b/.github/workflows/windows_vs2019_release.yml@@ -1,4 +1,4 @@-name: Windows (VS 2019, Python 3.11, Release)+name: Windows (VS 2022, Python 3.11, Release)on:workflow_dispatch:pull_request:@@ -520,7 +520,7 @@ jobs:with:runner: 'aks-win-4-cores-8gb'affected-components: ${{ needs.smart_ci.outputs.affected_components }}- os: 'windows_2019'+ os: 'windows_2022'build-type: 'Release'timeout-minutes: 50diff --git a/.github/workflows/workflows_to_track.txt b/.github/workflows/workflows_to_track.txtindex ef3bb633ed7..262465ead6b 100644--- a/.github/workflows/workflows_to_track.txt+++ b/.github/workflows/workflows_to_track.txt@@ -20,8 +20,8 @@ name: Linux Static CC (Ubuntu 22.04, Python 3.11, Clang)name: GitHub Actions Workflows Scans==> ./check_pr_commits.yml <==name: PR Commits-==> ./windows_vs2019_debug.yml <==-name: Windows (VS 2019, Python 3.11, Debug)+==> ./windows_vs2022_debug.yml <==+name: Windows (VS 2022, Python 3.11, Debug)==> ./files_size.yml <==name: Files Size==> ./cleanup_caches.yml <==@@ -69,7 +69,7 @@ name: Webassemblyname: Linux (Ubuntu 24.04, Python 3.12)==> ./assign_issue.yml <==name: Take Issue-==> ./windows_vs2019_release.yml <==-name: Windows (VS 2019, Python 3.11, Release)+==> ./windows_vs2022_release.yml <==+name: Windows (VS 2022, Python 3.11, Release)==> ./coverity.yml <==name: Coverity (Ubuntu 20.04, Python 3.11)diff --git a/src/bindings/python/wheel/CMakeLists.txt b/src/bindings/python/wheel/CMakeLists.txtindex 3f42940627d..e598487753d 100644--- a/src/bindings/python/wheel/CMakeLists.txt+++ b/src/bindings/python/wheel/CMakeLists.txt@@ -132,23 +132,27 @@ add_custom_command(OUTPUT ${openvino_wheel_path}WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"COMMENT "Building Python wheel ${openvino_wheel_name}"VERBATIM)+set(ie_wheel_deps ${openvino_wheel_path})++if(NOT CMAKE_HOST_WIN32)+ set(fdupes_report ${CMAKE_CURRENT_BINARY_DIR}/fdupes_report.txt)+ add_custom_command(OUTPUT "${fdupes_report}"+ COMMAND ${CMAKE_COMMAND}+ -D Python3_EXECUTABLE=${Python3_EXECUTABLE}+ -D WORKING_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}+ -D WHEEL_VERSION=${WHEEL_VERSION}+ -D PACKAGE_FILE=${openvino_wheel_path}+ -D REPORT_FILE=${fdupes_report}+ -D CMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX}+ -P "${CMAKE_CURRENT_SOURCE_DIR}/fdupes_check.cmake"+ DEPENDS "${openvino_wheel_path}"+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"+ COMMENT "Run 'fdupes' checks for wheel ${openvino_wheel_name}"+ VERBATIM)+ list(APPEND ie_wheel_deps ${fdupes_report})+endif()-set(fdupes_report ${CMAKE_CURRENT_BINARY_DIR}/fdupes_report.txt)-add_custom_command(OUTPUT "${fdupes_report}"- COMMAND ${CMAKE_COMMAND}- -D Python3_EXECUTABLE=${Python3_EXECUTABLE}- -D WORKING_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}- -D WHEEL_VERSION=${WHEEL_VERSION}- -D PACKAGE_FILE=${openvino_wheel_path}- -D REPORT_FILE=${fdupes_report}- -D CMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX}- -P "${CMAKE_CURRENT_SOURCE_DIR}/fdupes_check.cmake"- DEPENDS "${openvino_wheel_path}"- WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"- COMMENT "Run 'fdupes' checks for wheel ${openvino_wheel_name}"- VERBATIM)--add_custom_target(ie_wheel ALL DEPENDS ${openvino_wheel_path} ${fdupes_report})+add_custom_target(ie_wheel ALL DEPENDS ${ie_wheel_deps})add_custom_command(TARGET ie_wheeldiff --git a/src/bindings/python/wheel/fdupes_check.cmake b/src/bindings/python/wheel/fdupes_check.cmakeindex 9f2a7860b3b..d7cbec3343d 100644--- a/src/bindings/python/wheel/fdupes_check.cmake+++ b/src/bindings/python/wheel/fdupes_check.cmake@@ -12,7 +12,13 @@ endforeach()find_program(fdupes_PROGRAM NAMES fdupes DOC "Path to fdupes")if(NOT fdupes_PROGRAM)- message(WARNING "Failed to find 'fdupes' tool, use 'sudo apt-get install fdupes' to install it")+ set(fdupes_install_msg "refer to your platform's package manager or install it manually.")+ if(CMAKE_HOST_LINUX)+ set(fdupes_install_msg "sudo apt-get install fdupes")+ elseif(CMAKE_HOST_APPLE)+ set(fdupes_install_msg "brew install fdupes")+ endif()+ message(WARNING "Failed to find 'fdupes' tool. Install it using: ${fdupes_install_msg}")return()endif()diff --git a/src/bindings/python/wheel/setup.py b/src/bindings/python/wheel/setup.pyindex 50f0066313d..620ce30f33d 100644--- a/src/bindings/python/wheel/setup.py+++ b/src/bindings/python/wheel/setup.py@@ -66,9 +66,9 @@ LIB_INSTALL_CFG = {"rpath": LIBS_RPATH,"binary_dir": OPENVINO_BINARY_DIR,},- "ie_libs_с": {+ "ie_libs_c": {"name": "core_c",- "prefix": f"{BUILD_BASE}/libs.core_с",+ "prefix": f"{BUILD_BASE}/libs.core_c","install_dir": OV_RUNTIME_LIBS_DIR,"rpath": LIBS_RPATH,"binary_dir": OPENVINO_BINARY_DIR,