Skip to content
Snippets Groups Projects
.travis.yml 2.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • Jason R Laura's avatar
    Jason R Laura committed
    sudo: false
    
    branches:
    only:
      - master
    
    
    Jason R Laura's avatar
    Jason R Laura committed
    env:
      global:
        - BINSTAR_USER: jlaura
      matrix:
        - PYTHON_VERSION: 3.5
    
    
    Jason R Laura's avatar
    Jason R Laura committed
      - linux
      - osx
    
    
    Jason R Laura's avatar
    Jason R Laura committed
    before_install:
    
    install:
      # We do this conditionally because it saves us some downloading if the
      # version is the same.
    
      - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
    
    jlaura's avatar
    jlaura committed
          if [ "$PYTHON_VERSION" == 2.7 ]; then
    
            wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
    
    Jason R Laura's avatar
    Jason R Laura committed
          else
    
            wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
    
    Jason R Laura's avatar
    Jason R Laura committed
          fi
    
    jlaura's avatar
    jlaura committed
          if ["$PYTHON_VERSION" == 2.7]; then
    
    Jason R Laura's avatar
    Jason R Laura committed
            curl -o miniconda.sh  https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh;
    
    Jason R Laura's avatar
    Jason R Laura committed
          else
            curl -o miniconda.sh  https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh;
    
    Jason R Laura's avatar
    Jason R Laura committed
          fi
    
    Jason R Laura's avatar
    Jason R Laura committed
      - bash miniconda.sh -b -p $HOME/miniconda
      - export PATH="$HOME/miniconda/bin:$PATH"
      - hash -r
      - conda config --set always_yes yes --set changeps1 no
      - conda update -q conda
      # Useful for debugging any issues with conda
      - conda info -a
    
    
      # Install not using env because build needs to be in root env
    
      - conda config --add channels conda-forge
      - conda config --add channels jlaura
    
      - conda install python=$PYTHON_VERSION
    
      - conda install -c conda-forge gdal h5py
    
      - conda install pandas sqlalchemy pyyaml networkx
    
    Jason R Laura's avatar
    Jason R Laura committed
      - conda install -c jlaura pvl protobuf
    
    Jason R Laura's avatar
    Jason R Laura committed
    
      # Development installation
    
      - conda install nose coverage sh anaconda-client
    
      - pip install coveralls affine libpysal
    
    Jason R Laura's avatar
    Jason R Laura committed
    
    
      # Straight from the menpo team
      - if [["$TRAVIS_OS_NAME" == "osx"]]; then
          curl -o condaci.py https://raw.githubusercontent.com/menpo/condaci/v0.4.8/condaci.py;
        else
          wget https://raw.githubusercontent.com/menpo/condaci/v0.4.8/condaci.py -O condaci.py;
        fi
      - python condaci.py setup
    
    
    Jason R Laura's avatar
    Jason R Laura committed
    script:
    
      - nosetests --with-coverage --cover-package=plio
    
    Jason R Laura's avatar
    Jason R Laura committed
      # After test success, package and upload to Anaconda
    
      - ~/miniconda/bin/python condaci.py build ./conda
    
    Jason R Laura's avatar
    Jason R Laura committed
    
    after_success:
      - coveralls
    
    notifications:
      webhooks:
        on_success: always
        on_failure: always
        on_start: never
      email:
          recipients:
            - jlaura@usgs.gov
          on_success: always
    
    Jason R Laura's avatar
    Jason R Laura committed
          on_failure: always