forked from holoviz/geoviews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
138 lines (123 loc) · 4.47 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
language: generic
sudo: false
os:
- linux
cache:
timeout: 300
directories:
- $HOME/miniconda
before_cache:
- rm -rf $HOME/miniconda/pkgs
- rm -rf $HOME/miniconda/conda-bld
- rm -rf $HOME/miniconda/envs/*/conda-bld
env:
global:
- PYENV_VERSION=3.6
- PKG_TEST_PYTHON="--test-python=py36 --test-python=py27"
- CHANS_DEV="-c pyviz/label/dev -c ioam"
- CHANS_REL="-c pyviz -c ioam"
- LABELS_DEV="--label dev"
- LABELS_REL="--label dev --label main"
- MPLBACKEND="Agg"
# quick hack to determine what tag means (improvements welcome)
# release: ^v(\d+|\.)*[^a-z]\d*$
# dev release: ^v(\d+|\.)*[a-z]\d*$
stages:
- test
- name: docs
if: tag =~ ^v(\d+|\.).*$
- name: conda_dev_package
if: tag =~ ^v(\d+|\.)*[a-z]\d*$
- name: pip_dev_package
if: tag =~ ^v(\d+|\.)*[a-z]\d*$
- name: conda_package
if: tag =~ ^v(\d+|\.)*[^a-z]\d*$
- name: pip_package
if: tag =~ ^v(\d+|\.)*[^a-z]\d*$
jobs:
include:
########## DEVELOPER INSTALL ##########
- &default
stage: test
env: DESC="dev test_all_recommended"
before_install:
- pip install pyctdev && doit miniconda_install && pip uninstall -y doit pyctdev
- export PATH="$HOME/miniconda/bin:$PATH" && hash -r
- conda config --set always_yes True
- conda install -c pyviz "pyctdev>=0.5" && doit ecosystem_setup
install:
- doit env_create $CHANS_DEV --python=$PYENV_VERSION
- source activate test-environment
- doit develop_install $CHANS_DEV -o recommended
- doit env_capture
- bokeh sampledata
script:
- geoviews fetch-data --path=examples
- doit test_all_recommended
after_success: coveralls
# python 2 flake checking typically catches python 2 syntax
# errors where python 3's been assumed...
- <<: *default
env: DESC="py2 flakes" PYENV_VERSION=2.7
script: doit test_flakes
########## DOCS ##########
- <<: *default
stage: docs
# not possible to run all examples to build website using only defaults (see setup.py)
env: DESC="docs" CHANS_DEV="-c pyviz/label/dev -c conda-forge" HV_DOC_HTML='true'
script:
- doit develop_install $CHANS_DEV -o doc
- geoviews fetch-data --path=examples
- bokeh sampledata
- nbsite generate-rst --org pyviz --project-name geoviews --offset 0
- nbsite build --what=html --output=builtdocs
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
repo: ioam-docs/geoviews-dev
on:
tags: true
all_branches: true
condition: $TRAVIS_TAG =~ [0-9]+[a-z][0-9]*$
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
repo: ioam-docs/geoviews-release
on:
tags: true
all_branches: true
condition: $TRAVIS_TAG =~ [0-9]+[^a-z][0-9]*$
########## END-USER PACKAGES ##########
- &conda_pkg
<<: *default
stage: conda_dev_package
env: DESC="" TRAVIS_NOCACHE=$TRAVIS_JOB_ID CHANS=$CHANS_DEV LABELS=$LABELS_DEV
install:
- travis_wait 30 doit package_build --recipe=core $CHANS $PKG_TEST_PYTHON --test-group=unit
- travis_wait 30 doit package_build --recipe=recommended $CHANS $PKG_TEST_PYTHON --test-group=examples
script:
- doit package_upload --token=$CONDA_UPLOAD_TOKEN $LABELS --recipe=core
- doit package_upload --token=$CONDA_UPLOAD_TOKEN $LABELS --recipe=recommended
after_failure:
- sleep 10
- <<: *conda_pkg
stage: conda_package
env: DESC="" TRAVIS_NOCACHE=$TRAVIS_JOB_ID CHANS=$CHANS_REL LABELS=$LABELS_REL
# Pip packages are awkward because we use conda for gv's
# dependencies when making the pip package (something pyctdev does
# not support, but could).
- &pip_pkg
<<: *default
stage: pip_dev_package
env: TRAVIS_NOCACHE=$TRAVIS_JOB_ID PYPI=testpypi PYPIUSER=$TPPU PYPIPASS=$TPPP
install:
- doit develop_install $CHANS_DEV -o tests && pip uninstall -y geoviews
- doit pip_on_conda
- doit ecosystem=pip package_build --test-python=py36 --test-group=unit
script: doit ecosystem=pip package_upload -u $PYPIUSER -p $PYPIPASS --pypi=$PYPI
- <<: *pip_pkg
stage: pip_package
env: TRAVIS_NOCACHE=$TRAVIS_JOB_ID PYPI=pypi PYPIUSER=$PPU PYPIPASS=$PPP