23
23
fail-fast : false
24
24
matrix :
25
25
os : [ubuntu-latest]
26
- python-version : ['3.6', '3.7', '3.8', '3.9', '3.10' ]
26
+ python-version : ['3.6']
27
27
platform : [x64]
28
28
with_contrib : [0, 1]
29
29
without_gui : [0, 1]
@@ -37,13 +37,12 @@ jobs:
37
37
MB_PYTHON_VERSION : ${{ matrix.python-version }}
38
38
TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
39
39
MB_ML_VER : 2014
40
- NP_TEST_DEP : numpy==1.19.4
41
- NP_TEST_DEP_LATEST : numpy==1.21.2
42
40
TRAVIS_BUILD_DIR : ${{ github.workspace }}
43
41
CONFIG_PATH : travis_config.sh
44
42
DOCKER_IMAGE : quay.io/asenyaev/manylinux2014_${PLAT}
45
43
USE_CCACHE : 1
46
44
UNICODE_WIDTH : 32
45
+ PLAT : x86_64
47
46
SDIST : ${{ matrix.build_sdist || 0 }}
48
47
ENABLE_HEADLESS : ${{ matrix.without_gui }}
49
48
ENABLE_CONTRIB : ${{ matrix.with_contrib }}
@@ -59,25 +58,108 @@ jobs:
59
58
if : github.event_name == 'pull_request'
60
59
run : git submodule update --remote
61
60
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
70
62
run : source scripts/build.sh
71
63
72
- - name : install and test
73
- run : source scripts/install.sh
74
-
75
- - name : saving artifacts
64
+ - name : Saving all wheels
76
65
uses : actions/upload-artifact@v2
77
66
with :
78
67
name : wheels
79
68
path : wheelhouse/opencv*.whl
80
69
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
81
163
82
164
build_sdist :
83
165
runs-on : ${{ matrix.os }}
@@ -131,12 +213,7 @@ jobs:
131
213
python-version : ${{ matrix.python-version }}
132
214
architecture : ${{ matrix.platform }}
133
215
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
140
217
run : |
141
218
set -e
142
219
# Build and package
@@ -157,7 +234,7 @@ jobs:
157
234
158
235
test_release_opencv_python :
159
236
if : github.event_name == 'release' && github.event.release.prerelease
160
- needs : [build, build_sdist]
237
+ needs : [build, build_sdist, test ]
161
238
runs-on : ubuntu-latest
162
239
environment : test-opencv-python-release
163
240
defaults :
@@ -176,7 +253,7 @@ jobs:
176
253
177
254
release_opencv_python :
178
255
if : github.event_name == 'release' && !github.event.release.prerelease
179
- needs : [build, build_sdist]
256
+ needs : [build, build_sdist, test ]
180
257
runs-on : ubuntu-latest
181
258
environment : opencv-python-release
182
259
defaults :
0 commit comments