-
Notifications
You must be signed in to change notification settings - Fork 50
/
.travis.yml
52 lines (52 loc) · 2.76 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
language: python
env:
global:
# AWS keys (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY)
# Encrypt them with:
# >>> travis encrypt -r losonczylab/sima AWS_ACCESS_KEY_ID=XXX
- secure: "d11jBVK35Zhnd8mmhUJMl1ySyUogP2lYqMZVUz5+Cj4NXL3D4T1JolrB0PjJ/p/0udZeJsn4yJcejZQzre2iUxjTdXhHBGuvkEyWnHaNMZNT8+/hwv4wnlY55Wrj6qds5BvWk++9qyRoWJS/OlON7Hu3lQC4gSpjwN2q3D1AgyU="
- secure: "TTIONuS+F5U7mFsX/PQKgMzFlKHmhyNXv8DdLS8RJYmNjli71L0b9CLW4HH4OVAHh2eB+cEdZwxu1lJrttMDUpbDWqsqFUylAqqWHlbIJDlJPmzJhM/kAnsA1SJGHHW4QO75776t1+Rw5wzJGgZ5QrqarI0TShlHVX4HnnU08T8="
matrix:
include:
- os: linux
python: 2.7
env: TOKENV=py27 TESTMODE=full COVERAGE=--coverage DOCTESTS=--doctests
- os: linux
python: 3.4
env: TOKENV=py34 TESTMODE=full COVERAGE=--coverage DOCTESTS=""
- os: osx
osx_image: xcode8.3
language: generic
env: TOKENV=py27 TESTMODE=full COVERAGE=--coverage DOCTESTS=--doctests
- os: osx
osx_image: xcode8.3
language: generic
env: TOKENV=py35 TESTMODE=full COVERAGE=--coverage DOCTESTS=--doctests
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source .linux_build.sh $TOKENV $TESTMODE;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source .osx_build.sh $TOKENV; fi
script:
- flake8 --version --config=.flake8
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then python runtests.py $DOCTESTS -m $TESTMODE
$COVERAGE; fi
# Build is failing within runtests.py on OSX/py2, skip for now (May 2018)
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOKENV" == "py27" ]]; then python runtests.py
# $DOCTESTS -m $TESTMODE $COVERAGE; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOKENV" == "py35" ]]; then python3 runtests.py
$DOCTESTS -m $TESTMODE $COVERAGE; fi
branches:
only:
- master
- 0.3.x
- 1.0.x
- 1.1.x
- 1.3.x
after_success:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then if [ "${TESTMODE}" == "full" ];
then cp build/test/.coverage . && coveralls; fi; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install wheel && python setup.py bdist_wheel; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOKENV" == "py27" ]]; then pip2 install wheel && python setup.py bdist_wheel; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$TOKENV" == "py35" ]]; then pip3 install wheel && python3 setup.py bdist_wheel; fi
- if [[ "$TRAVIS_REPO_SLUG" == "losonczylab/sima" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_OS_NAME" == "osx" && "$TOKENV" == "py35" ]]; then pip3 install awscli && aws s3 cp dist s3://losonczylab.sima/${TRAVIS_OS_NAME}_${TOKENV} --recursive; fi
- if [[ "$TRAVIS_REPO_SLUG" == "losonczylab/sima" ]] && [[ "$TRAVIS_PULL_REQUEST" == "false" ]] && [[ "$TRAVIS_OS_NAME" != "osx" || "$TOKENV" != "py35" ]]; then pip install awscli && aws s3 cp dist s3://losonczylab.sima/${TRAVIS_OS_NAME}_${TOKENV} --recursive; fi