Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
51 changes: 28 additions & 23 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: macOS x86_64
name: MacOS

on:
pull_request:
Expand All @@ -8,7 +8,6 @@ on:
paths-ignore:
- '.github/workflows/build_wheels_manylinux*'
- '.github/workflows/build_wheels_windows*'
- '.github/workflows/build_wheels_macos_m1.yml'
release:
types: [published, edited]
schedule:
Expand All @@ -18,12 +17,12 @@ on:

jobs:
Build:
runs-on: python-macos-intel
runs-on: ${{ matrix.platform == 'arm64' && 'macos-15' || 'macos-15-intel' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
platform: [x64]
python-version: ['3.10']
platform: [x86_64, arm64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
Expand All @@ -40,12 +39,15 @@ jobs:
CONFIG_PATH: travis_config.sh
USE_CCACHE: 1
UNICODE_WIDTH: 32
PLAT: x86_64
PLAT: ${{ matrix.platform }}
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
steps:
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
Expand All @@ -65,37 +67,39 @@ jobs:
echo $ENABLE_CONTRIB > contrib.enabled
echo $ENABLE_HEADLESS > headless.enabled
export MACOSX_DEPLOYMENT_TARGET=14.0
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
python --version
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
python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v7
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
name: wheel-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/opencv*.whl

Test:
needs: [Build]
runs-on: python-macos-intel
runs-on: ${{ matrix.platform == 'arm64' && 'macos-15' || 'macos-15-intel' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
platform: [x64]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
platform: [x86_64, arm64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==2.2.6
CONFIG_PATH: travis_config.sh
PLAT: x86_64
PLAT: ${{ matrix.platform }}
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
PIP_INDEX_URL: https://pypi.tuna.tsinghua.edu.cn/simple
steps:
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
Expand All @@ -107,30 +111,31 @@ jobs:
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v8
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
name: wheel-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Create Venv for test
run: |
test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test"
python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test
python -m venv ${{ github.workspace }}/opencv_test
- name: Package installation
run: |
source ${{ github.workspace }}/opencv_test/bin/activate
python${{ matrix.python-version }} -m pip install --upgrade pip
python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
python --version
python -m pip install --upgrade pip
python -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
cd ${{ github.workspace }}/tests
python${{ matrix.python-version }} get_build_info.py
python get_build_info.py
- name: Run tests
run: |
source ${{ github.workspace }}/opencv_test/bin/activate
cd ${{ github.workspace }}/opencv
python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
python modules/python/test/test.py -v --repo .
- name: Pylint test
run: |
source ${{ github.workspace }}/opencv_test/bin/activate
python${{ matrix.python-version }} -m pip install pylint==2.15.9
python -m pip install pylint==2.15.9
cd ${{ github.workspace }}/tests
python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
python -m pylint $PYLINT_TEST_FILE

Release_rolling:
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
Expand Down
192 changes: 0 additions & 192 deletions .github/workflows/build_wheels_macos_m1.yml

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/build_wheels_manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

jobs:
Build:
runs-on: ${{ matrix.platform == 'aarch64' && 'opencv-cn-lin-arm64' || 'ubuntu-22.04' }}
runs-on: ${{ matrix.platform == 'aarch64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
Expand All @@ -33,16 +33,16 @@ jobs:
include:
- platform: aarch64
manylinux: 2014
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20260725
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20261110
- platform: x86_64
manylinux: 2014
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20260725
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20261110
- platform: x86_64
manylinux: 2_28
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-x86-64:20260725
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-x86-64:20261110
- platform: aarch64
manylinux: 2_28
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-aarch64:20260725
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux_2_28-aarch64:20261110

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:

Test:
needs: [Build]
runs-on: ${{ matrix.platform == 'aarch64' && 'opencv-cn-lin-arm64' || 'ubuntu-22.04' }}
runs-on: ${{ matrix.platform == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-22.04' }}
defaults:
run:
shell: bash
Expand Down Expand Up @@ -165,7 +165,7 @@ jobs:
NP_TEST_DEP: numpy==1.19.4
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20260102
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20261110
USE_CCACHE: 1
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand Down
Loading
Loading