/
.travis.yml
164 lines (145 loc) · 5.46 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
language: generic
env:
global:
- CHANS_DEV="-c conda-forge -c defaults -c pyviz/label/dev" # this order matters because we're using strict channel priority
- CHANS_REL="-c conda-forge -c defaults -c pyviz" # this order matters because we're using strict channel priority
- LABELS_DEV="--label dev"
- LABELS_REL="--label dev --label main"
- PYENV_VERSION=3.7
- PKG_TEST_PYTHON="--test-python=py36"
- PIN="--pin-deps"
stages:
- name: test_user_install
if: type = cron
- test
- name: package_dev
if: tag =~ ^v(\d+|\.)+[a-z]\d+$
- name: package_release
if: tag =~ ^v(\d+|\.)+[^a-z]\d+$
- name: website_dev
if: (tag =~ ^v(\d+|\.)+[a-z]\d+$) OR (tag = website_dev)
- name: website_release
if: (tag =~ ^v(\d+|\.)+[^a-z]\d+$) OR (tag = website)
- name: unpinned_upcoming_trouble
if: type = cron
- name: website_cron
if: type = cron
# TODO: caching
jobs:
include:
- &default
stage: test
env: DESC="Test examples" OPTIONS="-o graph -o indirect" TEST="all"
os: linux
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/label/dev "pyctdev>=0.5" && doit ecosystem_setup
- conda config --set path_conflict warn
- conda config --set channel_priority strict # this makes the conda solver **way** faster
before_script:
- doit env_create --name=pyviz --python=$PYENV_VERSION
- source activate pyviz
- doit develop_install $CHANS_DEV $OPTIONS -o tests
- pip install msgpack # workaround for unfortunate combination of msgpack vs msgpack-python + no conda develop command + pkg_resources checking what's installed for entrypoints + msgpack/rise conflict via conda; need to investigate
- doit env_capture
script:
- pyviz fetch-data --path=examples --use-test-data
- doit test_$TEST
- pyviz clean-data --path=examples
- <<: *default
env: DESC="Test geo examples" OPTIONS="-o geo" TEST="geo"
- <<: *default
stage: unpinned_upcoming_trouble
env: PIN=
- &package_test
<<: *default
stage: test_user_install
env: DESC="Test conda package on pyviz/label/dev"
before_script:
# TODO: pyctdev should just support this whole section
- mkdir $HOME/tmp && cp tox.ini dodo.py $HOME/tmp && cd $HOME/tmp
- doit test_user_install_part1
- source activate pyviz-tutorial
script: doit test_user_install_part2_conda
- <<: *package_test
env: DESC="Test package on pip"
script: doit test_user_install_part2_pip
- <<: *package_test
os: osx
# travis/osx is not set up like travis/linux
env: PYENV_VERSION=3.6.4
before_install:
- eval "$(pyenv init -)"
- pyenv install $PYENV_VERSION
- &website
<<: *default
stage: website_release
env: DESC="Release website to pyviz.org"
script:
# TODO: set chans according to dev/rel (has to be dev for now because website currently depends on dev)
- doit develop_install $CHANS_DEV -o doc -o geo
- bokeh sampledata
- pyviz fetch-data --path=examples
- nbsite generate-rst --org pyviz --project-name pyviz --offset 1
- nbsite build --what=html --output=builtdocs
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
fqdn: pyviz.org
on:
tags: true
all_branches: true
- <<: *website
stage: website_dev
env: DESC="Deploy dev website to pyviz-dev.github.io/pyviz"
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
repo: pyviz-dev/pyviz
on:
tags: true
all_branches: true
- <<: *website
stage: website_cron
env: DESC="Deploy dev website to pyviz-dev.github.io/pyviz"
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
repo: pyviz-dev/pyviz
on:
all_branches: true
## dev packages
- &pip_pkg
<<: *default
env: PYPI=testpypi PYPIUSER=$TPPU PYPIPASS=$TPPP DESC="Package for pip"
stage: package_dev
before_script:
- doit ecosystem=pip ecosystem_setup
- doit ecosystem=pip package_build $PKG_TEST_PYTHON --test-group=unit --sdist-install-build-deps
script: doit ecosystem=pip package_upload -u $PYPIUSER -p $PYPIPASS --pypi ${PYPI}
- &conda_pkg
<<: *default
stage: package_dev
env: LABELS=$LABELS_DEV CHANS=$CHANS_DEV DESC="Package for conda"
before_script:
- travis_wait 60 doit package_build $CHANS $PKG_TEST_PYTHON --package-name pyviz --test-group=unit
# TODO: is package_test supposed to take --package-name? Seems to work with leftover conda.recipe from build.
- doit package_test $CHANS $PKG_TEST_PYTHON --test-group=examples
script: doit package_upload --token=$ANACONDA_TOKEN $LABELS
## release packages
- <<: *pip_pkg
env: PYPI=pypi PYPIUSER=$PPU PYPIPASS=$PPP
stage: package_release
- <<: *conda_pkg
stage: package_release
env: LABELS=$LABELS_REL CHANS=$CHANS_REL
notifications:
email: false