Skip to content

Commit 2d2d5ae

Browse files
committed
Merge branch '4.x' into 5.x-merge-4.x
2 parents 8a47bfa + 6a181ce commit 2d2d5ae

20 files changed

+881
-194
lines changed

.github/workflows/build_wheels_linux.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
python-version: ['3.6']
30+
python-version: ['3.9']
3131
platform: [x64]
3232
with_contrib: [0, 1]
3333
without_gui: [0, 1]
@@ -41,7 +41,7 @@ jobs:
4141
MB_ML_VER: 2014
4242
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4343
CONFIG_PATH: travis_config.sh
44-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20220824
44+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20240524
4545
USE_CCACHE: 0
4646
UNICODE_WIDTH: 32
4747
PLAT: x86_64
@@ -84,7 +84,7 @@ jobs:
8484
strategy:
8585
fail-fast: false
8686
matrix:
87-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
87+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
8888
platform: [x64]
8989
with_contrib: [0, 1]
9090
without_gui: [0, 1]
@@ -93,7 +93,7 @@ jobs:
9393
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
9494
MB_PYTHON_VERSION: ${{ matrix.python-version }}
9595
NP_TEST_DEP: numpy==1.19.4
96-
NP_TEST_DEP_LATEST: numpy==1.21.2
96+
NP_TEST_DEP_LATEST: numpy==2.0.0
9797
CONFIG_PATH: travis_config.sh
9898
PLAT: x86_64
9999
steps:
@@ -106,7 +106,7 @@ jobs:
106106
submodules: true
107107
fetch-depth: 0
108108
- name: Setup Environment variables
109-
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
109+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
110110
- name: Download a wheel accordingly to matrix
111111
uses: actions/download-artifact@v3
112112
with:
@@ -139,7 +139,7 @@ jobs:
139139
NP_TEST_DEP: numpy==1.19.4
140140
TRAVIS_BUILD_DIR: ${{ github.workspace }}
141141
CONFIG_PATH: travis_config.sh
142-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20220628
142+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20240524
143143
USE_CCACHE: 1
144144
UNICODE_WIDTH: 32
145145
SDIST: ${{ matrix.build_sdist || 0 }}

.github/workflows/build_wheels_linux_arm.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
python-version: ['3.6']
30+
python-version: ['3.9']
3131
platform: [x64]
3232
with_contrib: [0, 1]
3333
without_gui: [0, 1]
@@ -42,7 +42,7 @@ jobs:
4242
MB_ML_VER: 2014
4343
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4444
CONFIG_PATH: travis_config.sh
45-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20220824
45+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20240524
4646
USE_CCACHE: 0
4747
UNICODE_WIDTH: 32
4848
SDIST: ${{ matrix.build_sdist || 0 }}
@@ -84,7 +84,7 @@ jobs:
8484
strategy:
8585
fail-fast: false
8686
matrix:
87-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
87+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
8888
platform: [x64]
8989
with_contrib: [0, 1]
9090
without_gui: [0, 1]
@@ -94,7 +94,7 @@ jobs:
9494
MB_PYTHON_VERSION: ${{ matrix.python-version }}
9595
PLAT: aarch64
9696
NP_TEST_DEP: numpy==1.19.4
97-
NP_TEST_DEP_LATEST: numpy==1.21.4
97+
NP_TEST_DEP_LATEST: numpy==2.0.0
9898
CONFIG_PATH: travis_config.sh
9999
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
100100
UNICODE_WIDTH: 32
@@ -108,7 +108,7 @@ jobs:
108108
submodules: true
109109
fetch-depth: 0
110110
- name: Setup Environment variables
111-
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
111+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
112112
- name: Download a wheel accordingly to matrix
113113
uses: actions/download-artifact@v3
114114
with:

.github/workflows/build_wheels_macos.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ on:
2020

2121
jobs:
2222
Build:
23-
runs-on: macos-11
23+
runs-on: macos-12
2424
defaults:
2525
run:
2626
shell: bash
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
python-version: ['3.6']
30+
python-version: ['3.9']
3131
platform: [x64]
3232
with_contrib: [0, 1]
3333
without_gui: [0, 1]
@@ -45,11 +45,9 @@ jobs:
4545
USE_CCACHE: 1
4646
UNICODE_WIDTH: 32
4747
PLAT: x86_64
48-
FFMPEG_FORMULA_VERSION: '@4'
4948
SDIST: ${{ matrix.build_sdist || 0 }}
5049
ENABLE_HEADLESS: ${{ matrix.without_gui }}
5150
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
52-
MACOSX_DEPLOYMENT_TARGET: 10.13
5351
steps:
5452
- name: Cleanup
5553
run: find . -mindepth 1 -delete
@@ -59,6 +57,12 @@ jobs:
5957
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
6058
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
6159
fi
60+
# hack for image issue on mac: https://github.com/actions/runner-images/issues/6817
61+
rm /usr/local/bin/2to3*
62+
rm /usr/local/bin/idle3*
63+
rm /usr/local/bin/pydoc3*
64+
rm /usr/local/bin/python3*
65+
# end hack
6266
- name: Checkout
6367
uses: actions/checkout@v3
6468
with:
@@ -94,14 +98,14 @@ jobs:
9498

