packages #68
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: | |
inputs: | |
target: | |
description: Build mode | |
type: choice | |
options: | |
- dryrun | |
required: true | |
default: dryrun | |
schedule: | |
- cron: '0 7 * * SUN' | |
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 conda-forge" | |
PKG_TEST_PYTHON: "--test-python=py37" | |
PYTHON_VERSION: "3.7" | |
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- 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 "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: conda setup | |
run: | | |
conda install -c pyviz "pyctdev>=0.5" | |
doit ecosystem_setup | |
# See: https://github.com/holoviz/panel/pull/4979 | |
conda install -c conda-forge "urllib3<2.0.0" "conda-build==3.24" | |
doit env_create --name test $CHANS_DEV --python=$PYTHON_VERSION | |
- name: env setup | |
run: | | |
conda activate test | |
doit develop_install $CHANS_DEV -o build -o tests | |
pip uninstall -y pyviz_comms | |
- name: build extension | |
run: | | |
conda activate test | |
jlpm | |
jlpm run eslint:check | |
- name: conda build | |
run: | | |
doit package_build $CHANS_DEV $PKG_TEST_PYTHON --no-pkg-tests | |
- name: dev deploy | |
if: (github.event_name == 'push' && (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: main deploy | |
if: (github.event_name == 'push' && !(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 conda-forge" | |
PKG_TEST_PYTHON: "--test-python=py37" | |
PYTHON_VERSION: "3.7" | |
CHANS: "-c pyviz" | |
PPU: ${{ secrets.PPU }} | |
PPP: ${{ secrets.PPP }} | |
PYPI: "https://upload.pypi.org/legacy/" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: "100" | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- 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 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 -o build -o tests | |
pip uninstall -y pyviz_comms | |
doit pip_on_conda | |
- name: build extension | |
run: | | |
conda activate test-environment | |
jlpm | |
jlpm run eslint:check | |
- name: pip build | |
run: | | |
conda activate test-environment | |
doit ecosystem=pip package_build $PKG_TEST_PYTHON --no-pkg-tests | |
- name: pip upload | |
if: github.event_name == 'push' | |
run: | | |
conda activate test-environment | |
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI |