forked from schriftgestalt/psautohint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
104 lines (83 loc) · 2.67 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
cache:
- '%LOCALAPPDATA%\pip\Cache'
environment:
global:
TWINE_USERNAME: "adobe-type-tools-ci"
# TWINE_PASSWORD is set in Appveyor settings
TOXENV: "py-cov"
matrix:
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
TOXENV: "py-cov-tx"
# - PYTHON: "C:\\Python36"
# PYTHON_VERSION: "3.6"
# PYTHON_ARCH: "32"
# - PYTHON: "C:\\Python37"
# PYTHON_VERSION: "3.7"
# PYTHON_ARCH: "32"
# - PYTHON: "C:\\Python27-x64"
# PYTHON_VERSION: "2.7"
# PYTHON_ARCH: "64"
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7"
PYTHON_ARCH: "64"
matrix:
fast_finish: true
branches:
only:
- master
# We want to build wip/* branches since these are not usually used for PRs
- /^wip\/.*$/
# We want to build version tags as well.
- /^v\d+\.\d+.*$/
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
install:
# checkout git sub-modules
- git submodule update --init --recursive
# install required python version if not present, and prepend to the PATH
- ps: multibuild\install_python.ps1
- 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
- python -m pip --version
# install tox
- python -m pip install -r dev-requirements.txt
# build psautohint wheel
- tox -e wheel
# get the full path to the compiled wheel (ugly but works)
- dir /s /b dist\psautohint*.whl > wheel.pth
- set /p WHEEL_PATH=<wheel.pth
build: false
test_script:
# run tests on the compiled wheel
- tox --installpkg "%WHEEL_PATH%"
on_success:
# upload test coverage to codecov.io
- tox -e codecov
# if commit is tagged, upload wheel 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"
}
on_failure:
# print the content of tox *.log files
- ps: Get-Content .tox\\log\\*.log
- ps: $envlogdir = ".tox\\" + ${env:TOXENV} + "\\log"; `
foreach($logfile in Get-ChildItem $envlogdir){ `
$logpath = $envlogdir + "\\" + $logfile; `
Get-Content -path $logpath }
artifacts:
# archive the generated packages in the ci.appveyor.com build report
- path: dist\*.whl