-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
107 lines (103 loc) · 3.84 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
language: python
matrix:
include:
- os: linux
python: 3.6
- os: linux
dist: xenial
python: 3.7
env: SYNCRYPT_DEPLOY=true
- os: linux
dist: xenial
python: 3.8
- os: osx
sudo: required
language: generic
# This will build OS X 10.11 instead of default 10.12.
# We need this to get builds running on older OS X versions.
osx_image: xcode7.3
env: PYTHON_VERSION=3.6.5
- os: osx
sudo: required
language: generic
# This will build OS X 10.11 instead of default 10.12.
# We need this to get builds running on older OS X versions.
osx_image: xcode7.3
env: PYTHON_VERSION=3.7.1 SYNCRYPT_DEPLOY=true
- os: osx
sudo: required
language: generic
# This will build OS X 10.11 instead of default 10.12.
# We need this to get builds running on older OS X versions.
osx_image: xcode7.3
env: PYTHON_VERSION=3.8.0
addons:
apt:
packages:
- libsnappy-dev
# command to install dependencies
# Manually install python on osx
install: |
# Receive tags so that our versioning works correctly
git fetch --unshallow --tags
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew update >/dev/null;
brew install snappy;
brew upgrade pyenv;
PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install $PYTHON_VERSION;
pyenv local $PYTHON_VERSION;
pyenv global $PYTHON_VERSION;
$(pyenv root)/shims/python -m venv venv;
./venv/bin/pip install 'setuptools>=38.5'
./venv/bin/pip install -e '.'
./venv/bin/pip install -e '.[dist]'
./venv/bin/pip install -e '.[test]'
./venv/bin/pip install --upgrade 'git+git://github.com/gorakhargosh/watchdog@17b3c30c4a2c420b450a6612ee995c4e1bb441e8'
else
pip install 'setuptools>=38.5'
pip install -e '.'
pip install -e '.[dist]'
pip install -e '.[test]'
fi
before_script:
- |
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
./venv/bin/mypy syncrypt tests scripts/syncrypt_daemon
else
mypy syncrypt tests scripts/syncrypt_daemon
fi
#- pylint syncrypt scripts
- |
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
./venv/bin/py.test -m 'not (requires_server or external_resources)'
else
py.test -m 'not (requires_server or external_resources)'
fi
# command to build, do not build on python 3.8 because pyinstaller doesn't support it yet
script:
- |
if [ ! "$TRAVIS_PYTHON_VERSION" == "3.8" ] && [ ! "$PYTHON_VERSION" == "3.8.0" ]; then
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
PYINSTALLER=./venv/bin/pyinstaller ./venv/bin/python setup.py dist;
else
python setup.py dist;
fi
./dist/syncrypt-bin --help;
./dist/syncrypt_daemon -h;
if [[ "$SYNCRYPT_DEPLOY" == "true" ]]; then
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
BRANCH=$TRAVIS_BRANCH ./venv/bin/python setup.py deploy
else
BRANCH=$TRAVIS_BRANCH python setup.py deploy
fi
fi
fi
deploy:
- provider: pypi
user: lordi
password:
secure: Tuf6fL62LvkmDfYWmdPH1VMLBV0mNeBWcEJJcQd1VN4vtQnFsmq9eU1CB9tAajpazBTNQBj9gfgcdBSBbT5Wg9rcSGbNFXlWEDxvTdVokpRzByCQNR2NEbGuoQF4pcSD8VSTO6blVDM+XVccSSMIzJJbINulZFiveNgZj3lWMa8B+AqTr+ACuekeU5V1VfkmJ1pWVhwnJ4kj75dsRV7BFtZrGoA5UsuVu4tEUDbUQYuMEOEDbFJ2/uka8KvKcaoFvs5kToiohSH0t+umtnXZe3T+S6Xdn9bw97yyAEwE+7U1UlqXj+uOvtjvtFs+Ai1F40MEVGd2GjC7H5NP4HknrKl+k1VhYEyjCV8SvXBryEvrYYjgYmAET2dMu+AmsOzGcjwV4TT7YhQ0F75aZb8HKnJOX7/UQeUSNhBZIw5NBnrDyPf+5t+FrUJdjtALxrMlhM5nEjm9rCYwo2r+f6+dKiibg9uVej+RbesTJNBHBorbzZBe5B7EFadmfUTRM74cH02OTm8PvaCfrp9jDNfQ3WombUqwSyQIm+EX83BC89sws+ixcmcnVXJLwaK+y8JP+0zpe7YinesvV5rfntH6WBBjVNAVYbi2LIbEfcRMAHe29tKvf+nRcS5KtWCtqJol+w5NxpHcjWYF60xuesjiS6KjneZAoCstJJbyXfc+8+4=
on:
tags: true
condition: |
( $TRAVIS_PYTHON_VERSION == '3.6' ) && ( $TRAVIS_OS_NAME == 'linux' )