Skip to content

Commit c9cce3d

Browse files
authored
Merge branch 'opencv:4.x' into woa_support
2 parents 33c209c + 597ce8e commit c9cce3d

15 files changed

Lines changed: 198 additions & 95 deletions

‎.github/workflows/build_wheels_macos.yml‎

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ on:
1818

1919
jobs:
2020
Build:
21-
runs-on: python-macos-intel
21+
runs-on: macos-15-intel
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python-version: ['3.9']
25+
python-version: ['3.10']
2626
platform: [x64]
2727
with_contrib: [0, 1]
2828
without_gui: [0, 1]
@@ -46,6 +46,9 @@ jobs:
4646
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
4747
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
4848
steps:
49+
- uses: actions/setup-python@v7
50+
with:
51+
python-version: ${{ matrix.python-version }}
4952
- name: Cleanup
5053
run: find . -mindepth 1 -delete
5154
working-directory: ${{ github.workspace }}
@@ -55,7 +58,7 @@ jobs:
5558
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
5659
fi
5760
- name: Checkout
58-
uses: actions/checkout@v3
61+
uses: actions/checkout@v7
5962
with:
6063
submodules: false
6164
fetch-depth: 0
@@ -65,72 +68,75 @@ jobs:
6568
echo $ENABLE_CONTRIB > contrib.enabled
6669
echo $ENABLE_HEADLESS > headless.enabled
6770
export MACOSX_DEPLOYMENT_TARGET=14.0
68-
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
69-
python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
71+
python --version
72+
python -m pip install delocate toml && python -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | python -m pip install -r /dev/stdin
73+
python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
7074
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
7175
- name: Saving a wheel accordingly to matrix
72-
uses: actions/upload-artifact@v4
76+
uses: actions/upload-artifact@v7
7377
with:
7478
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
7579
path: wheelhouse/opencv*.whl
7680

7781
Test:
7882
needs: [Build]
79-
runs-on: python-macos-intel
83+
runs-on: macos-15-intel
8084
strategy:
8185
fail-fast: false
8286
matrix:
83-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
87+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
8488
platform: [x64]
8589
with_contrib: [0, 1]
8690
without_gui: [0, 1]
8791
build_sdist: [0]
8892
env:
8993
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
9094
MB_PYTHON_VERSION: ${{ matrix.python-version }}
91-
NP_TEST_DEP: numpy==1.19.4
92-
NP_TEST_DEP_LATEST: numpy==2.2.6
9395
CONFIG_PATH: travis_config.sh
9496
PLAT: x86_64
9597
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
9698
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
9799
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
98100
steps:
101+
- uses: actions/setup-python@v7
102+
with:
103+
python-version: ${{ matrix.python-version }}
99104
- name: Cleanup
100105
run: find . -mindepth 1 -delete
101106
working-directory: ${{ github.workspace }}
102107
- name: Checkout
103-
uses: actions/checkout@v3
108+
uses: actions/checkout@v7
104109
with:
105110
submodules: true
106111
fetch-depth: 0
107112
- name: Download a wheel accordingly to matrix
108-
uses: actions/download-artifact@v4
113+
uses: actions/download-artifact@v8
109114
with:
110115
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
111116
path: wheelhouse/
112117
- name: Create Venv for test
113118
run: |
114119
test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test"
115-
python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test
120+
python -m venv ${{ github.workspace }}/opencv_test
116121
- name: Package installation
117122
run: |
118123
source ${{ github.workspace }}/opencv_test/bin/activate
119-
python${{ matrix.python-version }} -m pip install --upgrade pip
120-
python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
124+
python --version
125+
python -m pip install --upgrade pip
126+
python -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
121127
cd ${{ github.workspace }}/tests
122-
python${{ matrix.python-version }} get_build_info.py
128+
python get_build_info.py
123129
- name: Run tests
124130
run: |
125131
source ${{ github.workspace }}/opencv_test/bin/activate
126132
cd ${{ github.workspace }}/opencv
127-
python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
133+
python modules/python/test/test.py -v --repo .
128134
- name: Pylint test
129135
run: |
130136
source ${{ github.workspace }}/opencv_test/bin/activate
131-
python${{ matrix.python-version }} -m pip install pylint==2.15.9
137+
python -m pip install pylint==2.15.9
132138
cd ${{ github.workspace }}/tests
133-
python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
139+
python -m pylint $PYLINT_TEST_FILE
134140
135141
Release_rolling:
136142
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -141,7 +147,7 @@ jobs:
141147
run:
142148
shell: bash
143149
steps:
144-
- uses: actions/download-artifact@v4
150+
- uses: actions/download-artifact@v8
145151
with:
146152
name: wheels
147153
path: wheelhouse/
@@ -171,7 +177,7 @@ jobs:
171177
run:
172178
shell: bash
173179
steps:
174-
- uses: actions/download-artifact@v4
180+
- uses: actions/download-artifact@v8
175181
with:
176182
path: wheelhouse/
177183
- name: Upload all wheels
@@ -189,7 +195,7 @@ jobs:
189195
run:
190196
shell: bash
191197
steps:
192-
- uses: actions/download-artifact@v4
198+
- uses: actions/download-artifact@v8
193199
with:
194200
path: wheelhouse/
195201
- name: Upload wheels for opencv_python

