Skip to content

build(deps): Remove unused dependencies #190

build(deps): Remove unused dependencies

build(deps): Remove unused dependencies #190

Workflow file for this run

# This file is autogenerated by maturin v1.8.2
# To update, run
#
# maturin generate-ci github
#
name: CI
on:
push:
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
style:
name: style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Style check
run: cargo fmt --all -- --check
- name: Clippy check
run: cargo clippy --all-targets --all-features
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: ${{ matrix.platform.target }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
- name: Set up virtual environment
run: |
uv venv
source .venv/bin/activate
- name: Install dependencies
run: |
uv pip install maturin pytest pytest-asyncio
- name: Build wheels
run: |
source .venv/bin/activate
maturin develop --uv
- name: Run tests
run: |
source .venv/bin/activate
pytest
manylinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-20.04
target: x86_64
apt_packages: ''
custom_env: {}
- runner: ubuntu-20.04
target: x86
apt_packages: crossbuild-essential-i386
custom_env:
CC: i686-linux-gnu-gcc
CXX: i686-linux-gnu-g++
CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER: i686-linux-gnu-g++
- runner: ubuntu-20.04
target: aarch64
apt_packages: crossbuild-essential-arm64
custom_env:
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-g++
- runner: ubuntu-20.04
target: armv7
apt_packages: crossbuild-essential-armhf
custom_env:
CC: arm-linux-gnueabihf-gcc
CXX: arm-linux-gnueabihf-g++
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-g++
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "13.0"
- name: Install target-specific APT dependencies
if: "matrix.platform.apt_packages != ''"
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.platform.apt_packages }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: ${{ matrix.platform.target == 'x86_64' && '--release --out dist --zig' || '--release --out dist' }}
sccache: 'false'
manylinux: auto
container: 'off'
env: ${{ matrix.platform.custom_env }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist
musllinux:
runs-on: ${{ matrix.platform.runner }}
environment: MuslLinux
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64-unknown-linux-musl
- runner: ubuntu-22.04
target: aarch64-unknown-linux-musl
- runner: ubuntu-22.04
target: armv7-unknown-linux-musleabihf
- runner: ubuntu-22.04
target: i686-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- name: Build wheels
run:
bash .github/musl_build.sh ${{ matrix.platform.target }}
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: dist
windows:
runs-on: ${{ matrix.platform.runner }}
environment: Windows
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
python-architecture: x64
- runner: windows-latest
target: x86
python-architecture: x86
- runner: windows-latest
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: ${{ matrix.platform.python-architecture || 'x64' }}
- name: Install NASM
run: |
choco install nasm -y
shell: cmd
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist
macos:
runs-on: ${{ matrix.platform.runner }}
environment: MacOS
strategy:
matrix:
platform:
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [manylinux, musllinux, windows, macos, sdist, tests, style]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: 'wheels-*/*'
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
- name: Upload binaries to GitHub Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.CR_PAT }}
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
generate_release_notes: true