Skip to content

Commit 3b795ec

Browse files
authored
Merge pull request #669 from asenyaev/asen/update_3.4_branch
Update 3.4 branch with latest updates in master
2 parents 363e0e6 + 964ad08 commit 3b795ec

11 files changed

+211
-74
lines changed

.github/workflows/build_wheels_linux.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- 3.4
78
paths-ignore:
89
- '.github/workflows/build_wheels_linux_arm.yml'
910
- '.github/workflows/build_wheels_windows*'
@@ -39,7 +40,7 @@ jobs:
3940
MB_ML_VER: 2014
4041
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4142
CONFIG_PATH: travis_config.sh
42-
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
43+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
4344
USE_CCACHE: 1
4445
UNICODE_WIDTH: 32
4546
PLAT: x86_64
@@ -102,7 +103,7 @@ jobs:
102103
- name: Checkout
103104
uses: actions/checkout@v2
104105
with:
105-
submodules: false
106+
submodules: true
106107
fetch-depth: 0
107108

108109
- name: Setup Environment variables
@@ -145,7 +146,7 @@ jobs:
145146
NP_TEST_DEP: numpy==1.19.4
146147
TRAVIS_BUILD_DIR: ${{ github.workspace }}
147148
CONFIG_PATH: travis_config.sh
148-
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
149+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
149150
USE_CCACHE: 1
150151
UNICODE_WIDTH: 32
151152
SDIST: ${{ matrix.build_sdist || 0 }}
@@ -176,7 +177,7 @@ jobs:
176177
set -x
177178
python -m pip install --upgrade pip
178179
python -m pip install scikit-build
179-
python setup.py sdist
180+
python setup.py sdist --formats=xztar
180181
set +x
181182
# Install and run tests
182183
set -x
@@ -186,7 +187,7 @@ jobs:
186187
uses: actions/upload-artifact@v2
187188
with:
188189
name: wheels
189-
path: dist/opencv*.tar.gz
190+
path: dist/opencv*.tar.xz
190191

191192
test_release_opencv_python:
192193
if: github.event_name == 'release' && github.event.release.prerelease

.github/workflows/build_wheels_linux_arm.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- 3.4
78
paths-ignore:
89
- '.github/workflows/build_wheels_linux.yml'
910
- '.github/workflows/build_wheels_windows*'
@@ -40,7 +41,7 @@ jobs:
4041
MB_ML_VER: 2014
4142
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4243
CONFIG_PATH: travis_config.sh
43-
DOCKER_IMAGE: quay.io/asenyaev/manylinux2014_${PLAT}
44+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
4445
USE_CCACHE: 0
4546
UNICODE_WIDTH: 32
4647
SDIST: ${{ matrix.build_sdist || 0 }}

.github/workflows/build_wheels_macos.yml

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- 3.4
78
paths-ignore:
89
- '.github/workflows/build_wheels_linux*'
910
- '.github/workflows/build_wheels_windows*'
@@ -137,6 +138,7 @@ jobs:
137138
CONFIG_PATH: travis_config.sh
138139
PLAT: x86_64
139140
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
141+
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
140142

141143
steps:
142144
- name: Checkout
@@ -171,6 +173,12 @@ jobs:
171173
cd ${{ github.workspace }}/opencv
172174
python modules/python/test/test.py -v --repo .
173175
176+
- name: Pylint test
177+
run: |
178+
python -m pip install pylint==2.12.2
179+
cd ${{ github.workspace }}/tests
180+
python -m pylint $PYLINT_TEST_FILE
181+
174182
test_release_opencv_python:
175183
if: github.event_name == 'release' && github.event.release.prerelease
176184
needs: [build, test]

.github/workflows/build_wheels_macos_m1.yml

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- 3.4
78
paths-ignore:
89
- '.github/workflows/build_wheels_linux*'
910
- '.github/workflows/build_wheels_windows*'
@@ -81,6 +82,7 @@ jobs:
8182

8283
env:
8384
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
85+
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
8486

