forked from googlefonts/ots-python
/
.appveyor.yml
86 lines (70 loc) · 2.37 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
os: Visual Studio 2015
platform:
- x86
environment:
TOXENV: "py"
TWINE_USERNAME: "anthrotype"
TWINE_PASSWORD:
secure: 9zLozI+1vEqeYX/OmuDcow==
matrix:
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7"
PYTHON_ARCH: "64"
TOX_PYTHON_27: "C:\\Python27-x64\\python.exe"
- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7"
PYTHON_ARCH: "32"
TOX_PYTHON_27: "C:\\Python27\\python.exe"
matrix:
fast_finish: true
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
install:
# checkout git sub-modules
- git submodule update --init --recursive
# prepend newly installed Python to the PATH
- "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 pip to avoid out-of-date warnings
- python -m pip install --disable-pip-version-check --upgrade pip
- pip --version
# install tox to run test suite in a virtual environment
- pip install --upgrade tox
# build wheel from sdist
- tox --sdistonly
- tox -e wheel
# get the full path to the compiled wheel (ugly but works)
- dir /s /b dist\*.whl > wheel.pth
- set /p WHEEL_PATH=<wheel.pth
build: false
test_script:
# run tests on the compiled wheel with current python3 as well as python2.7
- tox --installpkg "%WHEEL_PATH%"
- tox --installpkg "%WHEEL_PATH%" -e py27
on_failure:
# print the content of tox *.log files
- ps: $logdir = ".tox\\log"; `
if(Test-Path -Path $logdir){ `
foreach($logfile in Get-ChildItem $logdir){ `
$logpath = $logdir + "\\" + $logfile; `
Get-Content -path $logpath } `
} `
$envlogdir = ".tox\\" + ${env:TOXENV} + "\\log"; `
foreach($logfile in Get-ChildItem $envlogdir){ `
$logpath = $envlogdir + "\\" + $logfile; `
Get-Content -path $logpath }
on_success:
# Deploy wheels on tags to PyPI
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq 'true') {
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
pip install --upgrade twine
twine upload $env:WHEEL_PATH
} else {
Write-Output "Not deploying as this is not a tagged commit"
}
artifacts:
# archive the generated packages in the ci.appveyor.com build report
- path: dist\*