Skip to content

fix installation of servofetch #43

fix installation of servofetch

fix installation of servofetch #43

Workflow file for this run

name: Build and Release to PyPI
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
lint-and-test:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: '3.13'
- name: Init venv
run: uv venv --python 3.13
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libev-dev
- name: Install dependencies
run: uv sync --group dev
- name: Run ruff linting
run: uv run --group dev ruff check src examples
- name: Run mypy type checking
run: uv run --group dev mypy src
- name: Run tests
run: uv run --group dev pytest -o "anyio_mode=auto"
build-wheels:
name: Build wheels
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build wheel
run: python -m build --wheel
- name: Check package
run: twine check dist/*
- name: Upload wheel artifacts
uses: actions/upload-artifact@v7
with:
name: wheel
path: dist/*.whl
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build sdist
run: python -m build --sdist
- name: Check package
run: twine check dist/*
- name: Upload sdist artifacts
uses: actions/upload-artifact@v7
with:
name: sdist
path: dist/*.tar.gz
upload-to-release:
name: Upload to GitHub Release
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: dist/
merge-multiple: true
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: dist/*
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-to-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
environment:
name: pypi
url: https://pypi.org/p/silkworm-rs
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: dist/
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1