Skip to content

Commit cfbc998

Browse files
authored
[GHA] VS 2022 (openvinotoolkit#28520)
### Details: - Switch Windows pipelines to VS 2022 ### Tickets: - *ticket-id*
1 parent 1616c9d commit cfbc998

10 files changed

+48
-36
lines changed

.github/actions/common/constants.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class EventType(Enum):
1616
'public_linux_ubuntu_24_04_x86_64_release',
1717
'public_windows_vs2019_Release',
1818
'public_windows_vs2019_Debug',
19+
'public_windows_vs2022_Release',
20+
'public_windows_vs2022_Debug',
1921
'public_manylinux2014_x86_64_release',
2022
)
2123
ProductType = Enum('ProductType', {t.upper(): t for t in productTypes})
@@ -41,5 +43,5 @@ class EventType(Enum):
4143
PlatformKey.UBUNTU20_ARM64: ProductType.PUBLIC_LINUX_UBUNTU_20_04_ARM64_RELEASE,
4244
PlatformKey.UBUNTU22_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_22_04_X86_64_RELEASE,
4345
PlatformKey.UBUNTU24_X86_64: ProductType.PUBLIC_LINUX_UBUNTU_24_04_X86_64_RELEASE,
44-
PlatformKey.WINDOWS_X86_64: ProductType.PUBLIC_WINDOWS_VS2019_RELEASE,
46+
PlatformKey.WINDOWS_X86_64: ProductType.PUBLIC_WINDOWS_VS2022_RELEASE,
4547
}

.github/workflows/job_build_windows.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
BUILD_DIR: "${{ github.workspace }}\\openvino_build"
5757
ARTIFACTS_SHARE: "C:\\mount\\build-artifacts"
5858
MANIFEST_PATH: "${{ github.workspace }}\\manifest.yml"
59-
PRODUCT_TYPE: 'public_windows_vs2019_${{ inputs.build-type }}'
59+
PRODUCT_TYPE: 'public_windows_vs2022_${{ inputs.build-type }}'
6060
steps:
6161
- name: Clone OpenVINO
6262
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -154,10 +154,10 @@ jobs:
154154
restore-keys: |
155155
${{ runner.os }}-${{ runner.arch }}-ccache
156156
157-
- name: Configure Developer Command Prompt for Microsoft Visual C++ (2019)
157+
- name: Configure Developer Command Prompt for Microsoft Visual C++
158158
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
159159
with:
160-
toolset: 14.29
160+
toolset: 14.40 # v2022
161161

162162
- name: Set SSL_CERT_FILE for model downloading for unit tests
163163
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV
@@ -229,7 +229,7 @@ jobs:
229229
& $pythonExecutablePath -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
230230
231231
cmake -DPython3_EXECUTABLE="$pythonExecutablePath" -DOpenVINODeveloperPackage_DIR=${{ env.BUILD_DIR }} -S ${{ env.OPENVINO_REPO }}/src/bindings/python -B "$pyBuildDir" &&
232-
cmake --build "$pyBuildDir" --parallel --config ${{ env.CMAKE_BUILD_TYPE }} &&
232+
cmake --build "$pyBuildDir" --parallel $ENV:NUMBER_OF_PROCESSORS --target ie_wheel --config ${{ env.CMAKE_BUILD_TYPE }} &&
233233
cmake --install "$pyBuildDir" --config ${{ env.CMAKE_BUILD_TYPE }} --prefix ${{ env.INSTALL_WHEELS_DIR }} --component python_wheels
234234
if ($LASTEXITCODE -ne 0) {
235235
Write-Host "Failed to build Python wheels for Python $pyVersion"

.github/workflows/job_samples_tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ jobs:
8484
version: '3.11'
8585
should-setup-pip-paths: 'false'
8686

87-
- name: Configure Developer Command Prompt for Microsoft Visual C++ (2022)
87+
- name: Configure Developer Command Prompt for Microsoft Visual C++
8888
if: runner.os == 'Windows'
8989
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
9090
with:
91-
toolset: 14.40
91+
toolset: 14.40 # v2022
9292

9393
- name: Build cpp samples
9494
run: $INSTALL_DIR/samples/cpp/build_samples.sh -i $INSTALL_DIR -b $BUILD_DIR/cpp_samples

.github/workflows/windows_conditional_compilation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157
- name: Configure Developer Command Prompt for Microsoft Visual C++
158158
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
159159
with:
160-
toolset: 14.40
160+
toolset: 14.40 # v2022
161161

162162
- name: Set SSL_CERT_FILE for model downloading for unit tests
163163
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV

.github/workflows/windows_vs2019_debug.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows (VS 2019, Python 3.11, Debug)
1+
name: Windows (VS 2022, Python 3.11, Debug)
22
on:
33
workflow_dispatch:
44
merge_group:
@@ -9,7 +9,7 @@ on:
99
- 'releases/**'
1010
concurrency:
1111
# github.ref is not unique in post-commit
12-
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows-vs2019-debug
12+
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows-vs2022-debug
1313
cancel-in-progress: true
1414

1515
permissions: read-all
@@ -77,7 +77,7 @@ jobs:
7777
with:
7878
runner: 'aks-win-4-cores-8gb'
7979
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
80-
os: 'windows_2019'
80+
os: 'windows_2022'
8181
build-type: 'Debug'
8282
timeout-minutes: 60
8383

.github/workflows/windows_vs2019_release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Windows (VS 2019, Python 3.11, Release)
1+
name: Windows (VS 2022, Python 3.11, Release)
22
on:
33
workflow_dispatch:
44
pull_request:
@@ -520,7 +520,7 @@ jobs:
520520
with:
521521
runner: 'aks-win-4-cores-8gb'
522522
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
523-
os: 'windows_2019'
523+
os: 'windows_2022'
524524
build-type: 'Release'
525525
timeout-minutes: 50
526526

.github/workflows/workflows_to_track.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ name: Linux Static CC (Ubuntu 22.04, Python 3.11, Clang)
2020
name: GitHub Actions Workflows Scans
2121
==> ./check_pr_commits.yml <==
2222
name: PR Commits
23-
==> ./windows_vs2019_debug.yml <==
24-
name: Windows (VS 2019, Python 3.11, Debug)
23+
==> ./windows_vs2022_debug.yml <==
24+
name: Windows (VS 2022, Python 3.11, Debug)
2525
==> ./files_size.yml <==
2626
name: Files Size
2727
==> ./cleanup_caches.yml <==
@@ -69,7 +69,7 @@ name: Webassembly
6969
name: Linux (Ubuntu 24.04, Python 3.12)
7070
==> ./assign_issue.yml <==
7171
name: Take Issue
72-
==> ./windows_vs2019_release.yml <==
73-
name: Windows (VS 2019, Python 3.11, Release)
72+
==> ./windows_vs2022_release.yml <==
73+
name: Windows (VS 2022, Python 3.11, Release)
7474
==> ./coverity.yml <==
7575
name: Coverity (Ubuntu 20.04, Python 3.11)

src/bindings/python/wheel/CMakeLists.txt

+20-16
Original file line numberDiff line numberDiff line change
@@ -132,23 +132,27 @@ add_custom_command(OUTPUT ${openvino_wheel_path}
132132
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
133133
COMMENT "Building Python wheel ${openvino_wheel_name}"
134134
VERBATIM)
135+
set(ie_wheel_deps ${openvino_wheel_path})
136+
137+
if(NOT CMAKE_HOST_WIN32)
138+
set(fdupes_report ${CMAKE_CURRENT_BINARY_DIR}/fdupes_report.txt)
139+
add_custom_command(OUTPUT "${fdupes_report}"
140+
COMMAND ${CMAKE_COMMAND}
141+
-D Python3_EXECUTABLE=${Python3_EXECUTABLE}
142+
-D WORKING_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}
143+
-D WHEEL_VERSION=${WHEEL_VERSION}
144+
-D PACKAGE_FILE=${openvino_wheel_path}
145+
-D REPORT_FILE=${fdupes_report}
146+
-D CMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX}
147+
-P "${CMAKE_CURRENT_SOURCE_DIR}/fdupes_check.cmake"
148+
DEPENDS "${openvino_wheel_path}"
149+
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
150+
COMMENT "Run 'fdupes' checks for wheel ${openvino_wheel_name}"
151+
VERBATIM)
152+
list(APPEND ie_wheel_deps ${fdupes_report})
153+
endif()
135154

