Codebase list python-pyproj / upstream/2.3.1+ds .travis.yml
upstream/2.3.1+ds

Tree @upstream/2.3.1+ds (Download .tar.gz)

.travis.yml @upstream/2.3.1+dsraw · history · blame

language: python

sudo: false

cache:
  directories:
    - $PROJ_BASE_DIR
    - $HOME/.cache/pip

env: 
  global: 
    - PROJ_BASE_DIR=$HOME/proj_install
    - CYTHON_COVERAGE=True
    - PROJSOURCE=6.1.1
    # Following generated with
    - WHEELHOUSE_UPLOADER_USERNAME=travis-worker
    # Following generated by
    # travis encrypt -r jswhit/pyproj WHEELHOUSE_UPLOADER_SECRET=<api key>
    - secure: "IoTBjr6e/eBQWtGleP1X36SpocljQxsmJZ+EcVGhJ4v3GZaECLLklKtrWf8DyygFNPFIZ5Tri/C5rPTbuioG6gWtrL8QPgXOK9MI1QZqmfx/kNi0tmH0g9BxL0jlhP8SInZFsfO4m8qJkYJwh3DqBudQhmbDabnMbX2h7hKKTSA="
    # Doctr deploy key for pyproj4/pyproj
    - secure: "V9hQpdQmIOlk/Wvy0NIntlwSI1OvJ12cTrNPBIvwOy86kyPSk4qFj2YMixvcViM235iiCehN+Ray7FIeeHkPVZe9S+zFgVDxFf/RcgBt7tuhLrOoD1AH6pk9/h+z1owZYAboseLU05wv2+T+am0gCz40kES8As7v6bP+xsw69rw="

matrix:
  include:
    - language: cpp
      os: osx
      env:
        - PYTHON=3.6.8
        - PROJSOURCE=6.1.1
    - python: 3.5
      env:
        - PROJSOURCE=6.1.1
    - python: 3.6
      env:
        - PROJSOURCE=6.1.0
    - python: 3.6
      env:
        - PROJSOURCE=6.1.1
    - python: 3.7
      dist: xenial
      env:
        - PROJSOURCE=6.1.1
        - DOC=true
    - python: "nightly"
      env:
        - PROJSOURCE=git
    
  allow_failures:
    - python: "nightly"
      env:
        - PROJSOURCE=git


before_install:
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew update
      brew install sqlite3 wget openssl readline
      # from https://pythonhosted.org/CodeChat/.travis.yml.html
      brew outdated pyenv || brew upgrade pyenv
      # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3
      # doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
      brew install pyenv-virtualenv
      pyenv install $PYTHON
      # I would expect something like ``pyenv init; pyenv local $PYTHON`` or
      # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to
      # modify the Bash environment. ??? So, I hand-set the variables instead.
      export PYENV_VERSION=$PYTHON
      export PATH="/Users/travis/.pyenv/shims:${PATH}"
      pyenv-virtualenv venv
      source venv/bin/activate
      # A manual check that the correct version of Python is running.
      python --version
    else
      sudo apt-get install -qq sqlite3 libsqlite3-dev
    fi
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" && -n "$PYPROJ_OMP" ]]; then
      # install OpenMP not present by default on osx
      brew install libomp

      # enable OpenMP support for Apple-clang
      export CC=/usr/bin/clang
      export CXX=/usr/bin/clang++
      export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
      export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include"
      export CXXFLAGS="$CXXFLAGS -I/usr/local/opt/libomp/include"
      export LDFLAGS="$LDFLAGS -L/usr/local/opt/libomp/lib -lomp"
      export DYLD_LIBRARY_PATH=/usr/local/opt/libomp/lib

      # avoid error due to multiple OpenMP libraries loaded simultaneously
      export KMP_DUPLICATE_LIB_OK=TRUE
    fi
  - echo "PROJSOURCE is $PROJSOURCE"
  # Download external PROJ.4 version and compile if not existing already
  - export PROJ_DIR=$PROJ_BASE_DIR/proj-${PROJSOURCE:0:5}
  - |
    if [ "$PROJSOURCE" = "git" ] || [[ "$PROJSOURCE" != "git" && ! -d "$PROJ_DIR" ]]; then
      ci/travis/proj-dl-and-compile "$PROJSOURCE"
    fi
  - export PROJ_LIB=$PROJ_DIR/share/proj

install:
  # coverage report requires a local install
  - pip install 'pip>=10.0.1'
  - make install-dev
  - pip install coveralls

script:
  - python -c "import pyproj; pyproj.Proj('epsg:4269')"
  - make test-coverage
  # Building and uploading docs with doctr
  - set -e
  - |
    if [ "$DOC" ]; then
      make install-docs
      make docs
      pip install doctr
      if [[ -z "$TRAVIS_TAG" ]]; then
        DEPLOY_DIR=latest;
      else
        DEPLOY_DIR="$TRAVIS_TAG";
      fi
      doctr deploy --build-tags --built-docs docs/_build/html $DEPLOY_DIR
    fi

after_success:
- coveralls

notifications:
  email: false