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

  PASS:
6
    secure: HHNjmjxQSvgSY9Zde0qh6A==
7

J
Jon Winsley 已提交
8 9
  matrix:
    - PYTHON: "C:/Python27"
10
      ENABLE_CONTRIB: 0
11

J
Jon Winsley 已提交
12
    - PYTHON: "C:/Python27-x64"
13
      ENABLE_CONTRIB: 0
14

J
Jon Winsley 已提交
15
    - PYTHON: "C:/Python34"
16
      ENABLE_CONTRIB: 0
17

J
Jon Winsley 已提交
18
    - PYTHON: "C:/Python34-x64"
19
      ENABLE_CONTRIB: 0
20

J
Jon Winsley 已提交
21
    - PYTHON: "C:/Python35"
22
      ENABLE_CONTRIB: 0
23

J
Jon Winsley 已提交
24
    - PYTHON: "C:/Python35-x64"
25
      ENABLE_CONTRIB: 0
26

27
    - PYTHON: "C:/Python36"
28
      ENABLE_CONTRIB: 0
29

30
    - PYTHON: "C:/Python36-x64"
31
      ENABLE_CONTRIB: 0
J
Jon Winsley 已提交
32

33
    - PYTHON: "C:/Python27"
34
      ENABLE_CONTRIB: 1
35

36
    - PYTHON: "C:/Python27-x64"
37
      ENABLE_CONTRIB: 1
38

39
    - PYTHON: "C:/Python34"
40
      ENABLE_CONTRIB: 1
41

42
    - PYTHON: "C:/Python34-x64"
43
      ENABLE_CONTRIB: 1
44

45
    - PYTHON: "C:/Python35"
46
      ENABLE_CONTRIB: 1
47

48
    - PYTHON: "C:/Python35-x64"
49
      ENABLE_CONTRIB: 1
O
Olli-Pekka Heinisuo 已提交
50

51
    - PYTHON: "C:/Python36"
52
      ENABLE_CONTRIB: 1
53

54
    - PYTHON: "C:/Python36-x64"
55
      ENABLE_CONTRIB: 1
56

57 58
matrix:
    fast_finish: true
S
skvark 已提交
59 60

build_script:
61
- cmd: |
O
Olli-Pekka Heinisuo 已提交
62
    "%PYTHON%/python.exe" -m pip install --upgrade pip
63
    "%PYTHON%/python.exe" setup.py bdist_wheel
O
Olli-Pekka Heinisuo 已提交
64

65 66
before_test:
- ps: |
O
Olli-Pekka Heinisuo 已提交
67

68 69 70
    cd ${Env:APPVEYOR_BUILD_FOLDER}\tests
    &"${Env:PYTHON}/python.exe" -m pip install --user (ls "../dist/opencv_*.whl")
    if ($LastExitCode -ne 0) {throw $LastExitCode}
71

O
Olli-Pekka Heinisuo 已提交
72
test_script:
73
- cmd: |
O
Olli-Pekka Heinisuo 已提交
74 75 76 77

    cd %APPVEYOR_BUILD_FOLDER%\tests
    "%PYTHON%/python.exe" -m unittest test

S
skvark 已提交
78 79
artifacts:
- path: dist\*.whl
O
Olli-Pekka Heinisuo 已提交
80
  name: wheels
81 82

deploy_script:
83 84 85 86 87 88 89 90 91 92 93 94 95
- ps: |

    if (${Env:APPVEYOR_REPO_TAG} -eq "true") {
        cd ${Env:APPVEYOR_BUILD_FOLDER}
        if (${Env:ENABLE_CONTRIB} -eq 0) `
            {echo "This is a default build. Deployment will be done to PyPI entry opencv-python."} `
        else `
            {echo "This is a contrib build. Deployment will be done to PyPI entry opencv-contrib-python."}

        &"${Env:PYTHON}/python.exe" -m pip install twine
        &"${Env:PYTHON}/python.exe" -m twine upload -u ${Env:USER} -p ${Env:PASS} --skip-existing dist/opencv* } `
    else
        {echo "Tag not set, deployment skipped."}