forked from adobe-type-tools/afdko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (78 loc) · 2.49 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
language: python
python: 3.6
env:
global:
- TWINE_USERNAME="adobe-type-tools-ci"
# Note: TWINE_PASSWORD is set in Travis settings
matrix:
fast_finish: true
include:
- os: linux
sudo: required
services: docker
env:
- NAME=Linux
- PIP=pip
- PYTHON=python
- CIBW_BUILD="cp36-manylinux1_x86_64"
- CIBW_BEFORE_BUILD="pip install --disable-pip-version-check -U -q pip"
- os: osx
osx_image: xcode9.4
language: generic
env:
- NAME=OSX
- PIP=pip3
- PYTHON=python3
script:
- |
set -e
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
$PIP install --disable-pip-version-check -U -q pip setuptools wheel pytest
$PYTHON --version
$PIP --version
$PIP list
$PYTHON setup.py bdist_wheel
if [[ -z $TRAVIS_TAG ]]; then
# run the tests only on untagged commits
$PIP install dist/*.whl
pytest
$PIP uninstall --yes afdko
fi
else
if [[ -z $TRAVIS_TAG ]]; then
# run the tests only on untagged commits
export CIBW_TEST_REQUIRES='pytest'
export CIBW_TEST_COMMAND='cd {project} && pytest && pip uninstall --yes afdko'
fi
$PIP install --disable-pip-version-check -U -q pip
$PIP install cibuildwheel
cibuildwheel --output-dir dist
fi
after_success:
# create source distribution
# and deploy to PyPI on tags
- |
if [[ $TRAVIS_TAG ]]; then
$PYTHON -m pip install twine
$PYTHON -m twine upload dist/*.whl
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
$PYTHON setup.py sdist
$PYTHON -m twine upload dist/*.tar.gz
fi
fi
deploy:
# deploy to Github Releases on tags
- provider: releases
api_key:
secure: iTJsPpez3q297UhkRiSMG+y4IDON1Wyr1a1nOcsSbkR2siUI1RV1J1A8hl6yQkUust2XEXj9+VHAGi4NaHZY+VMunsLIW0yhuDLuUvm4toWmDoCQWdNpO3g/+d+cfg6ZvDuUU1YMfbCcG4vOD+qmLOj6IKyzGuvulFJe5Ad4PZ0FNRDjeo0P8vvUSVfAu7ZV80kPLktsXaqCxRdL1gmhpoDzWPBaVrqNrs/rWI595ZxBHDCPSwFknl+vwN2dQoEneC0uxa/4wvoaP0zkYXBsP0XaOB2jdaEgzHzH+4bC1hLsXggYol3MPp04rhL58AMUoRNTAnuhg2H7CZpFmHE4ZxfRr5bVdEVVA66i1a9+tlRlEilKbeWOHuweYMSut5MEdzwgFi0HmgFAmL8uj5nJsi/RmHmbmTUAoCmzNZMGHEq5WTw1zhw5QLs0eTWDzNjF4cHarb5YCZPd8Myu1OO6RKfxIliRnm0sPkzkRKbRNsUWn2XnqyhgqUaZPfaTDANXFnCEZuvWonhsRzMDMEp6MHOLk6T9hFBLn7ZUCwz+n3mORkCyjdvJj5TlQuudVZEfwgPEh+wpPj4sZCoRKT830H5GJ2mFF58vVDkE4NCJKDIsj/F8rC8lVm6gep0eC7wfU+tFPf3JqBoAiNQMQgPlYFOq8gwPQzjB5vYItL8D7gU=
skip_cleanup: true
file_glob: true
file:
- dist/*.whl
- dist/*.tar.gz
prerelease: true
on:
tags: true
notifications:
email:
on_failure: always