8587
steps:
8688
- name: Checkout
@@ -106,6 +108,12 @@ jobs:
106108
cd ${{ github.workspace }}/opencv
107109
arch -arm64 python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
108110
111+
- name: Pylint test
112+
run: |
113+
arch -arm64 python${{ matrix.python-version }} -m pip install pylint==2.12.2
114+
cd ${{ github.workspace }}/tests
115+
arch -arm64 python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
116+
109117
test_release_opencv_python:
110118
if: github.event_name == 'release' && github.event.release.prerelease
111119
needs: [build, test]

.github/workflows/build_wheels_windows.yml

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- 3.4
78
paths-ignore:
89
- '.github/workflows/build_wheels_linux*'
910
- '.github/workflows/build_wheels_macos*'
@@ -96,6 +97,7 @@ jobs:
9697
env:
9798
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
9899
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata
100+
PYLINT_TEST_FILE: ${{ github.workspace }}\opencv\samples\python\squares.py
99101

100102
steps:
101103
- name: Checkout
@@ -130,6 +132,13 @@ jobs:
130132
python modules\python\test\test.py -v --repo .
131133
shell: cmd
132134

135+
- name: Pylint test
136+
run: |
137+
python -m pip install pylint==2.12.2
138+
cd ${{ github.workspace }}\tests
139+
python -m pylint $PYLINT_TEST_FILE
140+
shell: cmd
141+
133142
test_release_opencv_python:
134143
if: github.event_name == 'release' && github.event.release.prerelease
135144
needs: [build-windows-x86_64, test]

docker/manylinux2014/Dockerfile_aarch64

+67-18
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,103 @@ FROM quay.io/pypa/manylinux2014_aarch64:latest
22

33
ARG CCACHE_VERSION=3.7.9
44
ARG FFMPEG_VERSION=4.4.1
5+
ARG FREETYPE_VERSION=2.12.1
6+
ARG LIBPNG_VERSION=1.6.37
57
ARG NASM_VERSION=2.15.04
6-
ARG OPENSSL_VERSION=1_1_1m
8+
ARG OPENSSL_VERSION=1_1_1o
79
ARG QT_VERSION=5.15.0
810
ARG YASM_VERSION=1.3.0
911

10-
RUN yum install bzip2-devel curl-devel zlib-devel xcb-util-renderutil-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel libXi-devel freetype-devel -y
12+
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH
13+
14+
# epel-release need for aarch64 to get openblas packages
15+
RUN yum install bzip2-devel curl-devel zlib-devel xcb-util-renderutil-devel xcb-util-devel xcb-util-image-devel xcb-util-keysyms-devel xcb-util-wm-devel mesa-libGL-devel libxkbcommon-devel libxkbcommon-x11-devel libXi-devel lapack-devel epel-release -y && \
16+
yum install openblas-devel -y && \
17+
cp /usr/include/lapacke/lapacke*.h /usr/include/ && \
18+
curl https://raw.githubusercontent.com/xianyi/OpenBLAS/v0.3.3/cblas.h -o /usr/include/cblas.h && \
19+
# libpng will be built from source
20+
yum remove libpng -y
21+
22+
RUN mkdir ~/libpng_sources && \
23+
cd ~/libpng_sources && \
24+
curl -O -L https://download.sourceforge.net/libpng/libpng-${LIBPNG_VERSION}.tar.gz && \
25+
tar -xf libpng-${LIBPNG_VERSION}.tar.gz && \
26+
cd libpng-${LIBPNG_VERSION} && \
27+
./configure --prefix=/usr/local && \
28+
make && \
29+
make install && \
30+
cd .. && \
31+
rm -rf ~/libpng_sources
32+
33+
RUN mkdir ~/freetype_sources && \
34+
cd ~/freetype_sources && \
35+
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
36+
tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
37+
cd freetype-${FREETYPE_VERSION} && \
38+
./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
39+
make && \
40+
make install && \
41+
cd .. && \
42+
rm -rf ~/freetype_sources
1143

