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

  PASS:
6
    secure: HHNjmjxQSvgSY9Zde0qh6A==
7

S
skvark 已提交
8
install:
O
Olli-Pekka Heinisuo 已提交
9
- cmd: >-
S
skvark 已提交
10

11
    git submodule update --init --recursive
12

13
    C:\Python35\python.exe find_version.py
14

O
Olli-Pekka Heinisuo 已提交
15
    C:\Python27\python.exe -m pip install --upgrade pip
16

O
Olli-Pekka Heinisuo 已提交
17
    C:\Python27\python.exe -m pip install -r requirements.txt
O
Olli-Pekka Heinisuo 已提交
18

O
Olli-Pekka Heinisuo 已提交
19
    C:\Python35\python.exe -m pip install --upgrade pip
20

O
Olli-Pekka Heinisuo 已提交
21
    C:\Python35\python.exe -m pip install -r requirements.txt
O
fixes  
Olli-Pekka Heinisuo 已提交
22

O
Olli-Pekka Heinisuo 已提交
23
    C:\Python27-x64\python.exe -m pip install --upgrade pip
24

O
Olli-Pekka Heinisuo 已提交
25
    C:\Python27-x64\python.exe -m pip install -r requirements.txt
O
fixes  
Olli-Pekka Heinisuo 已提交
26

O
Olli-Pekka Heinisuo 已提交
27
    C:\Python35-x64\python.exe -m pip install --upgrade pip
28

O
Olli-Pekka Heinisuo 已提交
29
    C:\Python35-x64\python.exe -m pip install -r requirements.txt
30

S
skvark 已提交
31
build_script:
O
Olli-Pekka Heinisuo 已提交
32 33
- cmd: >-

S
skvark 已提交
34
    if not exist "%APPVEYOR_BUILD_FOLDER%\opencv\build" mkdir "%APPVEYOR_BUILD_FOLDER%\opencv\build"
35

S
skvark 已提交
36
    if not exist "%APPVEYOR_BUILD_FOLDER%\opencv\build64" mkdir "%APPVEYOR_BUILD_FOLDER%\opencv\build64"
37

S
skvark 已提交
38
    cd opencv
39

O
Olli-Pekka Heinisuo 已提交
40
    cmake -G "Visual Studio 14" -H"." -B"build" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON3_EXECUTABLE=C:/Python35/python.exe -DPYTHON3_LIBRARY=C:/Python35/libs/python35.lib -DPYTHON3_INCLUDE_DIR=C:/Python35/include -Wno-dev
41

S
more cd  
skvark 已提交
42
    cd build
43

S
more cd  
skvark 已提交
44
    cmake --build . --config Release
45

S
more cd  
skvark 已提交
46
    cd ..
O
Olli-Pekka Heinisuo 已提交
47

O
Olli-Pekka Heinisuo 已提交
48
    cmake -G "Visual Studio 14 Win64" -H"." -B"build64" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON3_EXECUTABLE=C:/Python35-x64/python.exe -DPYTHON3_LIBRARY=C:/Python35-x64/libs/python35.lib -DPYTHON3_INCLUDE_DIR=C:/Python35-x64/include -Wno-dev
49

S
more cd  
skvark 已提交
50
    cd build64
51

S
more cd  
skvark 已提交
52
    cmake --build . --config Release
53

S
spaces  
skvark 已提交
54
    cd ..\..
O
fixes  
Olli-Pekka Heinisuo 已提交
55

S
skvark 已提交
56
    xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\RELEASE\*.pyd" cv2
57 58 59

    C:\Python27\python.exe setup.py bdist_wheel

S
skvark 已提交
60 61
    del cv2\*.pyd

S
skvark 已提交
62
    xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\RELEASE\*.pyd" cv2
63 64 65

    C:\Python27-x64\python.exe setup.py bdist_wheel

O
fixes  
Olli-Pekka Heinisuo 已提交
66 67
    del cv2\*.pyd

S
skvark 已提交
68
    xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build\lib\python3\Release\*.pyd" cv2
69 70 71

    C:\Python35\python.exe setup.py bdist_wheel

S
skvark 已提交
72 73
    del cv2\*.pyd

S
skvark 已提交
74
    xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\build64\lib\python3\Release\*.pyd" cv2
75 76 77

    C:\Python35-x64\python.exe setup.py bdist_wheel

S
skvark 已提交
78
    del cv2\*.pyd
79

O
Olli-Pekka Heinisuo 已提交
80 81 82
before_test:
- cmd: >-

O
Olli-Pekka Heinisuo 已提交
83 84 85
    cd ..

    C:\Python27\python.exe -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python
86

O
Olli-Pekka Heinisuo 已提交
87
    C:\Python27-x64\python.exe -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python
88

O
Olli-Pekka Heinisuo 已提交
89
    C:\Python35\python.exe -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python
90

O
Olli-Pekka Heinisuo 已提交
91
    C:\Python35-x64\python.exe -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python
92

O
Olli-Pekka Heinisuo 已提交
93 94
test_script:
- cmd: >-
95

O
Olli-Pekka Heinisuo 已提交
96
    cd %APPVEYOR_BUILD_FOLDER%\tests
O
Olli-Pekka Heinisuo 已提交
97

O
Olli-Pekka Heinisuo 已提交
98
    C:\Python27\python.exe -m unittest test
99

O
Olli-Pekka Heinisuo 已提交
100
    C:\Python27-x64\python.exe -m unittest test
101

O
Olli-Pekka Heinisuo 已提交
102
    C:\Python35\python.exe -m unittest test
103

O
Olli-Pekka Heinisuo 已提交
104
    C:\Python35-x64\python.exe -m unittest test
O
Olli-Pekka Heinisuo 已提交
105

S
skvark 已提交
106 107
artifacts:
- path: dist\*.whl
O
Olli-Pekka Heinisuo 已提交
108
  name: wheels
109 110

deploy_script:
O
Olli-Pekka Heinisuo 已提交
111
- if "%APPVEYOR_REPO_TAG%"=="true" (twine -u %USER% -p %PASS% -r pypitest dist/*) else (echo "Tag not set, deployment skipped.")