forked from openstenoproject/plover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
119 lines (113 loc) · 3.2 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
language: generic
matrix:
include:
# Linux / Python 2
- os: linux
env:
- PYTHON=python2
- CACHE_NAME=linux_py2
dist: trusty
sudo: required
# Linux / Python 3
- os: linux
env:
- PYTHON=python3
- CACHE_NAME=linux_py3
dist: trusty
sudo: required
# OSX / Python 3
- os: osx
osx_image: xcode8
env:
- PYTHON=python3
- CACHE_NAME=osx_py3
cache:
directories:
- .cache
before_install:
- |
(
set -ex
# Bootstrap dev environment.
./bootstrap.sh "$PYTHON"
# List installed packages versions.
$PYTHON -m pip list --format=columns
if [ $TRAVIS_OS_NAME = osx ]
then
# The directory containing pyrcc5/pyuic55 is not in $PATH,
# so just use the right Python modules directly.
sed -i '' \
-e 's/"pyrcc5"/"'$PYTHON' -m PyQt5.pyrcc_main"/' \
-e 's/"pyuic5"/"'$PYTHON' -m PyQt5.uic.pyuic"/' \
pyuic.json
fi
)
install: true
script:
- git fetch --quiet --unshallow
- $PYTHON setup.py patch_version
- $PYTHON setup.py test
- |
(
set -ex
# Only generate artifacts if we're actually going to deploy them.
# Note: if we moved this to the `before_deploy` phase, we would
# not have to check, but we'd also lose caching; since the cache
# is stored before the `before_install` phase...
if [ -z "$TRAVIS_TAG" ]
then
exit 0
fi
case "$TRAVIS_OS_NAME" in
osx)
if [ $PYTHON = python3 ]
then
$PYTHON setup.py bdist_dmg
fi
;;
linux)
if [ $PYTHON = python3 ]
then
$PYTHON setup.py bdist_wheel sdist
sudo apt-get install -qq \
libfuse2 \
python3-requests \
libglib2.0-dev \
libx11-dev \
libxmu-dev \
libbz2-dev \
libgdbm-dev \
liblzma-dev \
libncurses5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
zlib1g-dev \
libudev-dev \
libusb-1.0-0-dev \
libdbus-1-dev \
libdbus-glib-1-dev \
;
./linux/appimage.sh -c -j 2 -w dist/*.whl
rm -rf .cache/pip
fi
;;
esac
# Not all builds will produce artifacts.
du -hs dist/* || true
)
deploy:
provider: releases
skip_cleanup: true
api_key:
secure: A3GAXqvj6WKeMnnib53ypyh/o70H4KjF32fMZeUhOW5gUzQkna3+Lkju35paLfE7dWIfIQLWQgMOT7lc/gw8oE2MuSORU3Y8/M4l9/1cfIGWTXHS0I2hI7C8hUi2zBREv7nUB+g6kGdQGsVhZx2oIWrJGzSbjL8rit57C3E+Mc+J7UULZjQ7GYqCkLNNRJpkpUcCuCVBSYG+50ZDT/swCAHgpLAGs+xlxGG9MV7fP9AR2sB3dzhvtnHuVe+nHtaYglayGtnLcfqVg3ztw3WMHbadr11OuYBl3CdT5f6MlZjCCG4Trb5x+tynLtb4qC4tSXI2wgw8s6P1p7Iv89kWkP42ZC/N2Y/trvr6cVnCLFnT4Fm24I/cdM5vQopufdst0lJn53OHkNefwkZIS0U/rTMWRJHYvKEORxPNYOcJEvbsA9OmneNWscSy8pz3pzvSd9zaDdk8D8dFdEvnJGl0UwzYya6pEnly0iWkZkPg6fC7e0TtS84FffQOoBorlIh+ZViQ4dD3MRb6lsNDSo+hhOP46HcTbFYg56NwYQ5kFruXL1DWT/wWlTDJ8FZKgj5AtFRVMOvrxOfSXXBdU+auTLzy0sVJFTEpwT7MmvLtR738aNewXa2momcB/N+6Lp1xQ+w6+0qkW9+/hAOKfJ7cLGjswsi8lpARWMtpxNdAphg=
draft: true
file_glob: true
file:
- "dist/*.AppImage"
- "dist/*.dmg"
- "dist/*.egg"
- "dist/*.tar.gz"
- "dist/*.whl"
on:
tags: true