‎.github/workflows/build_wheels_macos_m1.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
4444
fi
4545
- name: Checkout
46-
uses: actions/checkout@v3
46+
uses: actions/checkout@v7
4747
with:
4848
submodules: false
4949
fetch-depth: 0
@@ -57,7 +57,7 @@ jobs:
5757
python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
5858
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
5959
- name: Saving a wheel accordingly to matrix
60-
uses: actions/upload-artifact@v4
60+
uses: actions/upload-artifact@v7
6161
with:
6262
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
6363
path: wheelhouse/opencv*.whl
@@ -82,12 +82,12 @@ jobs:
8282
run: find . -mindepth 1 -delete
8383
working-directory: ${{ github.workspace }}
8484
- name: Checkout
85-
uses: actions/checkout@v3
85+
uses: actions/checkout@v7
8686
with:
8787
submodules: true
8888
fetch-depth: 0
8989
- name: Download a wheel accordingly to matrix
90-
uses: actions/download-artifact@v4
90+
uses: actions/download-artifact@v8
9191
with:
9292
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
9393
path: wheelhouse/
@@ -123,7 +123,7 @@ jobs:
123123
run:
124124
shell: bash
125125
steps:
126-
- uses: actions/download-artifact@v4
126+
- uses: actions/download-artifact@v8
127127
with:
128128
name: wheels
129129
path: wheelhouse/
@@ -153,7 +153,7 @@ jobs:
153153
run:
154154
shell: bash
155155
steps:
156-
- uses: actions/download-artifact@v4
156+
- uses: actions/download-artifact@v8
157157
with:
158158
path: wheelhouse/
159159
- name: Upload all wheels
@@ -171,7 +171,7 @@ jobs:
171171
run:
172172
shell: bash
173173
steps:
174-
- uses: actions/download-artifact@v4
174+
- uses: actions/download-artifact@v8
175175
with:
176176
path: wheelhouse/
177177
- name: Upload wheels for opencv_python

