-
Notifications
You must be signed in to change notification settings - Fork 4
/
appveyor.yml
82 lines (67 loc) · 2.71 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
environment:
global:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "32"
PYTHONPATH: "C:\\Python27"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x"
PYTHON_ARCH: "64"
PYTHONPATH: "C:\\Python27-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
PYTHONPATH: "C:\\Python37"
# allows RDP login to Appveyor when finished
# connection details will be shown
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- cmd: ver
- ps: |
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
# $builds = (Invoke-RestMethod `https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds
# $builds = $builds | Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber)
# if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne $ builds) {
# throw "There are newer queued builds for this pull request, failing early."
# }
$env:PATH = $env:PYTHON + ';' + $env:PYTHON + "\\Scripts;" + $env:PATH
- cmd: python -m pip install --upgrade pip
- cmd: python -m pip install --upgrade setuptools
- cmd: python -m pip install wheel
build_script:
- cmd: python setup.py install bdist_egg bdist_wheel
test_script:
# - cmd: python -m pip install nose
# Run the project tests
- cmd: python tests/__init__.py
artifacts:
# Archive the wheel and agg in the ci.appveyor.com build report.
- path: dist/*.whl
name: wheel
- path: dist/*.egg
name: egg
deploy_script:
- ps: |
# below are 4 environment variables that you can set to allow twine to upload
# these should be set from the appveyor web gui and not in the script. and
# only set them when you are doing a release
# TWINE_USERNAME
# TWINE_PASSWORD
# TWINE_REPOSITORY_URL
# TWINE_CERT
if (Test-Path 'ENV:TWINE_PASSWORD') {
python -m pip install twine
python -m twine upload dist\*
} else {
"Skipping deployment."
}