forked from GeoDaCenter/pygeoda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
166 lines (139 loc) · 4.89 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
image:
- Visual Studio 2019
- Visual Studio 2017
- Visual Studio 2015
# Start builds on tags only (GitHub and BitBucket)
skip_non_tags: false
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# Maximum number of concurrent jobs for the project
max_jobs: 1
environment:
global:
TWINE_USERNAME: "lixun910"
TWINE_PASSWORD:
secure: r1f70+i5UeM8tQYITBMMkQ==
matrix:
- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python39"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "32"
- PYTHON: "C:\\Python39-x64"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "64"
matrix:
fast_finish: true
exclude:
- image: Visual Studio 2019
PYTHON: "C:\\Python35"
- image: Visual Studio 2019
PYTHON: "C:\\Python35-x64"
- image: Visual Studio 2017
PYTHON: "C:\\Python35"
- image: Visual Studio 2017
PYTHON: "C:\\Python35-x64"
- image: Visual Studio 2019
PYTHON: "C:\\Python36"
- image: Visual Studio 2019
PYTHON: "C:\\Python36-x64"
- image: Visual Studio 2015
PYTHON: "C:\\Python36"
- image: Visual Studio 2015
PYTHON: "C:\\Python36-x64"
- image: Visual Studio 2019
PYTHON: "C:\\Python37"
- image: Visual Studio 2019
PYTHON: "C:\\Python37-x64"
- image: Visual Studio 2015
PYTHON: "C:\\Python37"
- image: Visual Studio 2015
PYTHON: "C:\\Python37-x64"
- image: Visual Studio 2019
PYTHON: "C:\\Python38"
- image: Visual Studio 2019
PYTHON: "C:\\Python38-x64"
- image: Visual Studio 2015
PYTHON: "C:\\Python38"
- image: Visual Studio 2015
PYTHON: "C:\\Python38-x64"
- image: Visual Studio 2017
PYTHON: "C:\\Python39"
- image: Visual Studio 2017
PYTHON: "C:\\Python39-x64"
- image: Visual Studio 2015
PYTHON: "C:\\Python39"
- image: Visual Studio 2015
PYTHON: "C:\\Python39-x64"
install:
# note: VS 2010 has stdint.h bundled so simply copy it. Cython should not
# depend on it for py27 (works fine when compiling using C code)
# but this works differently for C++ (maybe there is some other issue
# with environment setup).
# try to do a dirty workaround for Cython with C++ for py27
- ps: >-
if(Test-Path "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h") {
cp "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h" "C:\Users\appveyor\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include\stdint.h"
}
# Prepend Python to the PATH of this build
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
- "python -m pip install --upgrade pip"
# Upgrade setuptools, wheel and virtualenv
- "python -m pip install --upgrade setuptools wheel virtualenv"
# Create new virtual environment and activate it
- "python -m virtualenv venv"
- "venv\\Scripts\\activate"
- "python -c \"import sys; print(sys.executable)\""
build_script:
- "echo $env:APPVEYOR_REPO_TAG"
# checkout submodules
- "git submodule update --init --recursive"
# build wheel
- "cd %APPVEYOR_BUILD_FOLDER%"
- "python setup.py build_ext --inplace"
- "pip wheel -v -w wheelhouse --no-deps ."
test_script:
# install from wheel
- "pip install --no-index --find-links wheelhouse pygeoda"
# run tests against installed package
- "python -m unittest discover -v -s tests -p \"test_*.py\""
artifacts:
# Archive the generated wheel package in the ci.appveyor.com build report.
- path: wheelhouse\*.whl
# deploy wheels to PyPI on tagged commits
deploy_script:
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq 'true') {
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
pip install --upgrade twine
twine upload wheelhouse/*.whl
} else {
Write-Output "Not deploying as this is not a tagged commit"
}