appveyor.yml 3.2 KB
Newer Older
1
environment:
2 3 4 5
  USER:
    secure: fXgF9uyy6sT0JoVOR7BoqA==

  PASS:
6
    secure: HHNjmjxQSvgSY9Zde0qh6A==
7

J
Jon Winsley 已提交
8 9 10 11 12
  matrix:
    - PYTHON: "C:/Python27"
      BUILD_ENV: "Visual Studio 14"
      BUILD_DIR: "build"
      PYTHON_VERSION: "2.7"
13
      NP_VERSION: "1.11.1"
J
Jon Winsley 已提交
14 15 16 17
    - PYTHON: "C:/Python27-x64"
      BUILD_ENV: "Visual Studio 14 Win64"
      BUILD_DIR: "build64"
      PYTHON_VERSION: "2.7"
18
      NP_VERSION: "1.11.1"
J
Jon Winsley 已提交
19 20 21 22
    - PYTHON: "C:/Python34"
      BUILD_ENV: "Visual Studio 14"
      BUILD_DIR: "build"
      PYTHON_VERSION: "3.4"
23
      NP_VERSION: "1.11.1"
J
Jon Winsley 已提交
24 25 26 27
    - PYTHON: "C:/Python34-x64"
      BUILD_ENV: "Visual Studio 14 Win64"
      BUILD_DIR: "build64"
      PYTHON_VERSION: "3.4"
28
      NP_VERSION: "1.11.1"
J
Jon Winsley 已提交
29 30 31 32
    - PYTHON: "C:/Python35"
      BUILD_ENV: "Visual Studio 14"
      BUILD_DIR: "build"
      PYTHON_VERSION: "3.5"
33
      NP_VERSION: "1.11.1"
J
Jon Winsley 已提交
34 35 36 37
    - PYTHON: "C:/Python35-x64"
      BUILD_ENV: "Visual Studio 14 Win64"
      BUILD_DIR: "build64"
      PYTHON_VERSION: "3.5"
38
      NP_VERSION: "1.11.1"
39 40 41 42
    - PYTHON: "C:/Python36"
      BUILD_ENV: "Visual Studio 14"
      BUILD_DIR: "build"
      PYTHON_VERSION: "3.6"
43
      NP_VERSION: "1.11.3"
44 45 46 47
    - PYTHON: "C:/Python36-x64"
      BUILD_ENV: "Visual Studio 14 Win64"
      BUILD_DIR: "build64"
      PYTHON_VERSION: "3.6"
48
      NP_VERSION: "1.11.3"
J
Jon Winsley 已提交
49

S
skvark 已提交
50
install:
O
Olli-Pekka Heinisuo 已提交
51
- cmd: >-
S
skvark 已提交
52

53
    git submodule update --init --recursive
54

55
    C:\Python35\python.exe find_version.py
56

J
Jon Winsley 已提交
57
    "%PYTHON%/python.exe" -m pip install --upgrade pip
58

J
Jon Winsley 已提交
59
    "%PYTHON%/python.exe" -m pip install -r requirements.txt
60

61 62
    "%PYTHON%/python.exe" -m pip install "numpy==%NP_VERSION%"

S
skvark 已提交
63
build_script:
64
- cmd: |-
O
Olli-Pekka Heinisuo 已提交
65

J
Jon Winsley 已提交
66
    if not exist "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%" mkdir "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%"
67

S
skvark 已提交
68
    cd opencv
69

J
Jon Winsley 已提交
70 71
    if %PYTHON_VERSION% GEQ 3 cmake -G "%BUILD_ENV%" -H"." -B"%BUILD_DIR%" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON3_EXECUTABLE="%PYTHON%/python.exe" -DPYTHON3_LIBRARY="%PYTHON%/libs/python3*.lib" -DPYTHON3_INCLUDE_DIR="%PYTHON%/include" -Wno-dev
    if %PYTHON_VERSION% LSS 3 cmake -G "%BUILD_ENV%" -H"." -B"%BUILD_DIR%" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -Wno-dev
72

J
Jon Winsley 已提交
73
    cd %BUILD_DIR%
74

S
more cd  
skvark 已提交
75
    cmake --build . --config Release
76

S
spaces  
skvark 已提交
77
    cd ..\..
78
    cd
79

J
Jon Winsley 已提交
80 81 82
    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
83

J
Jon Winsley 已提交
84
    dir
S
skvark 已提交
85

J
Jon Winsley 已提交
86
    "%PYTHON%/python.exe" setup.py bdist_wheel
87

O
Olli-Pekka Heinisuo 已提交
88 89 90
before_test:
- cmd: >-

O
Olli-Pekka Heinisuo 已提交
91 92
    cd ..

J
Jon Winsley 已提交
93
    "%PYTHON%/python.exe" -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python
94

O
Olli-Pekka Heinisuo 已提交
95 96
test_script:
- cmd: >-
97

O
Olli-Pekka Heinisuo 已提交
98
    cd %APPVEYOR_BUILD_FOLDER%\tests
O
Olli-Pekka Heinisuo 已提交
99

J
Jon Winsley 已提交
100
    "%PYTHON%/python.exe" -m unittest test
O
Olli-Pekka Heinisuo 已提交
101

S
skvark 已提交
102 103
artifacts:
- path: dist\*.whl
O
Olli-Pekka Heinisuo 已提交
104
  name: wheels
105 106

deploy_script:
107
- cd %APPVEYOR_BUILD_FOLDER%
108
- 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.")