136-
set(fdupes_report ${CMAKE_CURRENT_BINARY_DIR}/fdupes_report.txt)
137-
add_custom_command(OUTPUT "${fdupes_report}"
138-
COMMAND ${CMAKE_COMMAND}
139-
-D Python3_EXECUTABLE=${Python3_EXECUTABLE}
140-
-D WORKING_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}
141-
-D WHEEL_VERSION=${WHEEL_VERSION}
142-
-D PACKAGE_FILE=${openvino_wheel_path}
143-
-D REPORT_FILE=${fdupes_report}
144-
-D CMAKE_SHARED_LIBRARY_SUFFIX=${CMAKE_SHARED_LIBRARY_SUFFIX}
145-
-P "${CMAKE_CURRENT_SOURCE_DIR}/fdupes_check.cmake"
146-
DEPENDS "${openvino_wheel_path}"
147-
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
148-
COMMENT "Run 'fdupes' checks for wheel ${openvino_wheel_name}"
149-
VERBATIM)
150-
151-
add_custom_target(ie_wheel ALL DEPENDS ${openvino_wheel_path} ${fdupes_report})
155+
add_custom_target(ie_wheel ALL DEPENDS ${ie_wheel_deps})
152156

153157
add_custom_command(
154158
TARGET ie_wheel

src/bindings/python/wheel/fdupes_check.cmake

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ endforeach()
1212

1313
find_program(fdupes_PROGRAM NAMES fdupes DOC "Path to fdupes")
1414
if(NOT fdupes_PROGRAM)
15-
message(WARNING "Failed to find 'fdupes' tool, use 'sudo apt-get install fdupes' to install it")
15+
set(fdupes_install_msg "refer to your platform's package manager or install it manually.")
16+
if(CMAKE_HOST_LINUX)
17+
set(fdupes_install_msg "sudo apt-get install fdupes")
18+
elseif(CMAKE_HOST_APPLE)
19+
set(fdupes_install_msg "brew install fdupes")
20+
endif()
21+
message(WARNING "Failed to find 'fdupes' tool. Install it using: ${fdupes_install_msg}")
1622
return()
1723
endif()
1824

src/bindings/python/wheel/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
"rpath": LIBS_RPATH,
6767
"binary_dir": OPENVINO_BINARY_DIR,
6868
},
69-
"ie_libs_с": {
69+
"ie_libs_c": {
7070
"name": "core_c",
71-
"prefix": f"{BUILD_BASE}/libs.core_с",
71+
"prefix": f"{BUILD_BASE}/libs.core_c",
7272
"install_dir": OV_RUNTIME_LIBS_DIR,
7373
"rpath": LIBS_RPATH,
7474
"binary_dir": OPENVINO_BINARY_DIR,

0 commit comments

Comments
 (0)