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,108 @@ 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 opencv-python wheels
71+ if : ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }}
72+ uses : actions/upload-artifact@v2
73+ with :
74+ name : opencv-python-wheels
75+ path : wheelhouse/opencv_python-*.whl
76+
77+ - name : Saving opencv-python-headless wheels
78+ if : ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }}
79+ uses : actions/upload-artifact@v2
80+ with :
81+ name : opencv-python-headless-wheels
82+ path : wheelhouse/opencv_python_headless-*.whl
83+
84+ - name : Saving opencv-contrib-python wheels
85+ if : ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }}
86+ uses : actions/upload-artifact@v2
87+ with :
88+ name : opencv-contrib-python-wheels
89+ path : wheelhouse/opencv_contrib_python-*.whl
90+
91+ - name : Saving opencv-contrib-python-headless wheels
92+ if : ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }}
93+ uses : actions/upload-artifact@v2
94+ with :
95+ name : opencv-contrib-python-headless-wheels
96+ path : wheelhouse/opencv_contrib_python_headless-*.whl
97+
98+ test :
99+ needs : [build]
100+ runs-on : ${{ matrix.os }}
101+ defaults :
102+ run :
103+ shell : bash
104+
105+ strategy :
106+ fail-fast : false
107+ matrix :
108+ os : [ubuntu-latest]
109+ python-version : ['3.6', '3.7', '3.8', '3.9', '3.10']
110+ platform : [x64]
111+ with_contrib : [0, 1]
112+ without_gui : [0, 1]
113+ build_sdist : [0]
114+
115+ env :
116+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
117+ MB_PYTHON_VERSION : ${{ matrix.python-version }}
118+ NP_TEST_DEP : numpy==1.19.4
119+ NP_TEST_DEP_LATEST : numpy==1.21.2
120+ CONFIG_PATH : travis_config.sh
121+ PLAT : x86_64
122+
123+ steps :
124+ - name : Checkout
125+ uses : actions/checkout@v2
126+ with :
127+ submodules : false
128+ fetch-depth : 0
129+
130+ - name : Setup Environment variables
131+ 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
132+
133+ - name : Download opencv-python wheels
134+ if : ${{ matrix.without_gui == 0 && matrix.with_contrib == 0 }}
135+ uses : actions/download-artifact@v2
136+ with :
137+ name : opencv-python-wheels
138+ path : wheelhouse/
139+
140+ - name : Download opencv-python-headless wheels
141+ if : ${{ matrix.without_gui == 1 && matrix.with_contrib == 0 }}
142+ uses : actions/download-artifact@v2
143+ with :
144+ name : opencv-python-headless-wheels
145+ path : wheelhouse/
146+
147+ - name : Download opencv-contrib-python wheels
148+ if : ${{ matrix.without_gui == 0 && matrix.with_contrib == 1 }}
149+ uses : actions/download-artifact@v2
150+ with :
151+ name : opencv-contrib-python-wheels
152+ path : wheelhouse/
153+
154+ - name : Download opencv-contrib-python-headless wheels
155+ if : ${{ matrix.without_gui == 1 && matrix.with_contrib == 1 }}
156+ uses : actions/download-artifact@v2
157+ with :
158+ name : opencv-contrib-python-headless-wheels
159+ path : wheelhouse/
160+
161+ - name : Package installation and run tests
162+ run : source scripts/install.sh
81163
82164 build_sdist :
83165 runs-on : ${{ matrix.os }}
@@ -131,12 +213,7 @@ jobs:
131213 python-version : ${{ matrix.python-version }}
132214 architecture : ${{ matrix.platform }}
133215
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
216+ - name : Build a package
140217 run : |
141218 set -e
142219 # Build and package
@@ -157,7 +234,7 @@ jobs:
157234
158235 test_release_opencv_python :
159236 if : github.event_name == 'release' && github.event.release.prerelease
160- needs : [build, build_sdist]
237+ needs : [build, build_sdist, test ]
161238 runs-on : ubuntu-latest
162239 environment : test-opencv-python-release
163240 defaults :
@@ -176,7 +253,7 @@ jobs:
176253
177254 release_opencv_python :
178255 if : github.event_name == 'release' && !github.event.release.prerelease
179- needs : [build, build_sdist]
256+ needs : [build, build_sdist, test ]
180257 runs-on : ubuntu-latest
181258 environment : opencv-python-release
182259 defaults :
0 commit comments