forked from opencv/opencv-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
98 lines (73 loc) · 2.9 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
environment:
USER:
secure: fXgF9uyy6sT0JoVOR7BoqA==
PASS:
secure: HHNjmjxQSvgSY9Zde0qh6A==
matrix:
# - PYTHON: "C:/Python27"
# BUILD_ENV: "Visual Studio 14"
# BUILD_DIR: "build"
# PYTHON_VERSION: "2.7"
# - PYTHON: "C:/Python27-x64"
# BUILD_ENV: "Visual Studio 14 Win64"
# BUILD_DIR: "build64"
# PYTHON_VERSION: "2.7"
# - PYTHON: "C:/Python34"
# BUILD_ENV: "Visual Studio 14"
# BUILD_DIR: "build"
# PYTHON_VERSION: "3.4"
# - PYTHON: "C:/Python34-x64"
# BUILD_ENV: "Visual Studio 14 Win64"
# BUILD_DIR: "build64"
# PYTHON_VERSION: "3.4"
- PYTHON: "C:/Python35"
BUILD_ENV: "Visual Studio 14"
BUILD_DIR: "build"
PYTHON_VERSION: "3.5"
- PYTHON: "C:/Python35-x64"
BUILD_ENV: "Visual Studio 14 Win64"
BUILD_DIR: "build64"
PYTHON_VERSION: "3.5"
- PYTHON: "C:/Python36"
BUILD_ENV: "Visual Studio 14"
BUILD_DIR: "build"
PYTHON_VERSION: "3.6"
- PYTHON: "C:/Python36-x64"
BUILD_ENV: "Visual Studio 14 Win64"
BUILD_DIR: "build64"
PYTHON_VERSION: "3.6"
install:
- cmd: >-
git submodule update --init --recursive
C:\Python35\python.exe find_version.py
"%PYTHON%/python.exe" -m pip install --upgrade pip
"%PYTHON%/python.exe" -m pip install -r requirements.txt
build_script:
- cmd: |-
if not exist "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%" mkdir "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%"
cd opencv
if %PYTHON_VERSION% GEQ 3 cmake -G "%BUILD_ENV%" -H"." -B"%BUILD_DIR%" -DPYTHON3_EXECUTABLE="%PYTHON%/python.exe" -DPYTHON3_LIBRARY="%PYTHON%/libs/python3*.lib" -DPYTHON3_INCLUDE_DIR="%PYTHON%/include" -Wno-dev -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules
if %PYTHON_VERSION% LSS 3 cmake -G "%BUILD_ENV%" -H"." -B"%BUILD_DIR%" -Wno-dev -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules
cd %BUILD_DIR%
cmake --build . --config Release
cd ..\..
cd
if %PYTHON_VERSION% GEQ 3 xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\lib\python3\Release\*.pyd" .\cv2 /I
if %PYTHON_VERSION% LSS 3 xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\lib\RELEASE\*.pyd" .\cv2 /I
xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\bin\Release\*.dll" .\cv2 /I
dir
"%PYTHON%/python.exe" setup.py bdist_wheel
before_test:
- cmd: >-
cd ..
"%PYTHON%/python.exe" -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python
test_script:
- cmd: >-
cd %APPVEYOR_BUILD_FOLDER%\tests
"%PYTHON%/python.exe" -m unittest test
artifacts:
- path: dist\*.whl
name: wheels
deploy_script:
- cd %APPVEYOR_BUILD_FOLDER%
- if "%APPVEYOR_REPO_TAG%"=="true" ("%PYTHON%/python.exe" -m twine upload -u %USER% -p %PASS% --skip-existing dist/opencv*) else (echo "Tag not set, deployment skipped.")