forked from scikit-image/scikit-image
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
183 lines (171 loc) · 6.22 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# vim ft=yaml
# After changing this file, check it on:
# https://yaml-online-parser.appspot.com/
# See tools/travis/notes.txt for some guidelines
# If this is ever changed to xenial (Ubuntu 16.04), make sure to enable the
# xvfb service
dist: trusty
language: python
cache:
# See https://docs.travis-ci.com/user/caching/#pip-cache
directories:
- $HOME/.cache/pip
- $HOME/.cache/sphinx
- $HOME/.ccache
addons:
apt:
packages:
- ccache
- texlive
- texlive-latex-extra
- dvipng
# this became necessary to use matplotlib and qt5.12
# https://github.com/matplotlib/matplotlib/pull/13412
- qtbase5-dev
stage: Comprehensive tests
stages:
# Do the style check and a single test job, don't proceed if it fails
- name: Initial tests
# Do the rest of the tests
- name: Comprehensive tests
env:
global:
- GH_REF: github.com/scikit-image/docs.git
- secure: "Z8uxAGrFb6yNw/savI7YvA5/BfkVKVGD3HUkDSXamotJAvUKMjIlWnzLc7d9S7PY99FRENgRYaNw4fzZqwJ91hDITcl1/wk6ux1j778O8kUQZayzdqcJG8KpfBsy1vJ4fl4uDGlSmUP413rR3R3dvvgJzIpCLy2qiQR/xujrGvs="
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/1fea29525e8b929dd7c7
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
matrix:
include:
- os: linux
python: 3.6
env: OPTIONAL_DEPS=1 WITH_PYSIDE=1 BUILD_DOCS=1 INSTALL_FROM_SDIST=1
- os: linux
python: 3.6
env: QT=PyQt5 MINIMUM_REQUIREMENTS=1
- os: linux
python: 3.6
env: PYTHONOPTIMIZE=2
- os: linux
python: 3.6
env: QT=PyQt5 OPTIONAL_DEPS=1 MINIMUM_REQUIREMENTS=1
- os: linux
python: 3.7
dist: xenial # Required for Python 3.7+
env: QT=PyQt5 OPTIONAL_DEPS=1 BUILD_DOCS=1 DEPLOY_DOCS=1
services:
- xvfb
- os: linux
python: 3.7
# Testing and installing from sdist will ensure that tests do not
# depend on pooch to pass
# pooch is used as an optional dependency to download datasets on the fly
# users installing scikit-image in development mode do not require
# pooch to run the tests
env: INSTALL_FROM_SDIST=1
dist: xenial # Required for Python 3.7
services:
- xvfb
- os: linux
python: 3.7
stage: Initial tests
dist: xenial # Required for Python 3.7
env: QT=PyQt5 OPTIONAL_DEPS=1 BUILD_DOCS=1
services:
- xvfb
- os: linux
python: 3.8
env: QT=PyQt5 OPTIONAL_DEPS=1 BUILD_DOCS=1
dist: xenial # Required for Python 3.7+
services:
- xvfb
- os: linux
python: 3.7
env: QT=PyQt5 OPTIONAL_DEPS=1 PIP_FLAGS="--pre"
dist: xenial # Required for Python 3.7
services:
- xvfb
# For smooth deployment, the osx_image here should match
# what we set in the wheel generation travis images.
# If not set, it will use the default version from Travis
# https://docs.travis-ci.com/user/reference/osx/#xcode-version
- os: osx
osx_image: xcode9.4
language: objective-c
env: MB_PYTHON_VERSION=3.6
- os: osx
osx_image: xcode9.4
language: objective-c
env: MB_PYTHON_VERSION=3.7 OPTIONAL_DEPS=1 EXTRA_DEPS=0
- os: osx
osx_image: xcode9.4
language: objective-c
# Require pre for scikit-learn 0.22 that has builds for 3.8
env: MB_PYTHON_VERSION=3.8
before_install:
# Remove this line when the Ubuntu image is updated to Xenial
# https://travis-ci.community/t/then-sudo-apt-get-update-failed-public-key-is-not-available-no-pubkey-6b05f25d762e3157-in-ubuntu-xenial/1728/15
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
apt-key adv --list-public-keys --with-colons | grep '^pub' | cut -d':' -f 5 | egrep -o '.{8}$' | grep -wo 762E3157 > /dev/null 2>&1 || sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 762E3157;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
source tools/travis/osx_install.sh;
else
virtualenv -p python ~/venv;
source ~/venv/bin/activate;
fi
- ccache --zero-stats
- export PATH=/usr/lib/ccache:${PATH}
- source tools/travis/before_install.sh
- which python; python --version
- pip list
- tools/build_versions.py
- python setup.py sdist
- SDIST_NAME=dist/`python setup.py --fullname`.tar.gz
- tools/check_sdist.py $SDIST_NAME
install:
- ccache --show-stats
# Test installing without cython using the sdist
# --no-build-isolation ensures even in the presense of a pyproject.toml
# pip will not create a virtual environment, just for building the package
# This is problematic because the version of numpy of that virtual environment
# may be higher than the version we want to test with.
- if [[ $INSTALL_FROM_SDIST ]]; then
pip uninstall cython -y;
pip install dist/scikit-image-*.tar.gz;
else
pip install -vv --no-build-isolation -e .;
fi
# ^^^^ installing in editable mode avoids redownloading the test datasets
# using pooch as our code automatically checks for the data being
# stored in directories adjacent to the source.
#
# installing from SDIST will force the use of pooch as a downloading
# backend to test the pooch functionality
# Install testing requirements
- pip install --retries 3 $PIP_FLAGS -r requirements/test.txt
# Matplotlib settings - do not show figures during doc examples
- export MPL_DIR=`python -c 'import matplotlib; print(matplotlib.get_configdir())'`
- mkdir -p ${MPL_DIR}
- touch ${MPL_DIR}/matplotlibrc
# Install most of the optional packages
- |
if [[ "${OPTIONAL_DEPS}" == "1" ]]; then
pip install --retries 3 -r ./requirements/optional.txt $WHEELHOUSE
if [[ "${EXTRA_DEPS}" != "0" ]]; then
# Extra deps need compilation, and it may not always be possible to
# compile them easily on all platforms
pip install --retries 3 -r ./requirements/extras.txt $WHEELHOUSE
fi
fi
- tools/travis/install_qt.sh
script: tools/travis/script.sh
after_success:
- codecov
# Prepare.release
- doc/release/contribs.py HEAD~10
- bash tools/travis/deploy_docs.sh