forked from PrincetonUniversity/PsyNeuLink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (87 loc) · 2.72 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
branches:
only:
- master
- devel
- /devel-.*/
- /travis.*/
- /ci-.*/
language: shell
os:
- linux
- osx
dist: bionic
env:
jobs:
- PYTHON=3.8.1
- PYTHON=3.7.6
- PYTHON=3.6.8
global:
- PYTHONWARNINGS="ignore::DeprecationWarning"
- PIP_PROGRESS_BAR="off"
- COVERALLS_PARALLEL=true
# Cache downloaded(built) python packages
# and homebrew downloads
cache:
directories:
- $HOME/.cache/pip
- $HOME/Library/Caches/Homebrew
- $HOME/Library/Caches/pip
addons:
apt:
packages:
- graphviz
before_install:
- |
# Homebrew doesn't provide older python versions.
# Install it manually from python.org
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
# Pytorch is not available for python 3.8 yet
if [ ${PYTHON%.*} == "3.8" ]; then
sed -i.bak '/torch/d' requirements.txt
fi
# homebrew plugin is not working correctly
# https://travis-ci.community/t/xcode-8-3-homebrew-outdated-error/3798
HOMEBREW_NO_AUTO_UPDATE=1 brew install graphviz
FILE=python-$PYTHON-macosx10.9.pkg
if [ ! -f $HOME/Library/Caches/$FILE ]; then
curl -# https://www.python.org/ftp/python/$PYTHON/$FILE -o $HOME/Library/Caches/$FILE
fi
sudo installer -pkg $HOME/Library/Caches/$FILE -target /
python3 --version
python3 -m pip --version
# Deploy new virtualenv to match travis setup
echo "Deploying new python venv"
python3 -m venv $HOME/venv
fi
- |
# Install venv on Linux using Ubuntu distributed python
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
# distutils and lib2to3 are only needed for python3.8
# https://bugs.launchpad.net/ubuntu/+source/python3.8/+bug/1851684
sudo apt-get install -y python${PYTHON%.*}-dev python${PYTHON%.*}-venv python3-distutils python3-lib2to3
python${PYTHON%.*} -m venv $HOME/venv
# Provide fake xdg-open
echo "#!/bin/sh" > $HOME/venv/bin/xdg-open
chmod +x $HOME/venv/bin/xdg-open
fi
# The rest of the setup is common for all environments
- source $HOME/venv/bin/activate
- python --version
- pip install -U pip
- pip --version
- |
# Install undeclared dependencies
if [ "x$EXTRA_PIP" != "x" ]; then
pip install $EXTRA_PIP
fi
install:
- pip install coveralls
- pip install git+https://github.com/benureau/leabra.git@master
- pip install -e .[dev]
script:
- if [ "x$RUN_COV" != "x" ] ; then echo "Running with coverage"; export COV_ARGS="--cov=psyneulink"; else echo "Running without coverage"; export COV_ARGS=""; fi
- pytest -n auto --strict-markers -p no:logging $COV_ARGS
after_script:
- if [ "x$RUN_COV" != "x" ] ; then coveralls; fi
notifications:
webhooks: https://coveralls.io/webhook