appveyor.yml 2.46 KB
Newer Older
1
2
3
4
5
6
7
8
9
environment:
  global:
    REPO_DIR: python-appveyor-demo
    PACKAGE_NAME: python_appveyor_demo
    BUILD_COMMIT: master
    BUILD_DEPENDS: "cython"
    TEST_DEPENDS: "nose"

    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
Andrew Murray's avatar
Andrew Murray committed
10
    # /E:ON and /V:ON options are not enabled in the batch script interpreter
Andrew Murray's avatar
Andrew Murray committed
11
    # See: https://stackoverflow.com/a/13751649/163740
12
13
14
15
16
17
18
19
20
    CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\windows_sdk.cmd"

  matrix:
    - PYTHON: "C:\\Miniconda"
      PYTHON_VERSION: "2.7"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Miniconda-x64"
      PYTHON_VERSION: "2.7"
      PYTHON_ARCH: "64"
21
    - PYTHON: "C:\\Miniconda34"
22
23
      PYTHON_VERSION: "3.4"
      PYTHON_ARCH: "32"
24
    - PYTHON: "C:\\Miniconda34-x64"
25
26
27
28
29
30
31
32
      PYTHON_VERSION: "3.4"
      PYTHON_ARCH: "64"
    - PYTHON: "C:\\Miniconda35"
      PYTHON_VERSION: "3.5"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Miniconda35-x64"
      PYTHON_VERSION: "3.5"
      PYTHON_ARCH: "64"
riddell1's avatar
riddell1 committed
33
34
35
36
37
38
    - PYTHON: "C:\\Miniconda36"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Miniconda36-x64"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "64"
39

xoviat's avatar
xoviat committed
40
41
42
43
branches:
  only:
    - master
    - devel
44
45
46
47
48
49
50
51

# We always use a 64-bit machine, but can build x86 distributions
# with the TARGET_ARCH variable.
platform:
    - x64

matrix:
    fast_finish: true
xoviat's avatar
xoviat committed
52
53
    allow_failures:
      - PYTHON_VERSION: "3.4"
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

install:
    # Install miniconda and fix headers
    - ps: .\\ci\\appveyor\\install.ps1
    - ps: .\\ci\\appveyor\\missing-headers.ps1
    - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%PATH%
    - conda info

    # Check that we have the expected version and architecture for Python
    - python --version
    - python -c "import struct; print(struct.calcsize('P') * 8)"

    # clone a origsel/python-appveyor-demo
    # this repo includes a simple package to test appveyor
    - git clone git://github.com/ogrisel/python-appveyor-demo.git


build_script:
    # Install build requirements
    - conda install --yes %BUILD_DEPENDS%

    # build wheel:
    - cd %REPO_DIR%
    - git checkout %BUILD_COMMIT%
    - "%CMD_IN_ENV% python setup.py bdist_wheel"
    - ls dist/*

test_script:
    # create test env
    - conda create --yes -n test_env python=%PYTHON_VERSION% %TEST_DEPENDS%
    - activate test_env

    # install from wheel
    - pip install --no-index --find-links dist/ %PACKAGE_NAME%

    # run tests from install wheel
    - cd ..
    - python -m pyappveyordemo.tests.test_extension