-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
85 lines (67 loc) · 3.33 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
# This script instructs the AppVeyor CI service to build rig_c_sa against
# various versions of Python on both 32- and 64-bit Linux. This process ensures
# that the codebase compiles under Microsoft's "C" compiler and that Python can
# import the result as a valid module. We do not run the test suite since this
# requires C99, valgrind and the 'check' unit-testing framework which do not
# work on Windows. These tests will be run by Travis CI when testing against
# Linux.
#
# If a Git tag is being tested, this is assumed to be for a new release of
# rig_c_sa and so, after testing, a "binary wheel" containing the compiled code
# is created and then uploaded to PyPI for each version of Python and Windows.
#
# This file is initially based on examples in
# http://python-packaging-user-guide.readthedocs.org/en/latest/appveyor/
environment:
# The (encrypted) password for the 'rigbots' PyPI account, used for
# deployment.
PYPIPASSWORD:
secure: emFClRFO734uQiW7nsNaleA2vrlO3dvROZA8tuIIIzHFT7ltPLj1zh0DM2BkA2JQ
# Test against the various Python versions and 32- and 64-bit versions of
# Windows.
matrix:
# Python 2.7, 32 bit
- PYTHON: "C:\\Python27"
# Python 2.7, 64 bit
- PYTHON: "C:\\Python27-x64"
# Python 3.4, 32 bit
- PYTHON: "C:\\Python34"
# Python 3.4, 64 bit (incl. workaround specific to that version on Windows)
- PYTHON: "C:\\Python34-x64"
DISTUTILS_USE_SDK: "1"
# Python 3.5, 32 bit
- PYTHON: "C:\\Python35"
# Python 3.5, 64 bit
- PYTHON: "C:\\Python35-x64"
# Python 3.6, 32 bit
- PYTHON: "C:\\Python36"
# Python 3.6, 64 bit
- PYTHON: "C:\\Python36-x64"
# Disable AppVeyor's attempts to automatically build the code
build: off
# Just attempt to build and import the module under Windows since the full
# test suite cannot be run. NOTE: Rig is installed with --no-deps to avoid
# installing Numpy.
test_script:
- "win_build.cmd %PYTHON%\\python.exe -m pip install cffi"
- "win_build.cmd %PYTHON%\\python.exe setup.py install"
- 'win_build.cmd %PYTHON%\\python.exe -c "from rig_cpp_key_allocation import *"'
# Deploy to PyPI if a tagged release
on_success:
# Specify account details for PyPI
- echo [distutils] > %USERPROFILE%\\.pypirc
- echo index-servers = >> %USERPROFILE%\\.pypirc
- echo pypi >> %USERPROFILE%\\.pypirc
- echo [pypi] >> %USERPROFILE%\\.pypirc
- echo repository=https://pypi.python.org/pypi >> %USERPROFILE%\\.pypirc
- echo username=rigbots >> %USERPROFILE%\\.pypirc
- echo password=%PYPIPASSWORD% >> %USERPROFILE%\\.pypirc
# Workaround required to ensure setup.py finds the .pypirc under Windows
- set HOME=%USERPROFILE%
# Install wheel-building support
- "win_build.cmd %PYTHON%\\python.exe -m pip install wheel"
# Deploy a wheel (only actually do this for tags). NB That breaking this line
# with Unix line-endings causes the windows command interpreter to barf so
# this is given as one-line to make this script less fragile when edited on
# other OSes.
- if "%APPVEYOR_REPO_TAG%"=="true" ( win_build.cmd %PYTHON%\\python.exe setup.py bdist_wheel upload ) else ( echo "Not deploying because not a tagged commit." )