packages #181
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]+' | |
# Dry-run only | |
workflow_dispatch: | |
schedule: | |
- cron: '0 14 * * SUN' | |
env: | |
PYTHON_VERSION: "3.9" | |
MPLBACKEND: "Agg" | |
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable" | |
jobs: | |
conda_build: | |
name: Build Conda Package | |
runs-on: 'ubuntu-latest' | |
defaults: | |
run: | |
shell: bash -el {0} | |
outputs: | |
conda_file: ${{ env.CONDA_FILE }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Fetch unshallow | |
run: git fetch --prune --tags --unshallow -f | |
- name: conda setup | |
run: | | |
# pyct is for running setup.py | |
conda install -y conda-build build pyct -c pyviz/label/dev | |
- name: conda build | |
run: | | |
source ./scripts/build_conda.sh | |
echo "CONDA_FILE="$CONDA_PREFIX/conda-bld/noarch/holoviews-$VERSION-py_0.tar.bz2"" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: conda_build | |
path: ${{ env.CONDA_FILE }} | |
if-no-files-found: error | |
conda_publish: | |
name: Publish Conda Package | |
runs-on: ubuntu-latest | |
needs: conda_build | |
# if: startsWith(github.ref, 'refs/tags/') | |
env: | |
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }} | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Set environment variables | |
run: | | |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo "CONDA_FILE=${{ needs.conda_build.outputs.conda_file }}" >> $GITHUB_ENV | |
- name: Check environment variables | |
run: | | |
echo $TAG $CONDA_FILE | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: conda setup | |
run: | | |
conda install -y anaconda-client | |
- uses: actions/download-artifact@v3 | |
with: | |
name: conda_build | |
path: ${{ env.CONDA_FILE }} | |
- name: conda dev upload | |
if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc') | |
run: | | |
# anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev ${{ env.CONDA_FILE }} | |
echo "conda dev upload" | |
- name: conda main upload | |
if: (!(contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc'))) | |
run: | | |
# anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev --label=main ${{ env.CONDA_FILE }} | |
echo conda main upload | |
pip_build: | |
name: Build PyPI Package | |
runs-on: 'ubuntu-latest' | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CHANS_DEV: "-c pyviz/label/dev -c bokeh" | |
PKG_TEST_PYTHON: "--test-python=py39" | |
CHANS: "-c pyviz" | |
PPU: ${{ secrets.PPU }} | |
PPP: ${{ secrets.PPP }} | |
PYPI: "https://upload.pypi.org/legacy/" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: "latest" | |
python-version: 3.9 | |
- name: Fetch unshallow | |
run: git fetch --prune --tags --unshallow -f | |
- name: conda setup | |
run: | | |
conda install -c pyviz "pyctdev>=0.5" | |
doit ecosystem_setup | |
doit env_create $CHANS_DEV --python=$PYTHON_VERSION | |
- name: env setup | |
run: | | |
conda activate test-environment | |
doit develop_install $CHANS_DEV | |
pip uninstall -y holoviews | |
doit pip_on_conda | |
- name: doit env_capture | |
run: | | |
conda activate test-environment | |
doit env_capture | |
- name: pip build | |
run: | | |
conda activate test-environment | |
doit ecosystem=pip package_build --test-group=simple | |
- name: pip upload | |
if: github.event_name == 'push' | |
run: | | |
conda activate test-environment | |
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI |