44
44
- name : Update submodules
45
45
run : |
46
46
git submodule update --remote
47
-
47
+
48
48
- name : Set up Python ${{ matrix.python-version }}
49
49
uses : actions/setup-python@v2
50
50
with :
@@ -127,7 +127,7 @@ jobs:
127
127
- name : Update submodules
128
128
run : |
129
129
git submodule update --remote
130
-
130
+
131
131
- name : Set up Python ${{ matrix.python-version }}
132
132
uses : actions/setup-python@v2
133
133
with :
@@ -141,7 +141,7 @@ jobs:
141
141
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
142
142
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
143
143
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
144
-
144
+
145
145
- name : before install
146
146
run : |
147
147
set -e
@@ -192,9 +192,89 @@ jobs:
192
192
name : wheels
193
193
path : wheelhouse/opencv*.whl
194
194
195
+
196
+ build_sdist :
197
+ runs-on : ${{ matrix.os }}
198
+ defaults :
199
+ run :
200
+ shell : bash
201
+
202
+ strategy :
203
+ fail-fast : false
204
+ matrix :
205
+ os : [ubuntu-latest]
206
+ python-version : [3.8]
207
+ platform : [x64]
208
+ with_contrib : [0, 1]
209
+ without_gui : [0]
210
+ build_sdist : [1]
211
+
212
+ env :
213
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
214
+ REPO_DIR : .
215
+ BUILD_COMMIT : master
216
+ PROJECT_SPEC : opencv-python
217
+ PLAT : x86_64
218
+ MB_PYTHON_VERSION : ${{ matrix.python-version }}
219
+ TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
220
+ MB_ML_VER : 2014
221
+ NP_TEST_DEP : numpy
222
+ TRAVIS_BUILD_DIR : ${{ github.workspace }}
223
+ CONFIG_PATH : travis_config.sh
224
+ DOCKER_IMAGE : quay.io/skvark/manylinux2014_${PLAT}
225
+ USE_CCACHE : 1
226
+ UNICODE_WIDTH : 32
227
+ SDIST : ${{ matrix.build_sdist || 0}}
228
+ ENABLE_HEADLESS : ${{ matrix.without_gui || 0 }}
229
+ ENABLE_CONTRIB : ${{ matrix.with_contrib || 0}}
230
+
231
+ steps :
232
+ - name : Checkout
233
+ uses : actions/checkout@v2
234
+ with :
235
+ submodules : true
236
+ fetch-depth : 0
237
+
238
+ - name : Update submodules
239
+ run : |
240
+ git submodule update --remote
241
+
242
+ - name : Set up Python ${{ matrix.python-version }}
243
+ uses : actions/setup-python@v2
244
+ with :
245
+ python-version : ${{ matrix.python-version }}
246
+ architecture : ${{ matrix.platform }}
247
+
248
+ - name : Setup Environment variables
249
+ run : |
250
+ if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
251
+ if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
252
+ if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
253
+ echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
254
+ echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
255
+
256
+ - name : before install
257
+ run : |
258
+ set -e
259
+ # Build and package
260
+ set -x
261
+ python -m pip install --upgrade pip
262
+ python -m pip install scikit-build
263
+ python setup.py sdist
264
+ set +x
265
+ # Install and run tests
266
+ set -x
267
+ echo "skipping tests because of sdist"
268
+ - name : saving artifacts
269
+ uses : actions/upload-artifact@v2
270
+ with :
271
+ name : wheels
272
+ path : dist/opencv*.tar.gz
273
+
274
+
195
275
release :
196
276
if : startsWith(github.ref, 'refs/tags/v')
197
- needs : [build, build-windows-x86_64]
277
+ needs : [build, build-windows-x86_64, build_sdist ]
198
278
runs-on : ubuntu-latest
199 279
defaults :
200
280
run :
@@ -206,7 +286,6 @@ jobs:
206
286
path : wheelhouse/
207
287
208
288
- name : Upload wheels ${{ matrix.os }}
209
- if : ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} && startsWith(github.ref, 'refs/tags/')
210
289
env :
211
290
# PYPI repository credentials
212
291
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
0 commit comments