forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
88 lines (71 loc) · 3.13 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
85
86
87
88
#
# Some help for Python on AppVeyor:
# * https://packaging.python.org/appveyor/
# * https://ci.appveyor.com/tools/validate-yaml
version: '{branch}-{build}'
# No need for Python.
build: off
# We don't report the test in XUnit tests or any other format supported by
# AppVeyor.
test: off
# Don't build branch if there is an open PR, to prevent double builds.
# For now, Appveyor will only build PR commits and not commits to master or
# commits on random branches without an associated PR.
skip_branch_with_pr: true
# Not sure if the cache works.
# Note the use of single quotes around the entire line, when environment
# variables are used.
cache:
- '%LOCALAPPDATA%\pip\Cache'
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 .\\bin\\admin\\run_with_env.cmd"
# Only use pre-installed Python versions, which Appveyor may upgrade to
# a later point release.
# See: http://www.appveyor.com/docs/installed-software#python
matrix:
- PYTHON_HOME: C:\\PYTHON36-x64
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
TOXENV: wheels
install:
# Install OpenSSH through chocolatey
- "choco install openssh -confirm"
- "refreshenv"
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%"
- "SET LIB=%PYTHON_HOME%\\lib;%LIB%"
# The following line is inspired by http://nedbatchelder.com/blog/201509/appveyor.html
# Tox has an internal mapping of where to find python.exe. Unfortunately,
# this internal mapping is not the same as the Appveyor build host, which has
# to install separate python.exe in different directories for 32-bit and 64-bit.
# We write out a .bat file which invokes the correct python.exe. tox will invoke
# this .at file. This issue becomes important because linking to python.lib
# will fail without this.
- "python -c \"import os; open('python{0}.bat'.format(os.environ['PYTHON_VERSION']), 'w').write('@{0}\\\\python \\x25*\\n'.format(os.environ['PYTHON_HOME']))\""
- "type python*.bat"
# Get some information about the build environment.
# Uncomment them. Left here so that you don't have to search the net for
# how to run such command on Windows :)
# - ps: "ls \"C:/\""
# - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
# - ps: echo $env:PYTHON $env:TOXENV
# Check that we have the expected version and architecture for Python
- "python -c \"import sys; print(sys.prefix)\""
- "python -c \"import sys; print(sys.exec_prefix)\""
- "python -c \"import sys; print(sys.executable)\""
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# The build system itself is handled by tox.
- "python -m pip install -U pip"
- "python -m pip install tox"
test_script:
- "%CMD_IN_ENV% python -m tox -e %TOXENV%"
artifacts:
- path: "wheelhouse\\*.whl"
name: Wheels