summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 1c64ae405dbc9e635c023b9d73adc6d6cc8f6b2a (plain)
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
# After changing this file, check it on:
#   http://lint.travis-ci.org/
#
sudo: false

language: python

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

matrix:
  include:
    - os: linux
      python: 3.7
      dist: xenial
      sudo: true
      env:
      - OPTIONAL_DEPS=1
      - BUILD_DOCS=1
      - DEPLOY_DOCS=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
          - texlive
          - texlive-latex-extra
          - latexmk
    - os: linux
      python: 3.7
      dist: xenial
      sudo: true
      env:
      - OPTIONAL_DEPS=1
      - MINIMUM_REQUIREMENTS=1
      - REPORT_COVERAGE=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: linux
      python: 3.7
      dist: xenial
      sudo: true
      env:
      - OPTIONAL_DEPS=1
      - PIP_FLAGS="--pre"
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: osx
      osx_image: xcode7.3
      language: generic
      env:
      - TRAVIS_PYTHON_VERSION=3.6.1
      - OPTIONAL_DEPS=1
      - OSX_PKG_ENV=miniconda
    - os: osx
      language: generic
      env: TRAVIS_PYTHON_VERSION=3.7
    - python: 3.5
    - python: 3.6
    - python: 3.7
      dist: xenial
      sudo: true

before_install:
  # prepare the system to install prerequisites or dependencies
  - source tools/travis/before_install.sh
  - uname -a
  - printenv
  - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
      source tools/travis/osx_install.sh;
    else
      source tools/travis/linux_install.sh;
    fi

install:
  # install required packages
  - pip install --upgrade pip
  - pip install --retries 3 ${PIP_FLAGS} -r requirements.txt
  - if [[ "${OPTIONAL_DEPS}" == 1 ]]; then
      pip install --retries 3 ${PIP_FLAGS} -r requirements/extras.txt;
    fi
  # install networkx
  - printenv PWD
  - pip install .
  # show what's installed
  - python --version
  - pip list

script:
  - if [[ "${BUILD_DOCS}" == 1 ]]; then
      source tools/travis/build_docs.sh;
    fi
  - source tools/travis/script.sh

after_success:
  - if [[ "${REPORT_COVERAGE}" == 1 ]]; then
      codecov;
    fi
  - if [[ "${BUILD_DOCS}" == 1 && "${DEPLOY_DOCS}" == 1 ]]; then
      source tools/travis/deploy_docs.sh;
    fi

notifications:
  email: false