Skip to content

Move to windows-2025 Visual Studio -> 17 and update submodules #1105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 108 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
5b68552
Update build_wheels_windows.yml
avdivan May 12, 2025
0ed6932
Update build_wheels_windows.yml
avdivan May 12, 2025
43df361
Update build_wheels_windows.yml
avdivan May 12, 2025
800c408
Update build_wheels_windows.yml
avdivan May 12, 2025
d509950
Update build_wheels_windows.yml
avdivan May 12, 2025
81b57ad
Update build_wheels_windows.yml
avdivan May 12, 2025
cf6f2a1
Update build_wheels_windows.yml
avdivan May 12, 2025
ce9020f
Update build_wheels_windows.yml
avdivan May 12, 2025
5da97ac
Update build_wheels_windows.yml
avdivan May 12, 2025
02ffc4a
Update build_wheels_windows.yml
avdivan May 12, 2025
62aa42c
Update build_wheels_windows.yml
avdivan May 12, 2025
3f50ff6
Update build_wheels_windows.yml
avdivan May 12, 2025
24e5192
Update build_wheels_windows.yml
avdivan May 12, 2025
af76f7a
Update setup.py
avdivan May 13, 2025
8e63c5b
Update setup.py
avdivan May 18, 2025
67bf0aa
Update build_wheels_windows.yml
avdivan May 30, 2025
66d74ac
Update build_wheels_windows.yml
avdivan May 30, 2025
355cef3
Update build_wheels_windows.yml
avdivan May 30, 2025
5e3b12b
Update build_wheels_windows.yml
avdivan Jun 1, 2025
42f1137
Update build_wheels_windows.yml
avdivan Jun 1, 2025
24eb050
Update build_wheels_windows.yml
avdivan Jun 1, 2025
757388d
Update build_wheels_windows.yml
avdivan Jun 1, 2025
670397e
Update build_wheels_windows.yml
avdivan Jun 1, 2025
4204e30
Update setup.py
avdivan Jun 1, 2025
addeb8d
Update build_wheels_windows.yml
avdivan Jun 1, 2025
ef3b720
Update build_wheels_windows.yml
avdivan Jun 1, 2025
b3190f6
Update build_wheels_windows.yml
avdivan Jun 1, 2025
ee04bc6
Update build_wheels_windows.yml
avdivan Jun 1, 2025
83443a5
Update build_wheels_windows.yml
avdivan Jun 1, 2025
bb83796
Update build_wheels_windows.yml
avdivan Jun 1, 2025
b3c51cf
Update build_wheels_windows.yml
avdivan Jun 1, 2025
4c78354
Update build_wheels_windows.yml
avdivan Jun 1, 2025
067d7f3
Update build_wheels_windows.yml
avdivan Jun 1, 2025
796142a
Update build_wheels_windows.yml
avdivan Jun 1, 2025
efd1806
Update build_wheels_windows.yml
avdivan Jun 1, 2025
f911d5c
Update build_wheels_windows.yml
avdivan Jun 1, 2025
1fe589c
Update build_wheels_windows.yml
avdivan Jun 1, 2025
b7c288e
Update build_wheels_windows.yml
avdivan Jun 1, 2025
a10962c
Update build_wheels_windows.yml
avdivan Jun 1, 2025
1de8fbb
Update build_wheels_windows.yml
avdivan Jun 1, 2025
60b788c
Update build_wheels_windows.yml
avdivan Jun 1, 2025
c80b56f
Update build_wheels_windows.yml
avdivan Jun 1, 2025
03b05e6
Update build_wheels_windows.yml
avdivan Jun 1, 2025
46d9f36
Update build_wheels_windows.yml
avdivan Jun 1, 2025
ad20fe5
Update build_wheels_windows.yml
avdivan Jun 1, 2025
ea199ff
Update build_wheels_windows.yml
avdivan Jun 1, 2025
a447138
Update build_wheels_windows.yml
avdivan Jun 1, 2025
c62730d
Update build_wheels_windows.yml
avdivan Jun 1, 2025
c0546f8
Update build_wheels_windows.yml
avdivan Jun 1, 2025
aeddb72
Update build_wheels_windows.yml
avdivan Jun 1, 2025
d649b22
Update build_wheels_windows.yml
avdivan Jun 1, 2025
19a231a
Update build_wheels_windows.yml
avdivan Jun 1, 2025
bfdddee
Update setup.py
avdivan Jun 1, 2025
3f57a12
Update build_wheels_windows.yml
avdivan Jun 1, 2025
659fd78
Update build_wheels_windows.yml
avdivan Jun 2, 2025
7c9bbea
Update build_wheels_windows.yml
avdivan Jun 2, 2025
d5718fb
Update build_wheels_windows.yml
avdivan Jun 2, 2025
3e4312c
Update build_wheels_windows.yml
avdivan Jun 2, 2025
88c3cf6
Update build_wheels_windows.yml
avdivan Jun 2, 2025
55208e9
Update build_wheels_windows.yml
avdivan Jun 2, 2025
57fef17
Update build_wheels_windows.yml
avdivan Jun 2, 2025
02edf94
Update build_wheels_windows.yml
avdivan Jun 2, 2025
b492445
Update build_wheels_windows.yml
avdivan Jun 2, 2025
c7354fa
Update build_wheels_windows.yml
avdivan Jun 2, 2025
3c8454f
Update build_wheels_windows.yml
avdivan Jun 2, 2025
6688943
Update build_wheels_windows.yml
avdivan Jun 2, 2025
1b73de3
Update build_wheels_windows.yml
avdivan Jun 2, 2025
f9e4b60
Update setup.py
avdivan Jun 2, 2025
f57c90e
Update build_wheels_windows.yml
avdivan Jun 2, 2025
968a007
Update build_wheels_windows.yml
avdivan Jun 2, 2025
598e473
Update build_wheels_windows.yml
avdivan Jun 2, 2025
89455db
Update build_wheels_windows.yml
avdivan Jun 2, 2025
6bc318a
Update build_wheels_windows.yml
avdivan Jun 2, 2025
a242a41
Update build_wheels_windows.yml
avdivan Jun 3, 2025
a66914a
Update build_wheels_windows.yml
avdivan Jun 3, 2025
6b45446
Update build_wheels_windows.yml
avdivan Jun 3, 2025
37eef63
Update build_wheels_windows.yml
avdivan Jun 3, 2025
cbdc64e
Update build_wheels_windows.yml
avdivan Jun 3, 2025
52b491c
Update setup.py
avdivan Jun 3, 2025
52f94f5
Update build_wheels_windows.yml
avdivan Jun 3, 2025
f4e7680
Update setup.py
avdivan Jun 3, 2025
53a25bd
Update build_wheels_windows.yml
avdivan Jun 3, 2025
f6bb4fc
Update setup.py
avdivan Jun 3, 2025
4509c20
Update build_wheels_windows.yml
avdivan Jun 3, 2025
c16e60b
Update setup.py
avdivan Jun 3, 2025
b0c4bce
Update setup.py
avdivan Jun 3, 2025
7aa637a
Update setup.py
avdivan Jun 3, 2025
e8c6f34
Update build_wheels_windows.yml
avdivan Jun 4, 2025
2337f70
Update build_wheels_windows.yml
avdivan Jun 4, 2025
0241996
Update setup.py
avdivan Jun 4, 2025
f12b6d9
Merge pull request #1 from opencv/4.x
avdivan Jun 6, 2025
9e5d8db
Update setup.py
avdivan Jun 10, 2025
1f8dcad
Update build_wheels_windows.yml
avdivan Jun 10, 2025
9791ccf
Update build_wheels_windows.yml
avdivan Jun 11, 2025
b31fe9e
Update build_wheels_windows.yml
avdivan Jun 11, 2025
bd77f99
Update setup.py
avdivan Jun 11, 2025
3dcfcf6
Update build_wheels_windows.yml
avdivan Jun 11, 2025
87ad343
Update build_wheels_windows.yml
avdivan Jun 11, 2025
249f4c9
Update build_wheels_windows.yml
avdivan Jun 11, 2025
dfbaa26
Update build_wheels_windows.yml
avdivan Jun 11, 2025
0ce663d
Update build_wheels_windows.yml
avdivan Jun 11, 2025
516ff9b
Update submodules to latest commits
Jun 11, 2025
92f178d
Update build_wheels_windows.yml
avdivan Jun 11, 2025
0d69483
Update setup.py
avdivan Jun 11, 2025
d751cc8
Update build_wheels_windows.yml
avdivan Jun 12, 2025
ddcbeec
Update build_wheels_macos_m1.yml
avdivan Jun 12, 2025
6a5fe03
Update build_wheels_macos_m1.yml
avdivan Jun 12, 2025
4457886
Update build_wheels_windows.yml
avdivan Jun 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/build_wheels_macos_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,8 @@ jobs:
python${{ matrix.python-version }} -m pip install toml && python${{ matrix.python-version }} -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | python${{ matrix.python-version }} -m pip install -r /dev/stdin
python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
- name: Saving all wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse/opencv*.whl
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/opencv*.whl
Expand Down Expand Up @@ -94,7 +89,7 @@ jobs:
submodules: true
fetch-depth: 0
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
Expand Down Expand Up @@ -124,13 +119,13 @@ jobs:
Release_rolling:
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
needs: [Build, Test]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: opencv-python-rolling-release
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse/
Expand All @@ -154,13 +149,13 @@ jobs:
Pre-release:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [Build, Test]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: test-opencv-python-release
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse/
Expand All @@ -172,13 +167,13 @@ jobs:
Release:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [Build, Test]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment: opencv-python-release
defaults:
run:
shell: bash
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheelhouse/
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/build_wheels_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

