.appveyor.yml 2.85 KB
Newer Older
Christian Clauss's avatar
Christian Clauss committed
1
2
3
4
# https://www.appveyor.com/docs/windows-images-software

image: Visual Studio 2022

5
6
7
8
9
10
11
12
13
environment:
  global:
    REPO_DIR: python-appveyor-demo
    PACKAGE_NAME: python_appveyor_demo
    BUILD_COMMIT: master
    BUILD_DEPENDS: "cython"
    TEST_DEPENDS: "nose"

  matrix:
Christian Clauss's avatar
Christian Clauss committed
14
15
    - PYTHON: "C:\\Miniconda37"
      PYTHON_VERSION: "3.7"
16
      PYTHON_ARCH: "32"
Christian Clauss's avatar
Christian Clauss committed
17
18
    - PYTHON: "C:\\Miniconda37-x64"
      PYTHON_VERSION: "3.7"
19
      PYTHON_ARCH: "64"
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    - PYTHON: "C:\\Miniconda38"
      PYTHON_VERSION: "3.8"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Miniconda38-x64"
      PYTHON_VERSION: "3.8"
      PYTHON_ARCH: "64"
    - PYTHON: "C:\\Miniconda39"
      PYTHON_VERSION: "3.9"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Miniconda39-x64"
      PYTHON_VERSION: "3.9"
      PYTHON_ARCH: "64"
    - PYTHON: "C:\\Miniconda310"
      PYTHON_VERSION: "3.10"
      PYTHON_ARCH: "32"
    - PYTHON: "C:\\Miniconda310-x64"
      PYTHON_VERSION: "3.10"
      PYTHON_ARCH: "64"
38
39
40
41
42
43

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

Christian Clauss's avatar
Christian Clauss committed
44
45
matrix:
    fast_finish: false
46
47
48

install:
    # Install miniconda and fix headers
Christian Clauss's avatar
Christian Clauss committed
49
    - where python
Christian Clauss's avatar
Christian Clauss committed
50
51
    - where py
    - py --list
Christian Clauss's avatar
Christian Clauss committed
52
    - SET PATH=%PYTHON%;%PYTHON%\Scripts;%PYTHON%\Library\bin;%PATH%
Christian Clauss's avatar
Christian Clauss committed
53
54
    - echo %PATH%
    - where conda || true
55
56
57
58
59
    - conda info

    # Check that we have the expected version and architecture for Python
    - python --version
    - python -c "import struct; print(struct.calcsize('P') * 8)"
Christian Clauss's avatar
Christian Clauss committed
60
61
    - py --version
    - py -c "import struct; print(struct.calcsize('P') * 8)"
62
63
64

    # clone a origsel/python-appveyor-demo
    # this repo includes a simple package to test appveyor
Christian Clauss's avatar
Christian Clauss committed
65
    - git clone https://github.com/ogrisel/python-appveyor-demo.git
66
67
68
69
70
71
72
73

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

    # build wheel:
    - cd %REPO_DIR%
    - git checkout %BUILD_COMMIT%
74
    - python setup.py bdist_wheel
75
76
77
78
79
80
81
82
83
84
85
86
87
    - 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
88
89

    # Smoke test of install_python script
90
    # Use C:\PythonXY, C:\PythonXY-x64, C:\PythonXYrcZ, or C:\PythonXYrcZ-x64
91
92
93
94
    - set PYTHON=C:\Python37
    - ps: .\install_python.ps1
    - set PYTHON=C:\Python37-x64
    - ps: .\install_python.ps1
95
    - set PYTHON=C:\Python38-x64
96
    - ps: .\install_python.ps1
mattip's avatar
mattip committed
97
98
    - set PYTHON=C:\Python38
    - ps: .\install_python.ps1
99
100
101
102
    - set PYTHON=C:\Python39-x64
    - ps: .\install_python.ps1
    - set PYTHON=C:\Python39
    - ps: .\install_python.ps1
103
    - set PYTHON=C:\Python310-x64
Andrew Murray's avatar
Andrew Murray committed
104
    - ps: .\install_python.ps1
105
    - set PYTHON=C:\Python310
mattip's avatar
mattip committed
106
    - ps: .\install_python.ps1