forked from adobe-type-tools/afdko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
66 lines (57 loc) · 1.98 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
image: Visual Studio 2017
environment:
global:
TWINE_USERNAME: adobe-type-tools-ci
# Note: TWINE_PASSWORD is set in AppVeyor settings
PYTHON_HOME: C:\Python36-x64
matrix:
fast_finish: true
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# scripts that run after cloning repository
install:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
- SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\Scripts;%PATH%
- python --version
- python -c "import struct; print(struct.calcsize('P') * 8)"
- python -m pip install --disable-pip-version-check -U -q pip setuptools wheel pytest
- python -m pip --version
- python -m pip list
# to run your custom scripts instead of automatic MSBuild
build_script:
- python setup.py bdist_wheel || EXIT /B 1
test_script:
# run the tests only on untagged commits
- ps: >-
if ($env:APPVEYOR_REPO_TAG -ne "true") {
$WHEEL = Resolve-Path "dist\*.whl" | Select -ExpandProperty Path
if ($WHEEL -eq $null) { echo "ERROR: Wheel file not found."; exit 1 }
python -m pip install $WHEEL
if ($LastExitCode -ne 0) { exit $LastExitCode }
python -m pytest
if ($LastExitCode -ne 0) { exit $LastExitCode }
python -m pip uninstall --yes afdko
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
artifacts:
# archive the generated packages in the ci.appveyor.com build report
- path: dist\*.whl
name: Wheels
on_success:
# deploy wheels to PyPI on tags
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
python -m pip install twine
python -m twine upload dist/*.whl
}
deploy:
# deploy wheels to GitHub on tags
provider: GitHub
auth_token:
secure: gphVmCqGEPVTMMEJt3OJbUPUaFl7ALwWN+cJjyxW80+Z3ZpWbq0eUxs5naCcmNiT
artifact: Wheels
draft: false
prerelease: true
on:
appveyor_repo_tag: true