‎.github/workflows/build_wheels_manylinux.yml‎

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
jobs:
1919
Build:
20-
runs-on: ${{ matrix.platform == 'aarch64' && 'opencv-cn-lin-arm64' || 'ubuntu-22.04' }}
20+
runs-on: ${{ matrix.platform == 'aarch64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
2121
defaults:
2222
run:
2323
shell: bash
@@ -33,16 +33,16 @@ jobs:
3333
include:
3434
- platform: aarch64
3535
manylinux: 2014
36-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20260531
36+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20260901
3737
- platform: x86_64
3838
manylinux: 2014
39-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20260531
39+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20260725
4040
- platform: x86_64
4141
manylinux: 2_28
42-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-x86-64:20260531
42+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-x86-64:20260725
4343
- platform: aarch64
4444
manylinux: 2_28
45-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-aarch64:20260531
45+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-aarch64:20260901
4646

4747
env:
4848
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
@@ -71,22 +71,22 @@ jobs:
7171
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
7272
fi
7373
- name: Checkout
74-
uses: actions/checkout@v3
74+
uses: actions/checkout@v7
7575
with:
7676
submodules: false
7777
fetch-depth: 0
7878

7979
- name: Build a package
8080
run: source scripts/build.sh
8181
- name: Saving a wheel accordingly to matrix
82-
uses: actions/upload-artifact@v4
82+
uses: actions/upload-artifact@v7
8383
with:
8484
name: wheel-${{ matrix.platform }}-${{ matrix.manylinux }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
8585
path: wheelhouse/opencv*.whl
8686

8787
Test:
8888
needs: [Build]
89-
runs-on: ${{ matrix.platform == 'aarch64' && 'opencv-cn-lin-arm64' || 'ubuntu-22.04' }}
89+
runs-on: ${{ matrix.platform == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-22.04' }}
9090
defaults:
9191
run:
9292
shell: bash
@@ -103,8 +103,9 @@ jobs:
103103
env:
104104
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
105105
MB_PYTHON_VERSION: ${{ matrix.python-version }}
106-
NP_TEST_DEP: numpy==1.19.4
107-
NP_TEST_DEP_LATEST: numpy==2.2.6
106+
NP_TEST_DEP_OLD: numpy==1.19.4
107+
NP_TEST_DEP: numpy==2.2.6
108+
NP_TEST_DEP_LATEST: numpy==2.5.0
108109
CONFIG_PATH: travis_config.sh
109110
PLAT: ${{ matrix.platform }}
110111
SDIST: ${{ matrix.build_sdist || 0 }}
@@ -116,15 +117,24 @@ jobs:
116117
run: find . -mindepth 1 -delete
117118
working-directory: ${{ github.workspace }}
118119
- name: Checkout
119-
uses: actions/checkout@v3
120+
uses: actions/checkout@v7
120121
with:
121122
submodules: true
122123
fetch-depth: 0
123124

124125
- name: Setup Environment variables
125-
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ matrix.python-version }}" -o "3.14" == "${{ 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
126+
run: |
127+
if [ "3.8" == "${{ matrix.python-version }}" -o "3.9" == "${{ matrix.python-version }}" ]
128+
then
129+
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_OLD)" >> $GITHUB_ENV
130+
elif [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ matrix.python-version }}" ]
131+
then
132+
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV
133+
else
134+
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV
135+
fi
126136
- name: Download a wheel accordingly to matrix
127-
uses: actions/download-artifact@v4
137+
uses: actions/download-artifact@v8
128138
with:
129139
name: wheel-${{ matrix.platform }}-${{ matrix.manylinux }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
130140
path: wheelhouse/
@@ -171,7 +181,7 @@ jobs:
171181
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
172182
fi
173183
- name: Checkout
174-
uses: actions/checkout@v3
184+
uses: actions/checkout@v7
175185
with:
176186
submodules: false
177187
fetch-depth: 0
@@ -193,7 +203,7 @@ jobs:
193203
set -x
194204
echo "skipping tests because of sdist"
195205
- name: saving artifacts
196-
uses: actions/upload-artifact@v4
206+
uses: actions/upload-artifact@v7
197207
with:
198208
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
199209
path: dist/opencv*.tar.gz
@@ -207,7 +217,7 @@ jobs:
207217
run:
208218
shell: bash
209219
steps:
210-
- uses: actions/download-artifact@v4
220+
- uses: actions/download-artifact@v8
211221
with:
212222
path: wheelhouse/
213223

@@ -237,7 +247,7 @@ jobs:
237247
run:
238248
shell: bash
239249
steps:
240-
- uses: actions/download-artifact@v4
250+
- uses: actions/download-artifact@v8
241251
with:
242252
path: wheelhouse/
243253

@@ -256,22 +266,22 @@ jobs:
256266
run:
257267
shell: bash
258268
steps:
259-
- uses: actions/download-artifact@v4
269+
- uses: actions/download-artifact@v8
260270
with:
261271
path: wheelhouse/
262272
- name: Upload wheels for opencv_python
263273
run: |
264274
python -m pip install twine
265-
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_python-* wheelhouse/wheel-*/opencv-python-[^h]*
275+
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-* wheelhouse/opencv-python-[^h]*
266276
- name: Upload wheels for opencv_contrib_python
267277
run: |
268278
python -m pip install twine
269-
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_contrib_python-* wheelhouse/wheel-*/opencv-contrib-python-[^h]*
279+
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-* wheelhouse/opencv-contrib-python-[^h]*
270280
- name: Upload wheels for opencv_python_headless
271281
run: |
272282
python -m pip install twine
273-
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_python_headless-* wheelhouse/wheel-*/opencv-python-headless-*
283+
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-* wheelhouse/opencv-python-headless-*
274284
- name: Upload wheels for opencv_contrib_python_headless
275285
run: |
276286
python -m pip install twine
277-
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/wheel-*/opencv_contrib_python_headless-* wheelhouse/wheel-*/opencv-contrib-python-headless-*
287+
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python_headless-* wheelhouse/opencv-contrib-python-headless-*

0 commit comments

Comments
 (0)