-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy path.travis.yml
53 lines (47 loc) · 2.03 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
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
env:
global:
secure: "MhW7gICzNIUwodMqpkVrpLQjGbkP/dpsBJu6GJZl/lobs0LmzSV9iFEXamG48Tmbxtfgf1pcciu0b6xCnuAeLpcoe0dvOC5+MF5HOwqanmQMbqi9tJduzzFEn9UUySUcdochG62lMtg1g1dR3f0T3q0JaX4a0axMOTC7d/AK6og="
before_install:
# Unfortunately necessary for now (Jan 2016). It slows down the builds quite a bit.
# See here for more details: https://github.com/travis-ci/travis-ci/issues/5221
- sudo apt-get update
- sudo apt-get install -qq gfortran
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes conda
- conda create --yes -n condaenv python=$TRAVIS_PYTHON_VERSION
- conda install --yes -n condaenv pip
- source activate condaenv
# The next couple lines fix a crash with multiprocessing on Travis and are not specific to using Miniconda
- sudo rm -rf /dev/shm
- sudo ln -s /run/shm /dev/shm
- conda install --yes numpy python=$TRAVIS_PYTHON_VERSION
# Matplotlib + ObsPy is only required for the documentation - only Python 3.5 builds that.
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then conda install -c conda-forge --yes matplotlib scipy sphinx obspy; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then pip install alabaster ; fi
- pip install flake8 # Make sure this is up-to-date (don't use conda).
- pip install coveralls
install:
- git version
- git fetch origin --tags --unshallow
- git remote add mtspec git://github.com/krischer/mtspec.git
- git fetch mtspec --tags
- git status
- pip install --no-deps -v -e .
- git status
script:
- coverage run --source=mtspec -m mtspec.tests
# Docs only need to be built once.
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then cd $TRAVIS_BUILD_DIR/doc; make html ; fi
after_success:
- cd $TRAVIS_BUILD_DIR; coveralls
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then bash $TRAVIS_BUILD_DIR/.travis-update-gh-pages.sh ; fi