jobs:
Build:
runs-on: windows-2019
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -48,10 +48,10 @@ jobs:
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 0
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -61,16 +61,19 @@ jobs:
uses: microsoft/[email protected]
- name: Setup NASM
uses: ilammy/setup-nasm@v1

- name: Build a package
# CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
run: |
set "VISUAL_STUDIO=17"
python --version
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install cmake==3.24.2
python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
shell: cmd

- name: Saving all wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -79,7 +82,7 @@ jobs:

Test:
needs: [Build]
runs-on: windows-2019
runs-on: windows-2025
defaults:
run:
shell: cmd
Expand All @@ -103,10 +106,11 @@ jobs:
rm -rf ./.??* || true
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion opencv
Submodule opencv updated 800 files
2 changes: 1 addition & 1 deletion opencv_contrib
Submodule opencv_contrib updated 81 files
+7 −8 .github/workflows/PR-4.x.yaml
+1 −1 modules/aruco/include/opencv2/aruco/aruco_calib.hpp
+2 −2 modules/bgsegm/tutorials/bgsegm_bg_subtraction/bgsegm_bg_subtraction.markdown
+0 −1 modules/cnn_3dobj/include/opencv2/cnn_3dobj.hpp
+2 −1 modules/cudacodec/include/opencv2/cudacodec.hpp
+4 −4 modules/cudacodec/src/NvEncoder.cpp
+24 −11 modules/cudacodec/src/video_writer.cpp
+5 −13 modules/cudacodec/test/test_video.cpp
+28 −12 modules/cudaimgproc/src/color.cpp
+32 −16 modules/cudaimgproc/src/cuda/debayer.cu
+1 −1 modules/cudalegacy/include/opencv2/cudalegacy/private.hpp
+9 −2 modules/cudev/test/CMakeLists.txt
+0 −1 modules/cvv/src/qtutil/filter/sobelfilterwidget.cpp
+1 −1 modules/dpm/src/dpm_cascade.cpp
+1 −1 modules/dpm/src/dpm_feature.cpp
+0 −1 modules/dpm/src/dpm_feature.hpp
+9 −1 modules/fastcv/include/opencv2/fastcv.hpp
+64 −0 modules/fastcv/include/opencv2/fastcv/allocator.hpp
+58 −1 modules/fastcv/include/opencv2/fastcv/arithm.hpp
+17 −1 modules/fastcv/include/opencv2/fastcv/blur.hpp
+33 −0 modules/fastcv/include/opencv2/fastcv/blur_dsp.hpp
+45 −0 modules/fastcv/include/opencv2/fastcv/channel.hpp
+49 −0 modules/fastcv/include/opencv2/fastcv/dsp_init.hpp
+38 −0 modules/fastcv/include/opencv2/fastcv/edges_dsp.hpp
+49 −0 modules/fastcv/include/opencv2/fastcv/fft_dsp.hpp
+2 −2 modules/fastcv/include/opencv2/fastcv/pyramid.hpp
+34 −0 modules/fastcv/include/opencv2/fastcv/sad_dsp.hpp
+13 −15 modules/fastcv/include/opencv2/fastcv/scale.hpp
+39 −0 modules/fastcv/include/opencv2/fastcv/thresh_dsp.hpp
+11 −12 modules/fastcv/include/opencv2/fastcv/tracking.hpp
+55 −1 modules/fastcv/include/opencv2/fastcv/warp.hpp
+32 −0 modules/fastcv/perf/perf_arithm.cpp
+26 −1 modules/fastcv/perf/perf_blur.cpp
+73 −0 modules/fastcv/perf/perf_blur_dsp.cpp
+56 −0 modules/fastcv/perf/perf_edges_dsp.cpp
+85 −0 modules/fastcv/perf/perf_fft_dsp.cpp
+2 −2 modules/fastcv/perf/perf_hough.cpp
+6 −1 modules/fastcv/perf/perf_main.cpp
+34 −1 modules/fastcv/perf/perf_matmul.cpp
+2 −0 modules/fastcv/perf/perf_precomp.hpp
+52 −0 modules/fastcv/perf/perf_sad_dsp.cpp
+66 −0 modules/fastcv/perf/perf_scale.cpp
+52 −0 modules/fastcv/perf/perf_thresh_dsp.cpp
+196 −22 modules/fastcv/perf/perf_warp.cpp
+105 −0 modules/fastcv/src/allocator.cpp
+173 −1 modules/fastcv/src/arithm.cpp
+22 −1 modules/fastcv/src/blur.cpp
+68 −0 modules/fastcv/src/blur_dsp.cpp
+143 −0 modules/fastcv/src/channel.cpp
+46 −0 modules/fastcv/src/dsp_init.cpp
+63 −0 modules/fastcv/src/edges_dsp.cpp
+96 −0 modules/fastcv/src/fft_dsp.cpp
+110 −2 modules/fastcv/src/precomp.hpp
+46 −0 modules/fastcv/src/sad_dsp.cpp
+48 −35 modules/fastcv/src/scale.cpp
+55 −0 modules/fastcv/src/thresh_dsp.cpp
+280 −36 modules/fastcv/src/warp.cpp
+70 −1 modules/fastcv/test/test_arithm.cpp
+22 −1 modules/fastcv/test/test_blur.cpp
+75 −0 modules/fastcv/test/test_blur_dsp.cpp
+72 −0 modules/fastcv/test/test_channel.cpp
+39 −0 modules/fastcv/test/test_edges_dsp.cpp
+98 −0 modules/fastcv/test/test_fft_dsp.cpp
+6 −1 modules/fastcv/test/test_main.cpp
+3 −3 modules/fastcv/test/test_mser.cpp
+2 −0 modules/fastcv/test/test_precomp.hpp
+6 −5 modules/fastcv/test/test_pyramid.cpp
+44 −0 modules/fastcv/test/test_sad_dsp.cpp
+27 −44 modules/fastcv/test/test_scale.cpp
+92 −0 modules/fastcv/test/test_thresh_dsp.cpp
+167 −27 modules/fastcv/test/test_warp.cpp
+0 −1 modules/img_hash/src/precomp.hpp
+4 −0 modules/matlab/CMakeLists.txt
+8 −2 modules/matlab/generator/parse_tree.py
+30 −2 modules/matlab/include/opencv2/matlab/bridge.hpp
+3 −0 modules/mcc/src/bound_min.cpp
+12 −19 modules/mcc/src/checker_detector.cpp
+2 −1 modules/mcc/src/checker_detector.hpp
+0 −1 modules/xfeatures2d/src/affine_feature2d.cpp
+0 −1 modules/xphoto/samples/dct_image_denoising.cpp
+4 −6 modules/xphoto/src/dct_image_denoising.cpp
2 changes: 1 addition & 1 deletion opencv_extra
Submodule opencv_extra updated 27 files
+ testdata/cv/cvtcolor/bayerVNG_gold.png
+ testdata/cv/cvtcolor_strict/bglena.png
+ testdata/cv/cvtcolor_strict/gblena.png
+ testdata/cv/cvtcolor_strict/grlena.png
+ testdata/cv/cvtcolor_strict/rglena.png
+83 −0 testdata/cv/fast/result_no_nonmax.xml
+256 −256 testdata/cv/hdr/calibrate/debevec.csv
+2,686 −2,637 testdata/cv/hdr/merge/debevec.hdr
+2 −2 testdata/cv/io/3_4/Core_InputOutput--filestorage_base64_basic_rw_JSON.json
+35 −35 testdata/cv/io/3_4/Core_InputOutput--filestorage_base64_basic_rw_XML.xml
+35 −35 testdata/cv/io/3_4/Core_InputOutput--filestorage_base64_basic_rw_YAML.yml
+2 −2 testdata/cv/io/Core_InputOutput--filestorage_base64_basic_read_JSON.json
+35 −35 testdata/cv/io/Core_InputOutput--filestorage_base64_basic_read_XML.xml
+35 −35 testdata/cv/io/Core_InputOutput--filestorage_base64_basic_read_YAML.yml
+5 −0 testdata/dnn/download_models.py
+ testdata/dnn/tflite/face_blendshapes_inp.npy
+ testdata/dnn/tflite/face_blendshapes_out_StatefulPartitionedCall_0.npy
+30 −5 testdata/dnn/tflite/generate.py
+ testdata/dnn/tflite/strided_slice.tflite
+ testdata/dnn/tflite/strided_slice_inp.npy
+ testdata/dnn/tflite/strided_slice_out_Identity.npy
+ testdata/highgui/gifsuite/disposalMethod.gif
+ testdata/highgui/readwrite/033.png
+ testdata/highgui/readwrite/034.png
+ testdata/highgui/readwrite/035.png
+3,684 −0 testdata/perf/core.xml
+57,478 −57,638 testdata/perf/imgproc.xml
18 changes: 12 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,18 @@ def main():
# Raw paths relative to sourcetree root.
files_outside_package_dir = {"cv2": ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]}

ci_cmake_generator = (
["-G", "Visual Studio 14" + (" Win64" if is64 else "")]
if os.name == "nt"
else ["-G", "Unix Makefiles"]
)

if os.name == "nt":
vs_env = os.environ.get("VISUAL_STUDIO")
if vs_env == "17":
generator_name = "Visual Studio 17 2022"
arch = "x64" if is64 else "Win32"
ci_cmake_generator = ["-G", generator_name, "-A", arch]
else:
generator_name = "Visual Studio 14" + (" Win64" if is64 else "")
ci_cmake_generator = ["-G", generator_name]
else:
ci_cmake_generator = ["-G", "Unix Makefiles"]

cmake_args = (
(ci_cmake_generator if is_CI_build else [])
+ [
Expand Down
Loading