forked from modflowpy/flopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (81 loc) · 2.61 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
language: python
os: linux
dist: trusty
sudo: required
compiler: gcc
matrix:
include:
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: "3.6-dev"
- python: "nightly"
allow_failures:
- python: "3.6-dev"
- python: "nightly"
cache:
pip: true
directories:
- $HOME/.cache/pip
- $HOME/.local
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gfortran-6
- g++-6
- python-pip
- libhdf5-serial-dev
- netcdf-bin
- libnetcdf-dev
- gdal-bin
- libgdal-dev
env:
global:
- NO_NET=1
# start Virtual X, so default matplotlib backend works
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# command to install dependencies
install:
- if [[ ! -d "$HOME/.local/bin" ]]; then
mkdir "$HOME/.local/bin";
fi
- export PATH="$HOME/.local/bin:$PATH"
- ln -fs /usr/bin/gfortran-6 "$HOME/.local/bin/gfortran" && gfortran --version
- ls -l /usr/bin/gfortran-6
- ln -fs /usr/bin/gcc-6 "$HOME/.local/bin/gcc" && gcc --version
- ls -l /usr/bin/gcc-6
- ln -fs /usr/bin/g++-6 "$HOME/.local/bin/g++" && g++ --version
- ls -l /usr/bin/g++-6
- export CXX="g++"
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]];
then pip install -r requirements2-34.travis.txt;
fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.4 ]];
then pip install -r requirements2-34.travis.txt;
fi
- if [[ $TRAVIS_PYTHON_VERSION > 3.4 ]];
then pip install -r requirements.travis.txt;
fi
- pip install https://github.com/modflowpy/pymake/zipball/master
- pip install --upgrade jupyter
- pip install nbconvert
- pip install nose-timer
- pip install coveralls
# command to run tests
script:
- export PYTHONPATH=$PYTHONPATH:.
- echo python path; python -c "from __future__ import print_function; import sys; print(sys.path)"
- python -c "import os; is_travis = 'TRAVIS' in os.environ; print('TRAVIS {}'.format(is_travis))"
- echo flopy version; python -c "from __future__ import print_function; import flopy; print(flopy.__version__)"
- echo numpy version; python -c "import numpy; print(numpy.version.version)"
- nosetests -v build_exes.py --with-id --with-timer -w ./autotest
- nosetests -v autotest_notebooks.py --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy
- nosetests -v autotest_scripts.py --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy
- nosetests -v --with-id --with-timer -w ./autotest --with-coverage --cover-package=flopy
after_success:
- coveralls