Skip to content

Commit b5d6a85

Browse files
authored
Merge pull request #593 from asenyaev/asen/new_update_3.4_branch
Update 3.4 branch after commits in master
2 parents 824a3b2 + dfc63bf commit b5d6a85

8 files changed

+328
-316
lines changed

.github/workflows/build_wheels_linux.yml

+56-23
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os: [ubuntu-latest]
26-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
26+
python-version: ['3.6']
2727
platform: [x64]
2828
with_contrib: [0, 1]
2929
without_gui: [0, 1]
@@ -37,13 +37,12 @@ jobs:
3737
MB_PYTHON_VERSION: ${{ matrix.python-version }}
3838
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
3939
MB_ML_VER: 2014
40-
NP_TEST_DEP: numpy==1.19.4
41-
NP_TEST_DEP_LATEST: numpy==1.21.2
4240
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4341
CONFIG_PATH: travis_config.sh
4442
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
4543
USE_CCACHE: 1
4644
UNICODE_WIDTH: 32
45+
PLAT: x86_64
4746
SDIST: ${{ matrix.build_sdist || 0 }}
4847
ENABLE_HEADLESS: ${{ matrix.without_gui }}
4948
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
@@ -59,25 +58,64 @@ jobs:
5958
if: github.event_name == 'pull_request'
6059
run: git submodule update --remote
6160

62-
- name: Setup Environment variables
63-
run: |
64-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
65-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
66-
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
67-
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
68-
69-
- name: build
61+
- name: Build a package
7062
run: source scripts/build.sh
7163

72-
- name: install and test
73-
run: source scripts/install.sh
74-
75-
- name: saving artifacts
64+
- name: Saving all wheels
7665
uses: actions/upload-artifact@v2
7766
with:
7867
name: wheels
7968
path: wheelhouse/opencv*.whl
8069

70+
- name: Saving a wheel accordingly to matrix
71+
uses: actions/upload-artifact@v2
72+
with:
73+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
74+
path: wheelhouse/opencv*.whl
75+
76+
test:
77+
needs: [build]
78+
runs-on: ${{ matrix.os }}
79+
defaults:
80+
run:
81+
shell: bash
82+
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
os: [ubuntu-latest]
87+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
88+
platform: [x64]
89+
with_contrib: [0, 1]
90+
without_gui: [0, 1]
91+
build_sdist: [0]
92+
93+
env:
94+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
95+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
96+
NP_TEST_DEP: numpy==1.19.4
97+
NP_TEST_DEP_LATEST: numpy==1.21.2
98+
CONFIG_PATH: travis_config.sh
99+
PLAT: x86_64
100+
101+
steps:
102+
- name: Checkout
103+
uses: actions/checkout@v2
104+
with:
105+
submodules: false
106+
fetch-depth: 0
107+
108+
- name: Setup Environment variables
109+
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
110+
111+
- name: Download a wheel accordingly to matrix
112+
uses: actions/download-artifact@v2
113+
with:
114+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
115+
path: wheelhouse/
116+
117+
- name: Package installation and run tests
118+
run: source scripts/install.sh
81119

82120
build_sdist:
83121
runs-on: ${{ matrix.os }}
@@ -131,12 +169,7 @@ jobs:
131169
python-version: ${{ matrix.python-version }}
132170
architecture: ${{ matrix.platform }}
133171

134-
- name: Setup Environment variables
135-
run: |
136-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
137-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
138-
139-
- name: before install
172+
- name: Build a package
140173
run: |
141174
set -e
142175
# Build and package
@@ -157,7 +190,7 @@ jobs:
157190

158191
test_release_opencv_python:
159192
if: github.event_name == 'release' && github.event.release.prerelease
160-
needs: [build, build_sdist]
193+
needs: [build, build_sdist, test]
161194
runs-on: ubuntu-latest
162195
environment: test-opencv-python-release
163196
defaults:
@@ -176,7 +209,7 @@ jobs:
176209
177210
release_opencv_python:
178211
if: github.event_name == 'release' && !github.event.release.prerelease
179-
needs: [build, build_sdist]
212+
needs: [build, build_sdist, test]
180213
runs-on: ubuntu-latest
181214
environment: opencv-python-release
182215
defaults:

