Skip to content

chore: update to fluvio 0.11.8 #322

chore: update to fluvio 0.11.8

chore: update to fluvio 0.11.8 #322

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} for Python ${{matrix.python-version}}.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest] # TODO: add windows-2019,
python-version: ["38", "39", "310", "311", "312"]
env:
CIBW_SKIP: "cp36-* pp* *-win32"
CIBW_ARCHS_MACOS: x86_64 universal2
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BEFORE_ALL_LINUX: "{package}/tools/cibw_before_all_linux.sh"
CIBW_BUILD_VERBOSITY: 1
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target/
key: ${{ matrix.os }}-cargo-${{matrix.python-version}}-${{ hashFiles('**/Cargo.lock') }}
# Used to host cibuildwheel
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- if: runner.os == 'macOS'
name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
target: aarch64-apple-darwin
toolchain: stable
- if: runner.os != 'Linux'
name: Setup env when not using docker
run: |
python -m pip install --upgrade wheel setuptools setuptools-rust
- if: runner.os == 'Linux'
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: arm64
- name: Build wheels for ${{matrix.python-version}} on ${{matrix.os}}
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: "cp${{matrix.python-version}}-manylinux_x86_64 cp${{matrix.python-version}}-macosx_x86_64 cp${{matrix.python-version}}-macosx_universal2 cp${{matrix.python-version}}-macosx_arm64"
- uses: actions/upload-artifact@v4
with:
name: wheel-${{matrix.python-version}}-${{matrix.os}}
path: ./wheelhouse/*.whl
overwrite: true
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.12"
- name: Install setuptools and setuptools-rust
run: |
python -m pip install --upgrade wheel setuptools setuptools-rust
- name: Build sdist
run: python setup.py bdist_wheel sdist
- uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/*.tar.gz
build_cc_wheels:
name: Cross Build wheels for ${{ matrix.platform.name }}
runs-on: ubuntu-latest
env:
CARGO: cross
strategy:
matrix:
platform:
[
{ name: "linux_armv7l", target: "armv7-unknown-linux-gnueabihf" },
{ name: "linux_armv6l", target: "arm-unknown-linux-gnueabihf" },
{
name: "manylinux2014_aarch64",
target: "aarch64-unknown-linux-gnu",
},
]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target/
key: ${{ matrix.platform.target }}-cargo-${{ matrix.platform.name }}-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: "3.11"
- name: Install Rust ${{ matrix.platform.target }}
uses: dtolnay/rust-toolchain@master
with:
target: ${{ matrix.platform.target }}
toolchain: stable
- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Install setuptools and setuptools-rust
run: |
python -m pip install --upgrade wheel setuptools setuptools-rust
- name: Build cross image
run: |
docker build -f cross/Dockerfile.${{ matrix.platform.target }} -t fluvio-cross-python:${{ matrix.platform.target }} cross
- name: Build bdist
run: python setup.py bdist_wheel --py-limited-api=cp38 --plat-name ${{ matrix.platform.name }}
env:
CARGO_BUILD_TARGET: ${{ matrix.platform.target }}
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.platform.target }}
path: dist/*.whl
overwrite: true
upload_pypi:
needs: [build_wheels, build_sdist, build_cc_wheels]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheel-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.8.11
with:
user: __token__
password: ${{ secrets.PYPI_ACCESS_TOKEN }}
skip_existing: true
build_docs:
name: build static docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build docs
run: |
make docs-build
touch docs/.nojekyll
echo "FLUVIO_PYTHON_CLIENT_VERSION=$(venv/bin/python setup.py --version 2> /dev/null)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: docs
path: docs
publish_docs_to_pages:
needs: [build_docs]
name: push static docs
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
permissions:
contents: write # 'write' access to repository contents
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/download-artifact@v4
with:
name: docs
path: docs-latest
- name: "Git Fetch & Checkout"
run: |
git config --local user.email "team@fluvio.io"
git config --local user.name "Fluvio Authors"
git fetch --all
git checkout -b docs --track origin/docs
git merge -X theirs origin/main -m "Merge remote-tracking branch 'origin/main into docs" --allow-unrelated-histories
- name: Commit files
run: |
git add --force docs
git commit -m "Updated Fluvio Python client docs" -a || true
- name: Push changes
if: github.event_name == 'workflow_dispatch'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: docs