@@ -159,6 +159,7 @@ jobs:
159
159
build_wheel $REPO_DIR $PLAT
160
160
install_run $PLAT
161
161
set +x
162
+
162
163
- name : saving artifacts
163
164
uses : actions/upload-artifact@v2
164
165
with :
@@ -238,15 +239,120 @@ jobs:
238
239
# Install and run tests
239
240
set -x
240
241
echo "skipping tests because of sdist"
242
+
241
243
- name : saving artifacts
242
244
uses : actions/upload-artifact@v2
243
245
with :
244
246
name : wheels
245
247
path : dist/opencv*.tar.gz
246
248
249
+ build_arm :
250
+ runs-on : ${{ matrix.os }}
251
+ defaults :
252
+ run :
253
+ shell : bash
254
+
255
+ strategy :
256
+ fail-fast : false
257
+ matrix :
258
+ os : [jetson]
259
+ python-version : [3.6, 3.7, 3.8, 3.9]
260
+ platform : [x64]
261
+ with_contrib : [0, 1]
262
+ without_gui : [0, 1]
263
+ build_sdist : [0]
264
+
265
+ env :
266
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
267
+ REPO_DIR : .
268
+ BUILD_COMMIT : master
269
+ PROJECT_SPEC : opencv-python
270
+ MB_PYTHON_VERSION : ${{ matrix.python-version }}
271
+ TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
272
+ PLAT : aarch64
273
+ MB_ML_VER : 2014
274
+ NP_TEST_DEP : numpy
275
+ TRAVIS_BUILD_DIR : ${{ github.workspace }}
276
+ CONFIG_PATH : travis_config.sh
277
+ DOCKER_IMAGE : quay.io/skvark/manylinux2014_${PLAT}
278
+ DOCKER_TEST_IMAGE : multibuild/xenial_arm64v8
279
+ USE_CCACHE : 0
280
+ UNICODE_WIDTH : 32
281
+ SDIST : ${{ matrix.build_sdist || 0}}
282
+ ENABLE_HEADLESS : ${{ matrix.without_gui }}
283
+ ENABLE_CONTRIB : ${{ matrix.with_contrib }}
284
+
285
+ steps :
286
+ - name : Cleanup
287
+ if : always()
288
+ uses : AutoModality/action-clean@v1
289
+
290
+ - name : Checkout
291
+ uses : actions/checkout@v2
292
+ with :
293
+ submodules : true
294
+ fetch-depth : 0
295
+
296
+ - name : Setup Environment variables
297
+ run : |
298
+ if [ "jetson" == "${{ matrix.os }}" ]; then echo "PLAT=aarch64" >> $GITHUB_ENV; fi
299
+ echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
300
+ echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
301
+
302
+ - name : before install
303
+ run : |
304
+ set -e
305
+ if [[ $SDIST == 0 ]]; then
306
+ # Check out and prepare the source
307
+ # Multibuild doesn't have releases, so --depth would break eventually (see
308
+ # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
309
+ git submodule update --init multibuild
310
+ source multibuild/common_utils.sh
311
+ # https://github.com/matthew-brett/multibuild/issues/116
312
+ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
313
+ source multibuild/travis_steps.sh
314
+ # This sets -x
315
+ # source travis_multibuild_customize.sh
316
+ echo $ENABLE_CONTRIB > contrib.enabled
317
+ echo $ENABLE_HEADLESS > headless.enabled
318
+ echo "end"
319
+ # Not interested in travis internal scripts' output
320
+ fi
321
+ set +x
322
+ # Build and package
323
+ set -x
324
+ ls
325
+ if [[ $SDIST == 1 ]]; then
326
+ python -m pip install --upgrade pip
327
+ python -m pip install scikit-build
328
+ python setup.py sdist
329
+ else
330
+ build_wheel $REPO_DIR $PLAT
331
+ fi
332
+ set +x
333
+ # Install and run tests
334
+ set -x
335
+ if [[ $SDIST == 1 ]]; then
336
+ echo "skipping tests because of sdist"
337
+ rc=0
338
+ else
339
+ install_run $PLAT && rc=$? || rc=$?
340
+ fi
341
+ set +x
342
+ #otherwise, Travis logic terminates prematurely
343
+ #https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817
344
+ trap ERR
345
+ test "$rc" -eq 0
346
+
347
+ - name : saving artifacts
348
+ uses : actions/upload-artifact@v2
349
+ with :
350
+ name : wheels
351
+ path : wheelhouse/opencv*.whl
352
+
247
353
test_release_opencv_python :
248
354
if : github.event_name == 'release' && github.event.release.prerelease
249
- needs : [build, build-windows-x86_64, build_sdist]
355
+ needs : [build, build-windows-x86_64, build_sdist, build_arm ]
250
356
runs-on : ubuntu-latest
251
357
environment : test-opencv-python-release
252
358
defaults :
@@ -265,7 +371,7 @@ jobs:
265
371
266
372
release_opencv_python :
267
373
if : github.event_name == 'release' && !github.event.release.prerelease
268
- needs : [build, build-windows-x86_64, build_sdist]
374
+ needs : [build, build-windows-x86_64, build_sdist, build_arm ]
269
375
runs-on : ubuntu-latest
270
376
environment : opencv-python-release
271
377
defaults :
0 commit comments