@@ -17,38 +17,20 @@ jobs:
17
17
runs-on : ${{ matrix.os }}
18
18
defaults :
19
19
run :
20
- shell : bash
20
+ shell : powershell
21
21
22
22
strategy :
23
23
fail-fast : false
24
24
matrix :
25
25
os : [windows-latest] # ubuntu-latest,
26
- python-version : [3.8 ] # [3.6, 3.7, 3.8, 3.9]
27
- platform : [x64]
26
+ python-version : [3.6 ] # [3.6, 3.7, 3.8, 3.9]
27
+ platform : [x64] # [x32, x64]
28
28
with_contrib : [0, 1]
29
29
without_gui : [0, 1]
30
30
build_sdist : [0]
31
- # include:
32
- # - os: ubuntu-latest
33
- # python-version: 3.8
34
- # build_sdist: 1
35
- # with_contrib: 0
36
- # without_gui: 0
37
- # - os: ubuntu-latest
38
- # python-version: 3.8
39
- # build_sdist: 1
40
- # with_contrib: 0
41
- # without_gui: 1
42
- # - os: ubuntu-latest
43
- # python-version: 3.8
44
- # build_sdist: 1
45
- # with_contrib: 1
46
- # without_gui: 0
47
- # - os: ubuntu-latest
48
- # python-version: 3.8
49
- # build_sdist: 1
50
- # with_contrib: 1
51
- # without_gui: 1
31
+
32
+ env :
33
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
52
34
53
35
steps :
54
36
- name : Checkout
@@ -60,37 +42,36 @@ jobs:
60
42
- name : Update submodules
61
43
run : |
62
44
git submodule update --remote
63
-
64
45
- name : Set up Python ${{ matrix.python-version }}
65
- run : |
66
- if [[ ! $env:PYTHON ]] {
67
- curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/devel/install_python.ps1
68
- .\install_python.ps1
69
- }
70
- if [[ ! $env:PYTHON ]]; then echo "No PYTHON"; fi
71
- set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
72
- python --version
46
+ uses : actions/setup-python@v2
47
+ with :
48
+ python-version : ${{ matrix.python-version }}
49
+
50
+ - name : Setup MSBuild.exe
51
+ uses : warrenbuckley/Setup-MSBuild@v1
73
52
74
53
- name : build script
75
54
run : |
76
- "%PYTHON%\\python.exe" -m pip install --upgrade pip
77
- "%PYTHON%\\python.exe" -m pip install --upgrade setuptools
78
- set "CI_BUILD=1" && "%PYTHON%\\python.exe" -m pip wheel --wheel-dir=%cd%\dist . --verbose
55
+ python --version
56
+ python -m pip install --upgrade pip
57
+ python -m pip install --upgrade setuptools
58
+ set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\dist . --verbose
59
+ shell : cmd
79
60
80
61
- name : before test
81
62
run : |
82
63
cd ${{
8000
github.workspace }}/tests
83
- export PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command"
84
- &"${{ matrix.python-version }}\\python.exe" -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl")
85
- if [[ $? -ne 0 ]]; then exit $?; fi
86
-
64
+ $env:PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command"
65
+ &python -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl")
66
+ if ($LastExitCode -ne 0) {throw $LastExitCode}
87
67
- name : run test
88
68
run : |
89
69
cd ${{ github.workspace }}/tests
90
- "%PYTHON%\\python.exe" -m unittest test
70
+ python -m unittest test
71
+ shell : cmd
91
72
92
73
- name : saving artifacts
93
74
uses : actions/upload-artifact@v2
94
75
with :
95
- name : wheels
76
+ name : wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
96
77
path : dist\opencv*.whl
0 commit comments