Skip to content

Commit

Permalink
Merge branch 'main' into remove_deprecated_features_at_futurewarning
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Nov 14, 2024
2 parents 803a911 + 71e8e47 commit 289bbc6
Show file tree
Hide file tree
Showing 18 changed files with 739 additions and 315 deletions.
162 changes: 111 additions & 51 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,141 @@ 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]+'
- "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 13 * * SUN'
- cron: "0 13 * * SUN"

defaults:
run:
shell: bash -e {0}

env:
PYTHON_VERSION: "3.11"
PACKAGE: "param"

jobs:
waiting_room:
name: Waiting Room
runs-on: ubuntu-latest
needs: [conda_build, pip_install]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
environment:
name: publish
steps:
- run: echo "All builds have finished, have been approved, and ready to publish"

pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_lock@v0

conda_build:
name: Build Conda Packages
runs-on: 'ubuntu-latest'
name: Build Conda
needs: [pixi_lock]
runs-on: "ubuntu-latest"
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
with:
environments: "build"
download-data: false
install: false
- name: conda build
run: pixi run -e build build-conda
- uses: actions/upload-artifact@v4
if: always()
with:
name: conda
path: dist/*.tar.bz2
if-no-files-found: error

conda_publish:
name: Publish Conda
runs-on: ubuntu-latest
needs: [conda_build, waiting_room]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev"
PKG_TEST_PYTHON: "--test-python=py37"
PYTHON_VERSION: "3.9"
CHANS: "-c pyviz"
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
- uses: actions/download-artifact@v4
with:
python-version: "3.9"
name: conda
path: dist/
- name: Set environment variables
run: |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "CONDA_FILE=$(ls dist/*.conda)" >> $GITHUB_ENV
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
channel: "conda-forge"
- name: conda setup
run: |
conda update --name base conda
conda install anaconda-client conda-build
pip install hatch
- name: conda build
run: |
VERSION=`hatch version` conda build conda.recipe/
conda install -y anaconda-client
- name: conda dev upload
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: contains(env.TAG, 'a') || contains(env.TAG, 'b') || contains(env.TAG, 'rc')
run: |
anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label=dev $(VERSION=`hatch version` conda build --output conda.recipe)
anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev $CONDA_FILE
- name: conda main upload
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
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 $(VERSION=`hatch version` conda build --output conda.recipe)
anaconda --token ${{ secrets.CONDA_UPLOAD_TOKEN }} upload --user pyviz --label=dev --label=main $CONDA_FILE
pip_build:
name: Build PyPI Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
name: Build PyPI
needs: [pixi_lock]
runs-on: "ubuntu-latest"
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
with:
environments: "build"
download-data: false
install: false
- name: Build package
run: pixi run -e build build-pip
- uses: actions/upload-artifact@v4
if: always()
with:
name: pip
path: dist/
if-no-files-found: error

pip_install:
name: Install PyPI
runs-on: "ubuntu-latest"
needs: [pip_build]
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: env setup
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: pip build
run: |
python -m build
- name: Publish package to PyPI
if: github.event_name == 'push'
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/download-artifact@v4
with:
name: pip
path: dist/
- name: Install package
run: python -m pip install dist/*.whl
- name: Import package
run: python -c "import $PACKAGE; print($PACKAGE.__version__)"

pip_publish:
name: Publish PyPI
runs-on: ubuntu-latest
needs: [pip_build, waiting_room]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: pip
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PPU }}
password: ${{ secrets.PPP }}
packages_dir: dist/
repository-url: "https://upload.pypi.org/legacy/"
77 changes: 49 additions & 28 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,71 @@ 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]+'
- "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]+"
workflow_dispatch:
inputs:
target:
description: 'Site to build and deploy'
description: "Site to build and deploy"
type: choice
options:
- dev
- main
- dryrun
- dev
- main
- dryrun
required: true
default: dryrun
schedule:
- cron: '0 13 * * SUN'
- cron: "0 13 * * SUN"

defaults:
run:
shell: bash -e {0}

env:
DISPLAY: ":99.0"

jobs:
build_docs:
name: Documentation
runs-on: 'ubuntu-latest'
pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_lock@v0

docs_build:
name: Build Documentation
needs: [pixi_lock]
runs-on: "ubuntu-latest"
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
with:
environments: docs
- name: Build documentation
run: pixi run -e docs docs-build
- uses: actions/upload-artifact@v4
if: always()
with:
python-version: '3.9'
name: docs
if-no-files-found: error
path: builtdocs
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: graphviz
run: sudo apt install graphviz graphviz-dev
- name: env setup
run: |
python -m pip install --upgrade pip
python -m pip install hatch
- name: build docs
run: hatch -v run docs:build

docs_publish:
name: Publish Documentation
runs-on: "ubuntu-latest"
needs: [docs_build]
steps:
- uses: actions/download-artifact@v4
with:
name: docs
path: builtdocs/
- name: Set output
id: vars
run: echo "tag=${{ needs.docs_build.outputs.tag }}" >> $GITHUB_OUTPUT
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v4
if: |
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/nightly_lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: nightly_lock
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"

env:
PACKAGE: "param"

jobs:
pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_lock@v0
- name: Upload lock-file to S3
if: '!github.event.pull_request.head.repo.fork'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "eu-west-1"
run: |
zip $(date +%Y-%m-%d).zip pixi.lock pixi.toml
aws s3 cp ./$(date +%Y-%m-%d).zip s3://assets.holoviz.org/lock/$PACKAGE/
Loading

0 comments on commit 289bbc6

Please sign in to comment.