summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 478d57e0f947ee8e590c4e9ce8b3f40e2a426b52 (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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# 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: 2.7
      env:
      - OPTIONAL_DEPS=1
      - BUILD_DOCS=1
      - DEPLOY_DOCS=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
          - texlive
          - texlive-latex-extra
          - latexmk
    - os: linux
      python: 2.7
      env:
      - OPTIONAL_DEPS=1
      - MINIMUM_REQUIREMENTS=1
      - REPORT_COVERAGE=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: linux
      python: 2.7
      env:
      - OPTIONAL_DEPS=1
      - PIP_FLAGS="--pre"
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: linux
      python: 3.6
      env: OPTIONAL_DEPS=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: linux
      python: 3.6
      env:
      - OPTIONAL_DEPS=1
      - MINIMUM_REQUIREMENTS=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: linux
      python: 3.7-dev
      env:
      - OPTIONAL_DEPS=1
      - MINIMUM_REQUIREMENTS=1
      addons:
        apt:
          packages:
          - libgdal-dev
          - graphviz
    - os: osx
      osx_image: xcode7.3
      language: generic
      env:
      - TRAVIS_PYTHON_VERSION=3.6.0
      - OPTIONAL_DEPS=1
      - OSX_PKG_ENV=miniconda
    - os: osx
      language: generic
      env: TRAVIS_PYTHON_VERSION=3.6
    - python: 2.7
    - python: 3.4
    - python: 3.5
    - python: 3.6
    - python: 3.7-dev
  allow_failures:
    - python: 3.7-dev

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