Skip to content

Commit

Permalink
Add doc and build workflows to GitHub Actions (#568)
Browse files Browse the repository at this point in the history
* Add doc and build workflows to GitHub Actions

* Remove .travis.yml
  • Loading branch information
philippjfr authored Mar 3, 2021
1 parent 0d2291e commit 4b6ac13
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 153 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'

jobs:
conda_build:
name: Build Conda Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
PKG_TEST_PYTHON: "--test-python=py37 --test-python=py27"
PYTHON_VERSION: "3.7"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "100"
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
- name: conda build
run: doit package_build $CHANS_DEV $PKG_TEST_PYTHON --test-group=unit
- name: conda dev upload
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev
- name: conda main upload
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main
pip_build:
name: Build PyPI Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
PKG_TEST_PYTHON: "--test-python=py37 --test-python=py27"
PYTHON_VERSION: "3.7"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
PPU: ${{ secrets.PPU }}
PPP: ${{ secrets.PPP }}
PYPI: "https://upload.pypi.org/legacy/"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "100"
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create $CHANS_DEV --python=$PYTHON_VERSION
- name: env setup
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit develop_install $CHANS_DEV -o unit_tests
doit pip_on_conda
- name: pip build
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_build
- name: pip upload
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI
85 changes: 85 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: docs
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'

jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
env:
DESC: "Documentation build"
CHANS_DEV: "-c pyviz/label/dev -c bokeh -c conda-forge"
MPLBACKEND: "Agg"
MOZ_HEADLESS: 1
DISPLAY: ":99.0"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "100"
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create ${{ env.CHANS_DEV}} --python=3.7
- name: doit develop_install
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda list
doit develop_install ${{ env.CHANS_DEV}} -o doc -o examples
pip install sphinxcontrib-napoleon
- name: bokeh sampledata
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
bokeh sampledata
- name: generate rst
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
nbsite generate-rst --org holoviz --project-name hvplot
- name: build docs
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
nbsite build --what=html --output=builtdocs --org holoviz --project-name hvplot
cp -r ./panel/dist ./builtdocs/panel_dist
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v3
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: pyviz-dev/hvplot
publish_dir: ./builtdocs
force_orphan: true
- name: Deploy main
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./builtdocs
cname: hvplot.holoviz.org
force_orphan: true
153 changes: 0 additions & 153 deletions .travis.yml

This file was deleted.

0 comments on commit 4b6ac13

Please sign in to comment.