Skip to content

Commit

Permalink
Update pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
kulbachcedric committed Dec 25, 2024
1 parent bbd3087 commit b8c161f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 46 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ jobs:
- name: Install Ubuntu dependencies
run: sudo apt-get install graphviz pandoc

- name: Set up Python
uses: actions/setup-python@v2
- name: Install Poetry
uses: snok/install-poetry@v1
with:
python-version: 3.12.8
python-version: 3.12
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y && rustup show
if: matrix.os == 'ubuntu-latest'

- name: Cache Python dependencies
uses: actions/cache@v2
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install .[dev]
path: .venv

- name: Install dependencies with river
run: poetry install --no-interaction
shell: bash

- name: Build docs
run: make doc
run: |
cd benchmarks
poetry run python render.py
mkdocs build
- name: Deploy docs
run: mkdocs gh-deploy --force
53 changes: 25 additions & 28 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Upload Python Package to PyPI when a Release is Created

on:
release:
Expand All @@ -16,24 +8,29 @@ permissions:
contents: read

jobs:
deploy:

pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/deep-river/
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
python setup.py sdist bdist_wheel # Could also be python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit b8c161f

Please sign in to comment.