1
- name : Build PYPI wheels for opencv-python
1
+ name : Build PYPI wheels for opencv-python on Linux x86_64
2
2
3
3
on :
4
4
pull_request :
9
9
10
10
11
11
jobs :
12
- build-windows-x86_64 :
13
- runs-on : ${{ matrix.os }}
14
- defaults :
15
- run :
16
- shell : powershell
17
-
18
- strategy :
19
- fail-fast : false
20
- matrix :
21
- os : [windows-latest]
22
- python-version : [3.6, 3.7, 3.8, 3.9]
23
- platform : [x86, x64]
24
- with_contrib : [0, 1]
25
- without_gui : [0, 1]
26
- build_sdist : [0]
27
-
28
- env :
29
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
30
- SDIST : ${{ matrix.build_sdist || 0}}
31
- ENABLE_HEADLESS : ${{ matrix.without_gui }}
32
- ENABLE_CONTRIB : ${{ matrix.with_contrib }}
33
-
34
- steps :
35
- - name : Checkout
36
- uses : actions/checkout@v2
37
- with :
38
- submodules : true
39
- fetch-depth : 0
40
-
41
- - name : Update submodules
42
- run : |
43
- git submodule update --remote
44
-
45
- - name : Set up Python ${{ matrix.python-version }}
46
- uses : actions/setup-python@v2
47
- with :
48
- python-version : ${{ matrix.python-version }}
49
- architecture : ${{ matrix.platform }}
50
-
51
- - name : Setup MSBuild.exe
52
- uses : warrenbuckley/Setup-MSBuild@v1
53
-
54
- - name : build script
55
- run : |
56
- python --version
57
- python -m pip install --upgrade pip
58
- python -m pip install --upgrade setuptools
59
- set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\wheelhouse . --verbose
60
- shell : cmd
61
-
62
- - name : before test
63
- run : |
64
- cd ${{ github.workspace }}/tests
65
- &python -m pip install --user --no-warn-script-location (ls "../wheelhouse/opencv*.whl")
66
- if ($LastExitCode -ne 0) {throw $LastExitCode}
67
- shell : powershell
68
-
69
- - name : run test
70
- run : |
71
- cd ${{ github.workspace }}/tests
72
- python -m unittest test
73
- shell : cmd
74
-
75
- - name : saving artifacts
76
- uses : actions/upload-artifact@v2
77
- with :
78
- name : wheels
79
- path : wheelhouse/opencv*.whl
80
-
81
12
build :
82
13
runs-on : ${{ matrix.os }}
83
14
defaults :
87
18
strategy :
88
19
fail-fast : false
89
20
matrix :
90
- os : [ubuntu-latest, macos-latest ]
21
+ os : [ubuntu-latest]
91
22
python-version : [3.6, 3.7, 3.8, 3.9]
92
23
platform : [x64]
93
24
with_contrib : [0, 1]
@@ -246,113 +177,9 @@ jobs:
246
177
name : wheels
247
178
path : dist/opencv*.tar.gz
248
179
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 : [ARM64]
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 [ "ARM64" == "${{ 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
-
353
180
test_release_opencv_python :
354
181
if : github.event_name == 'release' && github.event.release.prerelease
355
- needs : [build, build-windows-x86_64, build_sdist, build_arm ]
182
+ needs : [build, build_sdist]
356
183
runs-on : ubuntu-latest
357
184
environment : test-opencv-python-release
358
185
defaults :
@@ -371,7 +198,7 @@ jobs:
371
198
372
199
release_opencv_python :
373
200
if : github.event_name == 'release' && !github.event.release.prerelease
374
- needs : [build, build-windows-x86_64, build_sdist, build_arm ]
201
+ needs : [build, build_sdist]
375
202
runs-on : ubuntu-latest
376
203
environment : opencv-python-release
377
204
defaults :
0 commit comments