forked from networkx/networkx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
146 lines (128 loc) · 4.59 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# After changing this file, check it on:
# http://lint.travis-ci.org/
#
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
matrix:
fast_finish: true
include:
- python: "pypy"
env: PYTHON_VM=pypy OPTIONAL_DEPS=no
- python: "3.4"
env: PYTHON_VM=cpython OPTIONAL_DEPS=source
- python: "2.7"
env: PYTHON_VM=ipy OPTIONAL_DEPS=no
allow_failures:
- env: PYTHON_VM=ipy OPTIONAL_DEPS=no
- env: PYTHON_VM=cpython OPTIONAL_DEPS=source
env:
global:
# Install from wheels *only*.
- PIPINSTALL="pip install -v --use-wheel --no-index --find-links=http://sunpy.cadair.com/wheelhouse/"
- NXOPTDEPS=""
matrix:
- PYTHON_VM=cpython OPTIONAL_DEPS=pip
- PYTHON_VM=cpython OPTIONAL_DEPS=no
before_install:
### Prepare the system to install prerequisites or dependencies
- uname -a
- printenv
- sudo apt-get update -qq
- if [[ "${PYTHON_VM}" != ipy ]]; then
pip install --upgrade setuptools;
pip install --upgrade pip;
pip install wheel;
pip --version;
else
sudo apt-get install -qq mono-devel;
pushd ..;
curl -L -o /tmp/IronPython-2.7.5b2.zip "http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=ironpython&DownloadId=815751&FileTime=130455203824130000&Build=20919";
unzip /tmp/IronPython-2.7.5b2.zip;
curl -L -o /tmp/decorator-3.4.0.tar.gz https://pypi.python.org/packages/source/d/decorator/decorator-3.4.0.tar.gz;
pushd /tmp;
tar xf decorator-3.4.0.tar.gz;
popd;
cp /tmp/decorator-3.4.0/src/decorator.py IronPython-2.7.5b2/Lib;
curl -L -o /tmp/nose-1.3.3.tar.gz https://pypi.python.org/packages/source/n/nose/nose-1.3.3.tar.gz;
pushd /tmp;
tar xf nose-1.3.3.tar.gz;
popd;
cp -R /tmp/nose-1.3.3/nose IronPython-2.7.5b2/Lib;
popd;
fi
install:
### Install any prerequisites or dependencies necessary to run the build.
# Skipping pydot (not 3.x compatible)
# Skipping gdal (errors during pip installs)
- if [[ "${OPTIONAL_DEPS}" =~ pip|source ]]; then
sudo apt-get install graphviz libsuitesparse-dev;
fi
- if [[ "${TRAVIS_PYTHON_VERSION}${OPTIONAL_DEPS}" =~ 2\..(pip|source) ]]; then
pip install pygraphviz;
fi
- if [ "${OPTIONAL_DEPS}" == "pip" ]; then
pip install --use-wheel pyyaml pyparsing;
$PIPINSTALL numpy scipy matplotlib Cython;
fi
# Try to install latest and greatest from source.
- if [ "${OPTIONAL_DEPS}" == "source" ]; then
sudo apt-get install -qq libatlas-dev libatlas-base-dev liblapack-dev gfortran;
pip install --upgrade pyyaml pyparsing numpy scipy matplotlib Cython;
fi
# Install stuff that depends on Cython.
- if [[ "${OPTIONAL_DEPS}" =~ pip|source ]]; then
pip install scikits.sparse;
fi
before_script:
### Use this to prepare your build for testing
- if [[ "${PYTHON_VM}" != ipy ]]; then
pip install --upgrade nose coverage coveralls;
fi
script:
- printenv PWD
- if [[ "${PYTHON_VM}" != ipy ]]; then
pip install .;
export NX_INSTALL=`pip show networkx | grep Location | awk '{print $2"/networkx"}'`;
fi
# nose 1.3.0 does not tell coverage to only cover the requested
# package (except during the report). So to restrict coverage, we must
# inform coverage through the .coveragerc file.
- if [[ "${PYTHON_VM}" != ipy ]]; then
cp .coveragerc $NX_INSTALL;
cp setup.cfg $NX_INSTALL;
fi
# Move to new directory so that networkx is not imported from repository.
# Why? Because we want the tests to make sure that NetworkX was installed
# correctly. Example: setup.py might not have included some submodules.
# Testing from the git repository cannot catch a mistake like that.
#
# Export current directory for logs.
- if [[ "${PYTHON_VM}" != ipy ]]; then
cd $NX_INSTALL;
printenv PWD;
fi
# Run nosetests.
- if [[ "${PYTHON_VM}" != ipy ]]; then
nosetests --verbosity=2 --with-coverage --cover-package=networkx;
else
mono ../IronPython-2.7.5b2/ipy.exe -X:ExceptionDetail -X:FullFrames -c 'from nose import main; main()' \--verbosity=2;
fi
after_success:
# We must run coveralls from the git repo. But we ran tests from the
# installed directory. The .coverage file looks like it contains absolute
# paths, but coveralls does not seem to care.
#
# Report coverage for 2.7 and 3.4 only.
- if [[ "${PYTHON_VM}" != ipy ]]; then
cp .coverage $TRAVIS_BUILD_DIR;
cd $TRAVIS_BUILD_DIR;
if [[ "${TRAVIS_PYTHON_VERSION}${OPTIONAL_DEPS}" =~ 2\.7pip|3\.4source ]]; then
coveralls;
fi;
fi
notifications:
email: false