-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
appveyor.yml
84 lines (70 loc) · 2.62 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
# parts from
# - matrix: https://github.com/pythonnet/pythonnet/blob/master/appveyor.yml
# - Visual Studio 2010 py33 py34 on x64: https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor/run_with_env.cmd
branches:
only:
- /default/
platform:
- x86
- x64
environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: 'cmd /E:ON /V:ON /C .\appveyor_env.cmd'
# CIBW_BEFORE_BUILD: python build_ext --with-cython --inplace
# TWINE_USERNAME: scoder
# Note: TWINE_PASSWORD is set in Appveyor settings
matrix:
- PYTHON_VERSION: "3.11"
- PYTHON_VERSION: "3.10"
- PYTHON_VERSION: 3.9
- PYTHON_VERSION: 3.8
- PYTHON_VERSION: 3.7
- PYTHON_VERSION: 3.6
- PYTHON_VERSION: 3.5
- PYTHON_VERSION: 2.7
init:
- set PY_VER=%PYTHON_VERSION:.=%
- set TOXENV=py%PY_VER%
- set PYTHON=C:\PYTHON%PY_VER%
- if %PLATFORM%==x64 (set PYTHON=%PYTHON%-x64)
- set TOXPYTHON=%PYTHON%\python.exe
- set PYTHON_ARCH=32
- if %PLATFORM%==x64 (set PYTHON_ARCH=64)
# Put desired Python version in PATH
- set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
- 'ECHO %TOXENV% '
- python --version
install:
- ECHO 'Installed SDKs:'
- ps: 'ls "C:/Program Files/Microsoft SDKs/Windows"'
#- python -m pip install --upgrade setuptools pip
- "powershell .\\appveyor_install.ps1"
- "%PYTHON%\\python.exe --version"
- "%PYTHON%\\python.exe -m pip install -r requirements-appveyor.txt"
- "%PYTHON%\\python.exe setup.py build_ext --inplace --with-cython"
build: false # First tests then build (is python not C)
test_script:
- tox -e %TOXENV%-windows
after_test:
- "%PYTHON%\\Scripts\\pip.exe install --upgrade wheel"
- "%PYTHON%\\python.exe setup.py build_ext --inplace"
- rm -rf build # account for: https://bitbucket.org/pypa/wheel/issues/147/bdist_wheel-should-start-by-cleaning-up
- "%PYTHON%\\python.exe setup.py sdist bdist_wheel"
artifacts:
# bdist_wheel puts your built wheel in the dist directory
- path: "dist\\*.whl"
name: Wheels
# Where in the appveyor cloud are the wheels pushed to?
# https://www.appveyor.com/docs/packaging-artifacts/#permalink-to-the-last-successful-build-artifact
# borrowed from https://github.com/joerick/pyinstrument_cext/blob/master/appveyor.yml#L11-L15
# - ps: >-
# if ($env:APPVEYOR_REPO_TAG -eq "true") {
# python -m pip install twine
# python -m twine upload (resolve-path wheelhouse\*.whl)
# }
on_failure:
- ps: dir "env:"
- ps: get-content .tox\*\log\*