/
.appveyor.yml
88 lines (78 loc) · 2.69 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
image: Visual Studio 2017
environment:
TWINE_USERNAME: "afdko-travis"
TWINE_PASSWORD:
secure: myMd6E3niwjGvxEHeChOlg==
matrix:
- PYTHON_HOME: "C:\\Python27"
matrix:
fast_finish: true
# scripts that run after cloning repository
install:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
- set "PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%"
- python -m pip install -U -r requirements-dev.txt
- python -m pip install pytest
# scripts to run before build
before_build:
- flake8 setup.py
- flake8 tests\*.py
- flake8 python\afdko\buildcff2vf.py
- flake8 python\afdko\buildmasterotfs.py
- flake8 python\afdko\checkoutlinesufo.py
- flake8 python\afdko\convertfonttocid.py
- flake8 python\afdko\fdkutils.py
- flake8 python\afdko\makeinstancesufo.py
- flake8 python\afdko\makeotf.py
- flake8 python\afdko\otfpdf.py
- flake8 python\afdko\pdfmetrics.py
- flake8 python\afdko\ttfcomponentizer.py
- flake8 python\afdko\ttxn.py
- flake8 python\afdko\ufotools.py
- cpplint --recursive --quiet c\autohint
- cpplint --recursive --quiet c\detype1
- cpplint --recursive --quiet c\makeotf\makeotf_lib\source
- cpplint --recursive --quiet c\makeotf\makeotf_lib\api
- cpplint --recursive --quiet c\makeotf\makeotf_lib\resource
- cpplint --recursive --quiet c\makeotf\source
- cpplint --recursive --quiet c\mergefonts
- cpplint --recursive --quiet c\public
- cpplint --recursive --quiet c\rotatefont
- cpplint --recursive --quiet c\sfntdiff
- cpplint --recursive --quiet c\sfntedit
- cpplint --recursive --quiet c\spot
- cpplint --recursive --quiet c\tx
- cpplint --recursive --quiet c\type1
# to run your custom scripts instead of automatic MSBuild
build_script:
- python setup.py bdist_wheel
- for %%f in (dist\*.whl) do (set "WHEEL=%%f")
- python -m pip install -U --force-reinstall %WHEEL%
test_script:
- python -m pytest -v
- python -m pip uninstall --yes afdko
artifacts:
# archive the generated packages in the ci.appveyor.com build report
- path: dist\*.whl
name: release_wheel
# Deploy wheel on tags to PyPI
on_success:
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq 'true') {
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
pip install --upgrade twine
twine upload dist\*.whl
} else {
Write-Output "Not deploying as this is not a tagged commit"
}
# Deploy wheel on tags to GitHub
deploy:
provider: GitHub
auth_token:
secure: UyKfsObr/shlpP+0U5Zb3EPvmXt0kyKYu940CFNFdNZ8J7Fu54k415R0UNP78t0j
artifact: release_wheel
draft: false
prerelease: false
on:
branch: $(APPVEYOR_REPO_TAG_NAME)
appveyor_repo_tag: true