-
Notifications
You must be signed in to change notification settings - Fork 166
/
.travis.yml
139 lines (132 loc) · 4.88 KB
/
.travis.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
sudo: required
matrix:
include:
- os: linux
env: NAME=Linux
# BUILD NOTE:
# Travis treats git tags as if they're branches.
# All branches (with and without a PR) are allowed to be built as
# long as they do NOT match the regex below. Git tags matching the
# regex below are used when we want a deployment to happen.
# The regex is meant to match:
# digit(s).digit(s).digit(s) plus optional additional characters.
if: NOT branch =~ /^\d+\.\d+\.\d+.*$/
python: 2.7
install:
- sudo apt-get install g++-multilib
- sudo -H pip install --upgrade pip
- pip install --user --upgrade setuptools setuptools_scm wheel cython
script:
- python setup.py bdist_wheel
- pip install --user dist/*.whl
- pip uninstall --yes afdko
- os: osx
env: NAME=OSX
# See 'BUILD NOTE' above.
if: NOT branch =~ /^\d+\.\d+\.\d+.*$/
language: generic
install:
- curl -O https://bootstrap.pypa.io/get-pip.py
- python get-pip.py --user
- python -m pip install --user virtualenv
- python -m virtualenv .venv/
- source .venv/bin/activate
- pip install -U -r requirements-dev.txt
before_script:
- export PYTHONPATH=$PYTHONPATH:$(pwd)
- flake8 setup.py
- flake8 tests/*.py
- pushd python/afdko
- flake8 buildcff2vf.py
- flake8 buildmasterotfs.py
- flake8 checkoutlinesufo.py
- flake8 convertfonttocid.py
- flake8 fdkutils.py
- flake8 makeinstancesufo.py
- flake8 makeotf.py
- flake8 otfpdf.py
- flake8 pdfmetrics.py
- flake8 ttfcomponentizer.py
- flake8 ttxn.py
- flake8 ufotools.py
- popd
- 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/spot
- cpplint --recursive --quiet c/tx
- cpplint --recursive --quiet c/type1
script:
- python setup.py bdist_wheel
- deactivate
- export PATH=$PATH:'/Users/travis/Library/Python/2.7/bin'
- python -m pip install --user -U --force-reinstall dist/*.whl
- python -m pip install --user -r requirements-dev.txt
- pytest --cov
- coverage combine
- python -m pip uninstall --yes afdko
after_success:
- codecov
- os: linux
sudo: required
services:
- docker
env:
- NAME=Linux-deploy
- DOCKER_IMAGE=quay.io/pypa/manylinux1_x86_64
- BUILD_DIST=true
# DEPLOYMENT NOTE:
# Deploy only when a git tag matching the regex below is pushed.
# Travis treats git tags as if they're branches.
if: type = push AND branch =~ /^\d+\.\d+\.\d+.*$/
language: python
python: 2.7
# skip default 'install' and 'script' steps: all the work is in
# before_deploy
install: true
script: true
- os: osx
osx_image: xcode6.4
env:
- NAME=OSX-deploy
- BUILD_DIST=true
# See 'DEPLOYMENT NOTE' above.
if: type = push AND branch =~ /^\d+\.\d+\.\d+.*$/
language: generic
cache:
- pip
- directories:
- $HOME/.pyenv_cache
notifications:
slack: typekit:TRAVIS_SLACK_TOKEN
email:
on_success: change
on_failure: always
before_deploy:
- ./.travis/before_deploy.sh
deploy:
# deploy to Github Releases on tags
- provider: releases
api_key:
secure: JYAxvC7A46oY0mmhEknUzJ5iTeLwBWyV0ZnNXlx3t6uhKmmPadxSSkTR4uI87DXfYQBlvNnw+VDHaTeaaaXZOUXmcLn7UIjHsBqdhCGKWMKQ2Z0HpSMvYEUVUezHsLteZvdeL1i4c/q7Iaf2SuNuzOlnNvWomxC24yI/cSzRpqP0wumyXh8Qewod7B5/X2mBO8ICxkEETJBFlwHiWyN8p0lF/aaRIOmujHTqQCBy7xN81rGUcsmY5EaU4ojdwybUaa9e1XRNwwWxO3XOVMsSrlAOb8+PLlegi+LY5vi6e2udVHcRtm/2f0RZuKKjfQ6RMPumqkcCerKE5IdZr2NK0P74HXIrqJ4YX8dSIDk8IVEWgZxiYqBpAtXJvq40V90Mh0atR5318WtcUhPzZftVp5JajU+EU1FmyusNdjnHSYosNKVjCEkwqf3fySLk2uxqiDnyIwMUBsvmewwWCMw0NUOFHyG5uOKqRO4n5NWDnrqaUgcenbB/EZtIE/jrGddW7OgHCVS1jcqcTFK0yfz7X98ej6V1OJqEIwLZe2ZDNTGspcIsP83mtahJFF4lLuyfa5/cN7t/1Gc3rC0qNYa3diMK4gV8K3r1c7yjAy5d3siXspx/2Rb7u7jdbI8JLzWGfuByJj9MuN1RRP7nkqMkxpyDzib4QEG169Lb5Rus+Aw=
skip_cleanup: true
file_glob: true
file: "dist/*"
on:
tags: true
repo: adobe-type-tools/afdko
condition: "$BUILD_DIST == true"
# deploy to PyPI on tags
- provider: script
script: bash ./.travis/deploy.sh
skip_cleanup: true
on:
tags: true
repo: adobe-type-tools/afdko
condition: "$BUILD_DIST == true"