sudo: false
language: python
# quick hack to determine what tag is (improvements welcomed)
# release: ^v(\d+|\.)+[^a-z]\d+$
# dev release: ^v(\d+|\.)+[a-z]\d+$
stages:
- lint
- test
- name: pip_dev_package
if: tag =~ ^v(\d+|\.)+[a-z]\d+$
- name: pip_package
if: tag =~ ^v(\d+|\.)+[^a-z]\d+$
- name: conda_dev_package
if: tag =~ ^v(\d+|\.)+[a-z]\d+$
- name: conda_package
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
jobs:
fast_finish: true
include:
- &default
stage: test
python: 3.6
env: TOX_ENV=py36
install:
- pip install tox
script:
- tox -e $TOX_ENV
- <<: *default
python: 3.7-dev
env: TOX_ENV=py37
- <<: *default
python: 3.5
env: TOX_ENV=py35
- <<: *default
python: 3.4
env: TOX_ENV=py34
- <<: *default
python: 2.7
env: TOX_ENV=py27
- <<: *default
python: pypy
env: TOX_ENV=pypy
# could consider running with_ipython,numpy over py36 and 27
- <<: *default
env: TOX_ENV=with_ipython
- <<: *default
env: TOX_ENV=with_numpy
- <<: *default
env: TOX_ENV=with_pandas
- <<: *default
env: TOX_ENV=coverage
- <<: *default
stage: lint
env: TOX_ENV=flakes
# TODO: the below packaging sections will be simplified with
# doit/pyct (and note that using after_success means no alert to
# failure uploading)
- &conda_default
env: LABELS="--label dev"
stage: conda_dev_package
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no
- conda update conda
- conda install anaconda-client conda-build
script:
- conda build conda.recipe/
after_success:
- anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz $LABELS $(conda build --output conda.recipe)
- <<: *conda_default
env: LABELS="--label dev --label main"
stage: conda_package
- <<: *default
stage: pip_dev_package
deploy:
provider: pypi
server: https://test.pypi.org/legacy/
distributions: "sdist bdist_wheel"
on:
tags: true
user: $TESTPYPI_USER
password: $TESTPYPI_PWD
- <<: *default
stage: pip_package
deploy:
provider: pypi
distributions: "sdist bdist_wheel"
on:
tags: true
user: $PYPI_USER
password: $PYPI_PWD
- &website
<<: *default
addons:
apt:
packages:
- graphviz
stage: website_release
before_install:
- pip install graphviz
install:
- pip install nbsite sphinx_ioam_theme "tornado<6"
- pip install -e .
script:
# TODO: nbsite commands will be simplified eventually...
- nbsite generate-rst --org pyviz --repo param --project-name param
- mkdir doc/Reference_Manual && nbsite_generate_modules.py param -d ./doc/Reference_Manual -n param -e tests
- nbsite build --examples-assets=''
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
fqdn: param.pyviz.org
on:
tags: true
all_branches: true
- <<: *website
stage: website_dev
env: DESC="pyviz-dev.github.io/param"
deploy:
- provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: ./builtdocs
repo: pyviz-dev/param
on:
tags: true
all_branches: true