-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
116 lines (106 loc) · 4.21 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
#*******************************************************************************
#.travis.yml
#*******************************************************************************
#Purpose:
#Travis CI is a hosted continuous integration service, that is, it allows
#running code directly from a repository and checking that the code acts as
#expected. The purpose of the .travis.yml file is to give instructions to Travis
#CI on how to do the work.
#Authors:
#Alan D. Snow, 2016, based on initial .yml file by Cedric H. David
#*******************************************************************************
#System specifications for Travis CI
#*******************************************************************************
language: c
os:
- linux
- osx
env:
- TRAVIS_PYTHON_VERSION="2.7"
- TRAVIS_PYTHON_VERSION="3.5"
- TRAVIS_PYTHON_VERSION="3.6"
matrix:
fast_finish: true
allow_failures:
- os: osx
notifications:
email: false
#*******************************************************************************
#Before installing RAPIDpy
#*******************************************************************************
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get update -qq;
sudo apt-get install -y g++ gfortran;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install gcc;
fi
#-------------------------------------------------------------------------------
#Add miniconda - from https://gist.github.com/dan-blanchard/7045057
#-----------------------------------------------------------------------------
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda${TRAVIS_PYTHON_VERSION:0:1}-latest-MacOSX-x86_64.sh;
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes conda python
#create environment in conda
- conda create --yes --name rapid python=$TRAVIS_PYTHON_VERSION
- source activate rapid
#-----------------------------------------------------------------------------
# Install required python packages
#-----------------------------------------------------------------------------
- conda config --add channels conda-forge
- conda install --yes cmake gdal future netcdf4 numpy pandas pangaea pyproj pytz requests rtree scipy shapely
- source deactivate rapid
#-------------------------------------------------------------------------------
#Creating directory for installation of libraries used by RAPID & RAPIDpy
#-------------------------------------------------------------------------------
- export INSTALLZ_DIR=$TRAVIS_BUILD_DIR/installz
- mkdir $INSTALLZ_DIR
#-------------------------------------------------------------------------------
#Installing RAPID
#-------------------------------------------------------------------------------
- cd $TRAVIS_BUILD_DIR/..
- git clone https://github.com/c-h-david/rapid.git --branch 20161221
- cd rapid
# Installing RAPID Prereqs
- bash rapid_install_prereqs.sh -i=$INSTALLZ_DIR
- source rapid_specify_varpath.sh $INSTALLZ_DIR
# Building RAPID
- cd src
- make rapid
#-------------------------------------------------------------------------------
#Installing TauDEM
#-------------------------------------------------------------------------------
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd $TRAVIS_BUILD_DIR/.. ;
git clone https://github.com/dtarb/TauDEM.git ;
cd TauDEM/src ;
rm makefile ;
source activate rapid ;
cmake . ;
make ;
fi
#*******************************************************************************
#Installing RAPIDpy
#*******************************************************************************
install:
- cd $TRAVIS_BUILD_DIR
- pip install -e .[tests]
#*******************************************************************************
#Testing RAPIDpy
#*******************************************************************************
script:
- py.test --cov-report term-missing --cov=RAPIDpy
- flake8 RAPIDpy
- pylint RAPIDpy
##ADD Coveralls stats for code coverage
after_success:
- coveralls