Skip to content

fix(python): enable PyO3 generate-import-lib for Windows wheels #483

fix(python): enable PyO3 generate-import-lib for Windows wheels

fix(python): enable PyO3 generate-import-lib for Windows wheels #483

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
permissions:
contents: read
checks: write
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build documentation
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: "-D warnings"
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Generate lockfile
run: cargo generate-lockfile
- name: Security audit (cargo-audit)
uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: License check (cargo-deny)
uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check licenses sources
- name: Install cargo-vet
uses: taiki-e/install-action@v2
with:
tool: cargo-vet
- name: Supply chain audit (cargo-vet)
run: cargo vet --locked
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features http_client
- name: Run fail-point tests (single-threaded)
run: cargo test --features failpoints --test security_failpoint_tests -- --test-threads=1
- name: Run property-based security tests (proptest)
run: cargo test --test proptest_security -- --test-threads=1
env:
PROPTEST_CASES: 50
examples:
name: Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build examples
run: cargo build --examples --features "git,http_client"
- name: Run examples
run: |
cargo run --example basic
cargo run --example custom_fs
cargo run --example resource_limits
cargo run --example text_processing
cargo run --example git_workflow --features git
# python_scripts requires monty git dep (not on crates.io)
# cargo run --example python_scripts --features python
- name: Run LLM agent example
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: cargo run --example agent_tool --features http_client
# Gate job for branch protection — name must stay "Check"
check:
name: Check
if: always()
needs: [lint, audit, test, examples]
runs-on: ubuntu-latest
steps:
- name: Verify all jobs passed
run: |
if [[ "${{ needs.lint.result }}" != "success" ]] || \
[[ "${{ needs.audit.result }}" != "success" ]] || \
[[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.examples.result }}" != "success" ]]; then
echo "One or more required jobs failed"
exit 1
fi