forked from kivy/pyobjus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (66 loc) · 2.28 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
sudo: required
matrix:
fast_finish: true
include:
- language: generic
env: RUN=unit PY=2 HOMEBREW_NO_AUTO_UPDATE=1
os: osx
- language: generic
env: RUN=unit PY=3 HOMEBREW_NO_AUTO_UPDATE=1
os: osx
- language: generic
env: RUN=sdist PY=3 HOMEBREW_NO_AUTO_UPDATE=1
os: osx
before_install:
- echo PATH=$PATH;
# uninstall old GNUpg, install new one and add Brew
# 'Cellar' folder to the path (contains binaries)
- brew uninstall gnupg
- brew install gnupg2
- sudo ln -sv /usr/local/Cellar/gnupg /usr/local/Cellar/gpg || true
- sudo ln -sv /usr/local/Cellar/gnupg /usr/local/Cellar/gpg2 || true
- export PATH=$PATH:/usr/local/Cellar
# https://github.com/travis-ci/travis-ci/issues/6307
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- rvm get head
# use real branch name instead of detached HEAD unless PR
- if [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then
git checkout $TRAVIS_BRANCH;
fi;
install:
# get Py3 because it's not present in any OSX image on Travis
- if [ "${PY}" == "3" ]; then
py3pkg=python-3.5.4rc1-macosx10.6.pkg;
curl -O -L https://www.python.org/ftp/python/3.5.4/$py3pkg;
sudo installer -package $py3pkg -target /;
fi;
# manual get-pip.py on OSX because TLS1.2+ required
# pyfound.blogspot.com/2017/01/time-to-upgrade-your-python-tls-v12.html
# and install to virtualenv
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- if [ "${PY}" == "3" ]; then
sudo python3 get-pip.py;
else
sudo python get-pip.py;
fi;
- if [ "${PY}" == "3" ]; then
pip3 install --user virtualenv;
python3 -m virtualenv env;
else
pip install --user virtualenv;
python -m virtualenv env;
fi;
- source env/bin/activate;
- pip install --upgrade cython pytest
script:
- make test_lib
- make
- make tests
- if [ "$RUN" == "sdist" ]; then
if [ "$PYOBJUS_DEPLOY" == "1" ]; then
git clean -dxf --exclude=env;
pip install requests[security] twine;
python setup_sdist.py sdist;
python -m twine upload dist/*;
fi;
fi;