1244
RUN curl -O -L https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
1345
tar -xf qt-everywhere-src-${QT_VERSION}.tar.xz && \
14-
cd qt-everywhere* && \
46+
cd qt-everywhere-src-${QT_VERSION} && \
1547
export MAKEFLAGS=-j$(nproc) && \
1648
./configure -prefix /opt/Qt${QT_VERSION} -release -opensource -confirm-license -qtnamespace QtOpenCVPython -xcb -xcb-xlib -bundled-xcb-xinput -no-openssl -no-dbus -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtqa -skip qtremoteobjects -skip qtrepotools -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip xmlpatterns -skip declarative -make libs && \
1749
make && \
1850
make install && \
1951
cd .. && \
20-
rm -rf qt-everywhere-src-${QT_VERSION} && \
21-
rm qt-everywhere-src-${QT_VERSION}.tar.xz
52+
rm -rf qt-everywhere*
2253

2354
ENV QTDIR /opt/Qt${QT_VERSION}
2455
ENV PATH "$QTDIR/bin:$PATH"
2556

26-
RUN mkdir ~/ffmpeg_sources && \
27-
cd ~/ffmpeg_sources && \
57+
RUN mkdir ~/openssl_sources && \
58+
cd ~/openssl_sources && \
2859
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
2960
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
3061
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
3162
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" no-pinshared shared zlib && \
3263
make -j$(getconf _NPROCESSORS_ONLN) && \
3364
# skip installing documentation
3465
make install_sw && \
35-
rm -rf ~/openssl_build
66+
cd .. && \
67+
rm -rf ~/openssl_build ~/openssl_sources
3668

37-
RUN cd ~/ffmpeg_sources && \
69+
RUN mkdir ~/nasm_sources && \
70+
cd ~/nasm_sources && \
3871
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.bz2 && \
3972
tar -xf nasm-${NASM_VERSION}.tar.bz2 && cd nasm-${NASM_VERSION} && ./autogen.sh && \
4073
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
4174
make -j$(getconf _NPROCESSORS_ONLN) && \
42-
make install
75+
make install && \
76+
cd .. && \
77+
rm -rf ~/nasm_sources
4378

44-
RUN cd ~/ffmpeg_sources && \
79+
RUN mkdir ~/yasm_sources && \
80+
cd ~/yasm_sources && \
4581
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \
4682
tar -xf yasm-${YASM_VERSION}.tar.gz && \
4783
cd yasm-${YASM_VERSION} && \
4884
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
4985
make -j$(getconf _NPROCESSORS_ONLN) && \
50-
make install
86+
make install && \
87+
cd .. && \
88+
rm -rf ~/yasm_sources
5189

52-
RUN cd ~/ffmpeg_sources && \
53-
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
90+
RUN mkdir ~/libvpx_sources && \
91+
cd ~/libvpx_sources && \
92+
git clone --depth 1 https://github.com/webmproject/libvpx.git && \
5493
cd libvpx && \
5594
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
5695
make -j$(getconf _NPROCESSORS_ONLN) && \
57-
make install
96+
make install && \
97+
cd .. && \
98+
rm -rf ~/libvpx_sources
5899

59-
RUN cd ~/ffmpeg_sources && \
100+
RUN mkdir ~/ffmpeg_sources && \
101+
cd ~/ffmpeg_sources && \
60102
curl -O -L https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
61103
tar -xf ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
62104
cd ffmpeg-${FFMPEG_VERSION} && \
@@ -66,14 +108,21 @@ RUN cd ~/ffmpeg_sources && \
66108
make install && \
67109
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
68110
ldconfig && \
69-
rm -rf ~/ffmpeg_sources
111+
rm -rf ~/ffmpeg_sources && \
112+
yum remove bzip2-devel -y
70113

71114
RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz && \
72115
tar -xf ccache-${CCACHE_VERSION}.tar.gz && \
73116
cd ccache-${CCACHE_VERSION} && \
74117
linux32 ./configure && \
75118
make -j$(getconf _NPROCESSORS_ONLN) && \
76-
make install
119+
make install && \
120+
cd .. && \
121+
rm -rf ccache-${CCACHE_VERSION}.tar.gz
122+
123+
# Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
124+
RUN mkdir /io && \
125+
git config --global --add safe.directory /io
77126

78127
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
79128
ENV LDFLAGS -L/root/ffmpeg_build/lib

0 commit comments

Comments
 (0)