Skip to content

Linux and Mac builds update #1106

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

Merged
merged 5 commits into from
Jun 13, 2025
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
31 changes: 13 additions & 18 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

jobs:
Build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
Expand Down Expand Up @@ -64,20 +64,15 @@ jobs:
fetch-depth: 0
- name: Build a package
run: source scripts/build.sh
- 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

Test:
needs: [Build]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
Expand Down Expand Up @@ -108,15 +103,15 @@ jobs:
- name: Setup Environment variables
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 }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- 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/
- name: Package installation and run tests
run: source scripts/install.sh

Build_sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
Expand Down Expand Up @@ -177,21 +172,21 @@ jobs:
set -x
echo "skipping tests because of sdist"
- name: saving artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: dist/opencv*.tar.gz

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 @@ -215,13 +210,13 @@ jobs:
Pre-release:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [Build, Build_sdist, 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 @@ -233,13 +228,13 @@ jobs:
Release:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [Build, Build_sdist, 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
21 changes: 8 additions & 13 deletions .github/workflows/build_wheels_linux_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,8 @@ jobs:
fetch-depth: 0
- name: Build a package
run: source scripts/build.sh
- 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 @@ -110,7 +105,7 @@ jobs:
- name: Setup Environment variables
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 }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- 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 All @@ -120,13 +115,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 @@ -150,13 +145,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 @@ -168,13 +163,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
21 changes: 8 additions & 13 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,8 @@ jobs:
echo $ENABLE_HEADLESS > headless.enabled
set -x
build_wheel $REPO_DIR $PLAT
- 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 @@ -136,7 +131,7 @@ jobs:
- name: Setup Environment variables
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 }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- 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 All @@ -158,13 +153,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 @@ -188,13 +183,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 @@ -206,13 +201,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
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
Loading