.github/workflows/build_wheels_linux_arm.yml

+61-16
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os: [ARM64]
26-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
26+
python-version: ['3.6']
2727
platform: [x64]
2828
with_contrib: [0, 1]
2929
without_gui: [0, 1]
@@ -38,12 +38,9 @@ jobs:
3838
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
3939
PLAT: aarch64
4040
MB_ML_VER: 2014
41-
NP_TEST_DEP: numpy==1.19.4
42-
NP_TEST_DEP_LATEST: numpy==1.21.2
4341
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4442
CONFIG_PATH: travis_config.sh
4543
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
46-
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
4744
USE_CCACHE: 0
4845
UNICODE_WIDTH: 32
4946
SDIST: ${{ matrix.build_sdist || 0 }}
@@ -61,26 +58,74 @@ jobs:
6158
submodules: false
6259
fetch-depth: 0
6360

64-
- name: Setup Environment variables
65-
run: |
66-
if [ "ARM64" == "${{ matrix.os }}" ]; then echo "PLAT=aarch64" >> $GITHUB_ENV; fi
67-
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
68-
69-
- name: build
61+
- name: Build a package
7062
run: source scripts/build.sh
7163

72-
- name: install and test
73-
run: source scripts/install.sh
74-
75-
- name: saving artifacts
64+
- name: Saving all wheels
7665
uses: actions/upload-artifact@v2
7766
with:
7867
name: wheels
7968
path: wheelhouse/opencv*.whl
8069

70+
- name: Saving a wheel accordingly to matrix
71+
uses: actions/upload-artifact@v2
72+
with:
73+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
74+
path: wheelhouse/opencv*.whl
75+
76+
test:
77+
needs: [build_arm]
78+
runs-on: ${{ matrix.os }}
79+
defaults:
80+
run:
81+
shell: bash
82+
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
os: [ARM64]
87+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
88+
platform: [x64]
89+
with_contrib: [0, 1]
90+
without_gui: [0, 1]
91+
build_sdist: [0]
92+
93+
env:
94+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
95+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
96+
PLAT: aarch64
97+
NP_TEST_DEP: numpy==1.19.4
98+
NP_TEST_DEP_LATEST: numpy==1.21.4
99+
CONFIG_PATH: travis_config.sh
100+
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
101+
UNICODE_WIDTH: 32
102+
103+
steps:
104+
- name: Cleanup
105+
if: always()
106+
uses: AutoModality/action-clean@v1
107+
108+
- name: Checkout
109+
uses: actions/checkout@v2
110+
with:
111+
submodules: true
112+
fetch-depth: 0
113+
114+
- name: Setup Environment variables
115+
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
116+
117+
- name: Download a wheel accordingly to matrix
118+
uses: actions/download-artifact@v2
119+
with:
120+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
121+
path: wheelhouse/
122+
123+
- name: Package installation and run tests
124+
run: source scripts/install.sh
125+
81126
test_release_opencv_python:
82127
if: github.event_name == 'release' && github.event.release.prerelease
83-
needs: [build_arm]
128+
needs: [build_arm, test]
84129
runs-on: ubuntu-latest
85130
environment: test-opencv-python-release
86131
defaults:
@@ -99,7 +144,7 @@ jobs:
99144
100145
release_opencv_python:
101146
if: github.event_name == 'release' && !github.event.release.prerelease
102-
needs: [build_arm]
147+
needs: [build_arm, test]
103148
runs-on: ubuntu-latest
104149
environment: opencv-python-release
105150
defaults:

.github/workflows/build_wheels_macos.yml

