Skip to content

packages

packages #167

Workflow file for this run

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 18 * * 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 bokeh -c conda-forge -c nodefaults"
PKG_TEST_PYTHON: "--test-python=py39"
PYTHON_VERSION: "3.9"
MPLBACKEND: "Agg"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
steps:
- name: remove nodejs
run: |
sudo rm /usr/local/bin/node
sudo rm /usr/local/bin/npm
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- uses: actions/setup-node@v3
with:
node-version: 16.x
- 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 config --set always_yes True
conda install -n base conda-libmamba-solver
conda install -n test conda-libmamba-solver
conda config --set solver libmamba
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
conda install -c conda-forge "urllib3<2.0.0" "conda-build==3.24"
- name: conda build
run: |
doit package_build --recipe=core $CHANS_DEV $PKG_TEST_PYTHON --test-group=simple
doit package_build --recipe=recommended $CHANS_DEV $PKG_TEST_PYTHON --test-group=simple
- name: npm setup
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_API_TOKEN }}" > $HOME/.npmrc
npm whoami
npm -v
- 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 --recipe=core
doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --recipe=recommended
- 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 --recipe=core
doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main --recipe=recommended
- name: create env
run: |
doit env_create $CHANS_DEV --python=$PYTHON_VERSION
- name: build js
run: |
eval "$(conda shell.bash hook)"
conda install -n test-environment conda-libmamba-solver
conda activate test-environment
doit develop_install $CHANS_DEV -o build
python setup.py develop
- name: npm 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: |
cd ./geoviews
npm publish --tag dev --access public
- name: npm 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: |
cd ./geoviews
npm publish --tag latest
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 -c conda-forge"
PKG_TEST_PYTHON: "--test-python=py39"
PYTHON_VERSION: "3.9"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
PPU: ${{ secrets.PPU }}
PPP: ${{ secrets.PPP }}
PYPI: "https://upload.pypi.org/legacy/"
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
steps:
- name: remove nodejs
run: |
sudo rm /usr/local/bin/node
sudo rm /usr/local/bin/npm
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- uses: actions/setup-node@v3
with:
node-version: 16.x
- 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 build
doit pip_on_conda
- name: pip build
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_build $PKG_TEST_PYTHON --test-group=simple
- name: git status
run: |
git status
git diff
- name: pip upload
if: github.event_name == 'push'
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI