-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
115 lines (101 loc) · 3.52 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
git:
depth: 100
language: generic
addons:
apt:
packages:
- libzstd1
env:
global:
- PYENV_VERSION=3.7.1
- PYTHON_VERSION=3.6
- PKG_TEST_PYTHON="--test-python=py36"
- CHANS_DEV="-c pyviz/label/earthsim -c pyviz/label/dev -c defaults -c erdc -c conda-forge -c aquaveo"
- CHANS_REL="-c pyviz -c defaults -c erdc -c conda-forge -c aquaveo"
- MPLBACKEND="Agg"
- LABELS_DEV="--label dev"
- LABELS_REL="--label dev --label main"
notifications:
email:
on_failure: change # [always|never|change] default: always
stages:
- test
- name: user_install
if: type = cron
- name: doc
if: tag =~ ^v(\d+|\.)+.*$ # match dev or release tags
- name: conda_dev_package
if: tag =~ ^v(\d+|\.)+[a-z]\d+$
- name: conda_package
if: tag =~ ^v(\d+|\.)+[^a-z]\d+$
_osx_config: &_osx_config
os: osx
osx_image: xcode10.1
env: PYENV_VERSION=3.7.1
before_install:
# set up python
- eval "$(pyenv init -)"
- pyenv install $PYENV_VERSION
# check the below still required
# brew-installed geos interferes with cartopy?
- brew uninstall --ignore-dependencies geos gdal postgis
- 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
- conda config --set path_conflict warn
- conda config --set restore_free_channel true
jobs:
include:
########## TEST USER INSTALL ##########
- &default
stage: test
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
- conda config --set path_conflict warn
install:
- travis_wait 20 doit env_create $CHANS_DEV --name=earthsim --python=$PYTHON_VERSION
- source activate earthsim
- doit develop_install $CHANS_DEV -o tests
- doit env_capture
script:
- python -m earthsim fetch-data --path=examples
- travis_wait 60 doit test_all
after_failure:
- sleep 10
- <<: *default
<<: *_osx_config
########## END-USER PACKAGES ##########
- &conda_pkg
<<: *default
stage: conda_dev_package
env: DESC="" TRAVIS_NOCACHE=$TRAVIS_JOB_ID LABELS=$LABELS_DEV CHANS=$CHANS_DEV
install:
- doit package_build $CHANS --no-pkg-tests
script: doit package_upload --token=$CONDA_UPLOAD_TOKEN $LABELS
## release packages
- <<: *conda_pkg
stage: conda_package
env: DESC="" TRAVIS_NOCACHE=$TRAVIS_JOB_ID LABELS=$LABELS_REL CHANS=$CHANS_REL
########## DOCS ##########
- <<: *default
stage: doc
env: HV_DOC_HTML="true" DESC="docs"
script:
- conda install -c pyviz -c conda-forge nbsite=0.6.1 sphinx_holoviz_theme
- mkdir examples/assets
- python -m earthsim fetch-data --path=examples
- nbsite generate-rst --org pyviz --project-name earthsim --offset 0 --skip '^.*Workflow.*$' --skip '^.*Sweep.*$' --skip '^.*Batched.*$' --skip '^.Specifying.*$'
- travis_wait 60 nbsite build --what=html --output=builtdocs
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
fqdn: earthsim.pyviz.org
on:
tags: true
all_branches: true