/
appveyor.yml
90 lines (79 loc) · 3.76 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
# validation page for appveyor config: https://ci.appveyor.com/tools/validate-yaml
# we are not building Visual Studio project, so default build step is off
build: off
# encrypting data done here: https://ci.appveyor.com/tools/encrypt
environment:
PYPIPASS:
secure: GgEHENWgbfFj3Y3ESLvQqfHXKyp2BPy65U8B21ACBOw57Yv/epOgh8bp5tsi4PUa9ZkAIRW8m4GZx5HHm4q36zkXZZaZUZYV3qMRNpoGe/EweEdg8dqjW5wAGQ/bDQgVgfbWzg9o2KwuSFd+j1wLcKEc4ZMcKZvgOQlQQXqVKNB3VpeZftjI14ss1QPFgY4TLpa+bfaH1xHVCT/BKAy7y8wKBfZBvpb4xWOyOKaRKDa1+NOxS8TGYRBThWK6R9/gvXvh9ySzFwUbjCbHdcpK/w==
PYPIUSER: __token__
matrix:
- platform: x64
PYTHON: "C:\\Python36-x64"
- platform: x64
PYTHON: "C:\\Python37-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
PYTHON: "C:\\Python38-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
PYTHON: "C:\\Python39-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
PYTHON: "C:\\Python310-x64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
platform: x64
PYTHON: "C:\\Python311-x64"
init:
# check python version for default and target python version
- "%PYTHON%\\python.exe -V"
- python -V
# check 32 or 64 bit for default python
- python -c "import struct;print(8 * struct.calcsize('P'))"
install:
# 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.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# Prepend Python to the PATH of this build, Appveyor does not do anything special
# to put the Python version you want to use on PATH.
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# check python version (default and target) to ensure PATH setting was successful
- "%PYTHON%\\python.exe -V"
- python -V
# check pip version (default and target), as above
- pip -V
- python -m pip -V
- "%PYTHON%\\python.exe -m pip -V"
# check 32 or 64 bit of target python
- python -c "import struct;print(8 * struct.calcsize('P'))"
# install usual requirements
- python -m pip install --upgrade virtualenv pip setuptools wheel
- python -m pip install --upgrade -r requirements.txt
# check numpy & scipy versions
- python -c "import numpy as np;print(np.version.version)"
# check python and pip versions
- python -V
- python -m pip -V
test_script:
# make wheel package
- python -m pip install wheel
- python setup.py bdist_wheel
# clean build directory
- rd /s /q build
# remove source directory, to be sure that we use only wheel package for testing
- rd /s /q pytrip
- del setup.py
# install wheel package via pip, as we do not know the wheel filename in advance, we loop over all *.whl files in dist directory
- ps: cd C:\ ; Get-ChildItem -Path C:\projects\pytrip\dist\ -Recurse -Include *.whl | foreach-object { echo $_ | Out-Host ; pip install $_}
- cd C:\\projects\\pytrip\
# deploy package
- bash appveyor\deploy_package.sh
# debugging RDP connection, uncomment to enable
# more details here: https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))