+82-18
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os: [macos-10.15, macos-11]
26-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
26+
python-version: ['3.6']
2727
platform: [x64]
2828
with_contrib: [0, 1]
2929
without_gui: [0, 1]
@@ -48,14 +48,13 @@ jobs:
4848
MB_PYTHON_VERSION: ${{ matrix.python-version }}
4949
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
5050
MB_ML_VER: 2014
51-
NP_TEST_DEP: numpy==1.19.4
52-
NP_TEST_DEP_LATEST: numpy==1.21.2
5351
TRAVIS_BUILD_DIR: ${{ github.workspace }}
5452
TRAVIS_OS_NAME: osx
5553
CONFIG_PATH: travis_config.sh
5654
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
5755
USE_CCACHE: 1
5856
UNICODE_WIDTH: 32
57+
PLAT: x86_64
5958
SDIST: ${{ matrix.build_sdist || 0 }}
6059
ENABLE_HEADLESS: ${{ matrix.without_gui }}
6160
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
@@ -71,15 +70,7 @@ jobs:
7170
if: github.event_name == 'pull_request'
7271
run: git submodule update --remote
7372

74-
- name: Setup Environment variables
75-
run: |
76-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
77-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
78-
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
79-
if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
80-
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
81-
82-
- name: before install
73+
- name: Build a package
8374
run: |
8475
set -e
8576
# Check out and prepare the source
@@ -96,19 +87,92 @@ jobs:
9687
echo $ENABLE_HEADLESS > headless.enabled
9788
set -x
9889
build_wheel $REPO_DIR $PLAT
99-
git submodule update --init --recursive
100-
install_run $PLAT
101-
set +x
10290
103-
- name: saving artifacts
91+
- name: Saving all wheels
10492
uses: actions/upload-artifact@v2
10593
with:
10694
name: wheels
10795
path: wheelhouse/opencv*.whl
10896

97+
- name: Saving a wheel accordingly to matrix
98+
uses: actions/upload-artifact@v2
99+
with:
100+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
101+
path: wheelhouse/opencv*.whl
102+
103+
test:
104+
needs: [build]
105+
runs-on: ${{ matrix.os }}
106+
defaults:
107+
run:
108+
shell: bash
109+
110+
strategy:
111+
fail-fast: false
112+
matrix:
113+
os: [macos-10.15, macos-11]
114+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
115+
platform: [x64]
116+
with_contrib: [0, 1]
117+
without_gui: [0, 1]
118+
build_sdist: [0]
119+
exclude:
120+
- os: macos-10.15
121+
python-version: '3.10'
122+
- os: macos-11
123+
python-version: '3.6'
124+
- os: macos-11
125+
python-version: '3.7'
126+
- os: macos-11
127+
python-version: '3.8'
128+
- os: macos-11
129+
python-version: '3.9'
130+
131+
env:
132+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
133+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
134+
NP_TEST_DEP: numpy==1.19.4
135+
NP_TEST_DEP_LATEST: numpy==1.21.4
136+
CONFIG_PATH: travis_config.sh
137+
PLAT: x86_64
138+
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
139+
140+
steps:
141+
- name: Checkout
142+
uses: actions/checkout@v2
143+
with:
144+
submodules: true
145+
fetch-depth: 0
146+
147+
- name: Set up Python ${{ matrix.python-version }}
148+
uses: actions/setup-python@v2
149+
with:
150+
python-version: ${{ matrix.python-version }}
151+
architecture: ${{ matrix.platform }}
152+
153+
- name: Setup Environment variables
154+
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
155+
156+
- name: Download a wheel accordingly to matrix
157+
uses: actions/download-artifact@v2
158+
with:
159+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
160+
path: wheelhouse/
161+
162+
- name: Package installation
163+
run: |
164+
python -m pip install wheelhouse/opencv*.whl
165+
cd ${{ github.workspace }}/tests
166+
python get_build_info.py
167+
168+
- name: Run tests
169+
run: |
170+
cd ${{ github.workspace }}/opencv
171+
python modules/python/test/test.py -v --repo .
172+
109173
test_release_opencv_python:
110174
if: github.event_name == 'release' && github.event.release.prerelease
111-
needs: [build]
175+
needs: [build, test]
112176
runs-on: ubuntu-latest
113177
environment: test-opencv-python-release
114178
defaults:
@@ -127,7 +191,7 @@ jobs:
127191
128192
release_opencv_python:
129193
if: github.event_name == 'release' && !github.event.release.prerelease
130-
needs: [build]
194+
needs: [build, test]
131195
runs-on: ubuntu-latest
132196
environment: opencv-python-release
133197
defaults:

0 commit comments

Comments
 (0)