8000 Try new pipeline · ArtificialZeng/opencv-python@591c15a · GitHub
[go: up one dir, main page]

Skip to content

Commit 591c15a

Browse files
authored
Try new pipeline
1 parent db31b23 commit 591c15a

File tree

1 file changed

+23
-42
lines changed

1 file changed

+23
-42
lines changed

.github/workflows/build_wheels.yml

Lines changed: 23 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,20 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
defaults:
1919
run:
20-
shell: bash
20+
shell: powershell
2121

2222
strategy:
2323
fail-fast: false
2424
matrix:
2525
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]
2828
with_contrib: [0, 1]
2929
without_gui: [0, 1]
3030
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
5234

5335
steps:
5436
- name: Checkout
@@ -60,37 +42,36 @@ jobs:
6042
- name: Update submodules
6143
run: |
6244
git submodule update --remote
63-
6445
- 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
7352

7453
- name: build script
7554
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
7960

8061
- name: before test
8162
run: |
8263
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}
8767
- name: run test
8868
run: |
8969
cd ${{ github.workspace }}/tests
90-
"%PYTHON%\\python.exe" -m unittest test
70+
python -m unittest test
71+
shell: cmd
9172

9273
- name: saving artifacts
9374
uses: actions/upload-artifact@v2
9475
with:
95-
name: wheels
76+
name: wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
9677
path: dist\opencv*.whl

0 commit comments

Comments
 (0)
0