9599
Test:
96100
needs: [Build]
97-
runs-on: macos-11
101+
runs-on: macos-12
98102
defaults:
99103
run:
100104
shell: bash
101105
strategy:
102106
fail-fast: false
103107
matrix:
104-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
108+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
105109
platform: [x64]
106110
with_contrib: [0, 1]
107111
without_gui: [0, 1]
@@ -110,7 +114,7 @@ jobs:
110114
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
111115
MB_PYTHON_VERSION: ${{ matrix.python-version }}
112116
NP_TEST_DEP: numpy==1.19.4
113-
NP_TEST_DEP_LATEST: numpy==1.21.4
117+
NP_TEST_DEP_LATEST: numpy==2.0.0
114118
CONFIG_PATH: travis_config.sh
115119
PLAT: x86_64
116120
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
@@ -130,7 +134,7 @@ jobs:
130134
python-version: ${{ matrix.python-version }}
131135
architecture: ${{ matrix.platform }}
132136
- name: Setup Environment variables
133-
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
137+
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
134138
- name: Download a wheel accordingly to matrix
135139
uses: actions/download-artifact@v3
136140
with:
@@ -147,7 +151,7 @@ jobs:
147151
python modules/python/test/test.py -v --repo .
148152
- name: Pylint test
149153
run: |
150-
python -m pip install pylint==2.12.2
154+
python -m pip install pylint==2.15.9
151155
cd ${{ github.workspace }}/tests
152156
python -m pylint $PYLINT_TEST_FILE
153157

.github/workflows/build_wheels_macos_m1.yml

+20-10
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ on:
2020

2121
jobs:
2222
Build:
23-
runs-on: opencv-cn-mac-arm64
23+
runs-on: python-macos11-m1
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
python-version: ['3.7']
27+
python-version: ['3.9']
2828
platform: [x64]
2929
with_contrib: [0, 1]
3030
without_gui: [0, 1]
@@ -34,6 +34,7 @@ jobs:
3434
SDIST: ${{ matrix.build_sdist || 0 }}
3535
ENABLE_HEADLESS: ${{ matrix.without_gui }}
3636
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
37+
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
3738
steps:
3839
- name: Cleanup
3940
run: find . -mindepth 1 -delete
@@ -54,8 +55,8 @@ jobs:
5455
echo $ENABLE_CONTRIB > contrib.enabled
5556
echo $ENABLE_HEADLESS > headless.enabled
5657
export MACOSX_DEPLOYMENT_TARGET=11.0
57-
arch -arm64 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
58-
arch -arm64 python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
58+
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
59+
python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
5960
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
6061
- name: Saving all wheels
6162
uses: actions/upload-artifact@v3
@@ -74,14 +75,15 @@ jobs:
7475
strategy:
7576
fail-fast: false
7677
matrix:
77-
python-version: ['3.7', '3.8', '3.9', '3.10']
78+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
7879
platform: [x64]
7980
with_contrib: [0, 1]
8081
without_gui: [0, 1]
8182
build_sdist: [0]
8283
env:
8384
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
8485
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
86+
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
8587
steps:
8688
- name: Cleanup
8789
run: find . -mindepth 1 -delete
@@ -96,20 +98,28 @@ jobs:
9698
with:
9799
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
98100
path: wheelhouse/
101+
- name: Create Venv for test
102+
run: |
103+
test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test"
104+
python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test
99105
- name: Package installation
100106
run: |
101-
arch -arm64 python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl
107+
source ${{ github.workspace }}/opencv_test/bin/activate
108+
python${{ matrix.python-version }} -m pip install --upgrade pip
109+
python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
102110
cd ${{ github.workspace }}/tests
103-
arch -arm64 python${{ matrix.python-version }} get_build_info.py
111+
python${{ matrix.python-version }} get_build_info.py
104112
- name: Run tests
105113
run: |
114+
source ${{ github.workspace }}/opencv_test/bin/activate
106115
cd ${{ github.workspace }}/opencv
107-
arch -arm64 python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
116+
python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
108117
- name: Pylint test
109118
run: |
110-
arch -arm64 python${{ matrix.python-version }} -m pip install pylint==2.12.2
119+
source ${{ github.workspace }}/opencv_test/bin/activate
120+
python${{ matrix.python-version }} -m pip install pylint==2.15.9
111121
cd ${{ github.workspace }}/tests
112-
arch -arm64 python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
122+
python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
113123
114124
Release_rolling:
115125
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}

.github/workflows/build_wheels_windows.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python-version: ['3.6']
26+
python-version: ['3.9']
2727
platform: [x86, x64]
2828
with_contrib: [0, 1]
2929
without_gui: [0, 1]
@@ -60,12 +60,14 @@ jobs:
6060
- name: Setup MSBuild.exe
6161
uses: microsoft/setup-msbuild@v1.1
6262
- name: Build a package
63+
# CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
6364
run: |
6465
python --version
6566
python -m pip install --upgrade pip
6667
python -m pip install --upgrade setuptools
68+
python -m pip install cmake==3.24.2
6769
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
68-
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp36 --dist-dir=%cd%\wheelhouse -v
70+
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
6971
shell: cmd
7072
- name: Saving all wheels
7173
uses: actions/upload-artifact@v3
@@ -87,7 +89,7 @@ jobs:
8789
strategy:
8890
fail-fast: false
8991
matrix:
90-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
92+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
9193
platform: [x86, x64]
9294
with_contrib: [0, 1]
9395
without_gui: [0, 1]
@@ -131,7 +133,7 @@ jobs:
131133
python modules\python\test\test.py -v --repo .
132134
- name: Pylint test
133135
run: |
134-
python -m pip install pylint==2.12.2
136+
python -m pip install pylint==2.15.9
135137
cd ${{ github.workspace }}\tests
136138
python -m pylint $PYLINT_TEST_FILE
137139

0 commit comments

Comments
 (0)