Skip to content

Chore/upgrade python 314 #152

Chore/upgrade python 314

Chore/upgrade python 314 #152

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
permissions: read-all
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v3
# Install Rust toolchain
- name: Install Rust toolchain
run: rustup toolchain install stable
# Clippy - Rust linter
- name: Run Clippy
run: |
rustup component add clippy
cargo clippy -- -D warnings
# Install Python dev headers (needed for PyO3)
- name: Install Python dev dependencies
run: sudo apt-get update && sudo apt-get install -y python3-dev python3-venv
# Setup Python virtual environment
- name: Setup Python environment
run: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
# Python linting
- name: Python linting
run: |
source venv/bin/activate
pip install ruff
ruff check .
# Build and test PyO3 extension + Python tests using maturin
- name: Build and test Rust + PyO3
run: |
source venv/bin/activate
pip install maturin
maturin develop --release
maturin test --release
# Optional: build Rust without Python (for pure Rust CI)
- name: Build Rust only
run: cargo build --verbose