Skip to content

Update 3.4 branch after commits in master #593

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 4 commits into from
Dec 16, 2021
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
79 changes: 56 additions & 23 deletions .github/workflows/build_wheels_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.6']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -37,13 +37,12 @@ jobs:
MB_PYTHON_VERSION: ${{ matrix.python-version }}
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
MB_ML_VER: 2014
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.2
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
PLAT: x86_64
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
Expand All @@ -59,25 +58,64 @@ jobs:
if: github.event_name == 'pull_request'
run: git submodule update --remote

- name: Setup Environment variables
run: |
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
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

- name: build
- name: Build a package
run: source scripts/build.sh

- name: install and test
run: source scripts/install.sh

- name: saving artifacts
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl

- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/opencv*.whl

test:
needs: [build]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
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==1.21.2
CONFIG_PATH: travis_config.sh
PLAT: x86_64

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0

- name: Setup Environment variables
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

- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
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: ${{ matrix.os }}
Expand Down Expand Up @@ -131,12 +169,7 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}

- name: Setup Environment variables
run: |
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi

- name: before install
- name: Build a package
run: |
set -e
# Build and package
Expand All @@ -157,7 +190,7 @@ jobs:

test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build, build_sdist]
needs: [build, build_sdist, test]
runs-on: ubuntu-latest
environment: test-opencv-python-release
defaults:
Expand All @@ -176,7 +209,7 @@ jobs:

release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build, build_sdist]
needs: [build, build_sdist, test]
runs-on: ubuntu-latest
environment: opencv-python-release
defaults:
Expand Down
77 changes: 61 additions & 16 deletions .github/workflows/build_wheels_linux_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [ARM64]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.6']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -38,12 +38,9 @@ jobs:
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
PLAT: aarch64
MB_ML_VER: 2014
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.2
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
USE_CCACHE: 0
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
Expand All @@ -61,26 +58,74 @@ jobs:
submodules: false
fetch-depth: 0

- name: Setup Environment variables
run: |
if [ "ARM64" == "${{ matrix.os }}" ]; then echo "PLAT=aarch64" >> $GITHUB_ENV; fi
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

- name: build
- name: Build a package
run: source scripts/build.sh

- name: install and test
run: source scripts/install.sh

- name: saving artifacts
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl

- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/opencv*.whl

test:
needs: [build_arm]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

strategy:
fail-fast: false
matrix:
os: [ARM64]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
PLAT: aarch64
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.4
CONFIG_PATH: travis_config.sh
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
UNICODE_WIDTH: 32

steps:
- name: Cleanup
if: always()
uses: AutoModality/action-clean@v1

- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0

- name: Setup Environment variables
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

- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
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

test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build_arm]
needs: [build_arm, test]
runs-on: ubuntu-latest
environment: test-opencv-python-release
defaults:
Expand All @@ -99,7 +144,7 @@ jobs:

release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build_arm]
needs: [build_arm, test]
runs-on: ubuntu-latest
environment: opencv-python-release
defaults:
Expand Down
100 changes: 82 additions & 18 deletions .github/workflows/build_wheels_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-10.15, macos-11]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.6']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
Expand All @@ -48,14 +48,13 @@ jobs:
MB_PYTHON_VERSION: ${{ matrix.python-version }}
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
MB_ML_VER: 2014
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.2
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_OS_NAME: osx
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
USE_CCACHE: 1
UNICODE_WIDTH: 32
PLAT: x86_64
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
Expand All @@ -71,15 +70,7 @@ jobs:
if: github.event_name == 'pull_request'
run: git submodule update --remote

- name: Setup Environment variables
run: |
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
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

- name: before install
- name: Build a package
run: |
set -e
# Check out and prepare the source
Expand All @@ -96,19 +87,92 @@ jobs:
echo $ENABLE_HEADLESS > headless.enabled
set -x
build_wheel $REPO_DIR $PLAT
git submodule update --init --recursive
install_run $PLAT
set +x

- name: saving artifacts
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl

- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/opencv*.whl

test:
needs: [build]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
exclude:
- os: macos-10.15
python-version: '3.10'
- os: macos-11
python-version: '3.6'
- os: macos-11
python-version: '3.7'
- os: macos-11
python-version: '3.8'
- os: macos-11
python-version: '3.9'

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
NP_TEST_DEP: numpy==1.19.4
NP_TEST_DEP_LATEST: numpy==1.21.4
CONFIG_PATH: travis_config.sh
PLAT: x86_64
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}

- name: Setup Environment variables
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

- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/

- name: Package installation
run: |
python -m pip install wheelhouse/opencv*.whl
cd ${{ github.workspace }}/tests
python get_build_info.py

- name: Run tests
run: |
cd ${{ github.workspace }}/opencv
python modules/python/test/test.py -v --repo .

test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build]
needs: [build, test]
runs-on: ubuntu-latest
environment: test-opencv-python-release
defaults:
Expand All @@ -127,7 +191,7 @@ jobs:

release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build]
needs: [build, test]
runs-on: ubuntu-latest
environment: opencv-python-release
defaults:
Expand Down
Loading