forked from jakirkham/splauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (78 loc) · 2.79 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
language: generic
sudo: true
addons:
hosts:
- travis
hostname: travis
env:
- PYTHON_VERSION="2.7"
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
before_install:
# Get the tag if it wasn't provided. Travis doesn't provide this if it isn't a tagged build.
- if [ -z $TRAVIS_TAG ]; then TRAVIS_TAG=`git tag --contains` ; fi
- echo $TRAVIS_TAG
# Move out of git directory to build root.
- cd ../..
- pwd
install:
# Download and configure conda.
- wget http://repo.continuum.io/miniconda/Miniconda`echo ${PYTHON_VERSION:0:1}`-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes
- conda config --set show_channel_urls True
- conda config --add channels conda-forge
- source activate root
- conda update --all
# Fix root environment to have the correct Python version.
- touch $HOME/miniconda/conda-meta/pinned
- echo "python ${PYTHON_VERSION}.*" >> $HOME/miniconda/conda-meta/pinned
- conda install python=$PYTHON_VERSION
# Install basic conda dependencies.
- conda install conda-build
# Build the conda package for splauncher.
- cd $TRAVIS_REPO_SLUG
- VERSION=`python setup.py --version`
- echo $VERSION
- python setup.py bdist_conda
# Setup environment for splauncher and install it with all dependencies.
- conda create --use-local -n testenv python=$PYTHON_VERSION splauncher==$VERSION
- source activate testenv
# Install DRMAA with Python support.
- .travis_scripts/install_sge.sh
- export SGE_ROOT=/var/lib/gridengine
- export SGE_CELL=default
- export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0
- conda install drmaa
# Install sphinx and friends to build documentation.
- conda install sphinx
- conda install cloud_sptheme
# Install coverage to generate test coverage results.
# Also, install docstring-coverage to get information about documentation coverage.
- conda install nose-timer
- conda install coverage
- conda install docstring-coverage || true
# Clean up downloads as there are quite a few and they waste space/memory.
- sudo apt-get clean
- conda clean -tipsy
- rm -rfv $HOME/.cache/pip
script:
# Clear old coverage.
- coverage erase
# Run tests.
- python setup.py nosetests --with-timer
# Build documentation.
- python setup.py build_sphinx
# Get info on docstring coverage.
- (hash docstring-coverage && docstring-coverage splauncher | tee .docstring-coverage) || true
after_success:
# Workaround for odd coveralls behavior on Python 3.6.
- conda create -y -n dplenv python="3.5" python-coveralls
- source activate dplenv
# Submit results to coveralls.io.
- coveralls
notifications:
email:
- $TO_EMAIL