build(deps): bump fluvio from v0.12.1 to v0.14.0 #1106
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: CI | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: [staging, trying] | |
pull_request: | |
branches: [main] | |
jobs: | |
ci_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: ["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: | |
targets: aarch64-apple-darwin, x86_64-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: | |
platforms: all | |
- name: Build wheels for ${{matrix.python-version}} on ${{matrix.os}} | |
uses: pypa/[email protected] | |
env: | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
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" | |
ci_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.12" | |
- 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 }} | |
check_fmt: | |
name: check formatting | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
python-version: ["3.12"] | |
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') }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: check fmt, flake8 and black | |
run: make lint | |
- name: Verify Docs generate | |
run: | | |
make docs-build | |
smoke_test: | |
name: Smoke test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
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') }} | |
- name: Install rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# - uses: AbsaOSS/k3d-action@v2 | |
# name: "Create fluvio k3d Cluster" | |
# with: | |
# cluster-name: "fluvio" | |
# - name: Sleep 20 to ensure k3d cluster is ready | |
# run: sleep 20 | |
# - name: Install Fluvio Cluster on k3d | |
# uses: infinyon/fluvio@master | |
# with: | |
# cluster-type: k3d | |
# version: stable | |
- name: Install local Fluvio Cluster | |
uses: infinyon/fluvio@master | |
with: | |
cluster-type: local | |
version: stable | |
- name: Check Fluvio Installation | |
run: | | |
fluvio version | |
fluvio topic list | |
fluvio topic create foobar | |
sleep 3 | |
echo foo | fluvio produce foobar | |
fluvio consume foobar -B -d | |
- name: Build | |
run: | | |
make build-dev | |
- name: Test | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
command: make integration-tests | |
env: | |
FLV_SOCKET_WAIT: 300 | |
macos_simple_tests: | |
name: MacOS Simple test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest] | |
rust: [stable] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install rust ${{ matrix.rust }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build | |
run: | | |
make build-dev | |
- name: Test macOS failing to connect | |
run: | | |
make macos-ci-tests | |
done: | |
name: Done | |
needs: | |
- macos_simple_tests | |
- smoke_test | |
- check_fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Done | |
run: echo "Done!" |