From 1b83553e1dc846f5df7b882ff5718f9774137e15 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 11 Jun 2025 20:21:09 +0300 Subject: [PATCH 1/5] Base image update from ubuntu 20.04 to 22.04. --- .github/workflows/build_wheels_linux.yml | 12 ++++++------ .github/workflows/build_wheels_linux_arm.yml | 6 +++--- .github/workflows/build_wheels_macos.yml | 6 +++--- .github/workflows/build_wheels_macos_m1.yml | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 7bfe8cec..883b3378 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -20,7 +20,7 @@ on: jobs: Build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: shell: bash @@ -77,7 +77,7 @@ jobs: Test: needs: [Build] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: shell: bash @@ -116,7 +116,7 @@ jobs: run: source scripts/install.sh Build_sdist: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 defaults: run: shell: bash @@ -185,7 +185,7 @@ 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: @@ -215,7 +215,7 @@ 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: @@ -233,7 +233,7 @@ 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: diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index d643ba8e..78c1eefb 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -120,7 +120,7 @@ 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: @@ -150,7 +150,7 @@ 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: @@ -168,7 +168,7 @@ 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: diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index eb797d46..9aa4fada 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -158,7 +158,7 @@ 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: @@ -188,7 +188,7 @@ 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: @@ -206,7 +206,7 @@ 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: diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index ffbdc752..675089ab 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -124,7 +124,7 @@ 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: @@ -154,7 +154,7 @@ 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: @@ -172,7 +172,7 @@ 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: From bd664dc21e6c38b05e2eacc849deed315cb807ea Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Wed, 11 Jun 2025 20:25:11 +0300 Subject: [PATCH 2/5] Update dependencies. --- .github/workflows/build_wheels_linux.yml | 6 +++--- .github/workflows/build_wheels_linux_arm.yml | 4 ++-- .github/workflows/build_wheels_macos.yml | 4 ++-- .github/workflows/build_wheels_macos_m1.yml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 883b3378..c3745ec8 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -65,12 +65,12 @@ jobs: - name: Build a package run: source scripts/build.sh - name: Saving all wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 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 @@ -177,7 +177,7 @@ 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 path: dist/opencv*.tar.gz diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 78c1eefb..947a63de 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -65,12 +65,12 @@ jobs: - name: Build a package run: source scripts/build.sh - name: Saving all wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 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 diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 9aa4fada..48ce1f9d 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -86,12 +86,12 @@ jobs: set -x build_wheel $REPO_DIR $PLAT - name: Saving all wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 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 diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 675089ab..b13611ab 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -59,12 +59,12 @@ jobs: 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 + uses: actions/upload-artifact@v4 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 From b820074b9d610a5ec5ca065b9cf0e91a743be954 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 12 Jun 2025 12:25:20 +0300 Subject: [PATCH 3/5] Removed double artifacts upload. --- .github/workflows/build_wheels_linux.yml | 5 ----- .github/workflows/build_wheels_linux_arm.yml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index c3745ec8..187b7361 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -64,11 +64,6 @@ jobs: fetch-depth: 0 - name: Build a package run: source scripts/build.sh - - name: Saving all wheels - uses: actions/upload-artifact@v4 - with: - name: wheels - path: wheelhouse/opencv*.whl - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 947a63de..01173395 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -64,11 +64,6 @@ jobs: fetch-depth: 0 - name: Build a package run: source scripts/build.sh - - name: Saving all wheels - uses: actions/upload-artifact@v4 - with: - name: wheels - path: wheelhouse/opencv*.whl - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v4 with: From 48fd2bbbb92f41e4c42d47344e2216b94244c2a2 Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 12 Jun 2025 12:55:21 +0300 Subject: [PATCH 4/5] Use fresh download step. --- .github/workflows/build_wheels_linux.yml | 10 +++++----- .github/workflows/build_wheels_linux_arm.yml | 8 ++++---- .github/workflows/build_wheels_macos.yml | 8 ++++---- .github/workflows/build_wheels_macos_m1.yml | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_wheels_linux.yml b/.github/workflows/build_wheels_linux.yml index 187b7361..e32d6ae0 100644 --- a/.github/workflows/build_wheels_linux.yml +++ b/.github/workflows/build_wheels_linux.yml @@ -103,7 +103,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/ @@ -174,7 +174,7 @@ jobs: - name: saving artifacts 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: @@ -186,7 +186,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -216,7 +216,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -234,7 +234,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ diff --git a/.github/workflows/build_wheels_linux_arm.yml b/.github/workflows/build_wheels_linux_arm.yml index 01173395..4c60bb76 100644 --- a/.github/workflows/build_wheels_linux_arm.yml +++ b/.github/workflows/build_wheels_linux_arm.yml @@ -105,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/ @@ -121,7 +121,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -151,7 +151,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -169,7 +169,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 48ce1f9d..50ec88c1 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -136,7 +136,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/ @@ -164,7 +164,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -194,7 +194,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -212,7 +212,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index b13611ab..1cdcd12b 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -94,7 +94,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/ @@ -130,7 +130,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -160,7 +160,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ @@ -178,7 +178,7 @@ jobs: run: shell: bash steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: wheels path: wheelhouse/ From ed0a37741f08d0a49e6baad0ed6648e3663c4fef Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov Date: Thu, 12 Jun 2025 15:59:01 +0300 Subject: [PATCH 5/5] Deduplicate wheels upload on Mac too. --- .github/workflows/build_wheels_macos.yml | 5 ----- .github/workflows/build_wheels_macos_m1.yml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml index 50ec88c1..a1cad49e 100644 --- a/.github/workflows/build_wheels_macos.yml +++ b/.github/workflows/build_wheels_macos.yml @@ -85,11 +85,6 @@ jobs: echo $ENABLE_HEADLESS > headless.enabled set -x build_wheel $REPO_DIR $PLAT - - name: Saving all wheels - uses: actions/upload-artifact@v4 - with: - name: wheels - path: wheelhouse/opencv*.whl - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build_wheels_macos_m1.yml b/.github/workflows/build_wheels_macos_m1.yml index 1cdcd12b..1e62c858 100644 --- a/.github/workflows/build_wheels_macos_m1.yml +++ b/.github/workflows/build_wheels_macos_m1.yml @@ -58,11 +58,6 @@ 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@v4 - with: - name: wheels - path: wheelhouse/opencv*.whl - name: Saving a wheel accordingly to matrix uses: actions/upload-artifact@v4 with: