bobine 0.5.11

PDF / Office / text → Markdown ingestion engine with ONNX formula OCR (TexTeller), layout analysis and OCR
Documentation
# NOTE: originally `maturin generate-ci github`, then trimmed to the
# release matrix (ubuntu/windows x86_64 + macos arm64). Do NOT regenerate
# blindly — it brings back x86/armv7/s390x/ppc64le/musllinux/windows-arm.
#
name: CI

on:
  push:
    branches:
      - main
      - master
      - rust_dev
  pull_request:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  # Rust test suite — runs on every push/PR so dependency updates
  # (e.g. pdf_oxide) can't silently shift golden output.
  # Needs onnxruntime: lib tests abort without a resolvable dylib
  # (STATUS_STACK_BUFFER_OVERRUN); model-backed tests skip or degrade
  # gracefully, fixtures are all committed (no downloads except the
  # small RapidTable weights from HuggingFace).
  test:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - name: Download onnxruntime (CPU)
        run: |
          curl -sL --max-time 300 -o /tmp/ort.tgz \
            https://github.com/microsoft/onnxruntime/releases/download/v1.28.1/onnxruntime-linux-x64-1.28.1.tgz
          mkdir -p /tmp/ort && tar xzf /tmp/ort.tgz -C /tmp/ort
      - name: Rust tests (locked)
        env:
          ORT_DYLIB_PATH: /tmp/ort/onnxruntime-linux-x64-1.28.1/lib/libonnxruntime.so.1.28.1
        run: >
          cargo test --locked --lib
          --test test_office --test test_excel
          --test test_golden --test test_rapid_table
          --test test_converter

  # Wheel smoke builds — same three platforms as release.yml.
  # (CI proves the build; release.yml publishes it.)
  linux:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: "3.x"
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: x86_64
          args: --release --out dist --find-interpreter --locked
          sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
          # 2_28 (AlmaLinux 8, OpenSSL 1.1.1): `auto` resolves to the
          # CentOS 7-based manylinux2014 whose OpenSSL 1.0.2 predates what
          # openssl-sys 0.9.117 accepts (needs 1.1.0+). glibc floor stays
          # modest (2.28: Ubuntu 20.04+ / Debian 11+).
          manylinux: 2_28
          # ort-sys build-deps on ureq/native-tls → openssl-sys needs the
          # headers inside the manylinux container (host apt won't reach it).
          before-script-linux: yum install -y openssl-devel
      - name: Upload wheels
        uses: actions/upload-artifact@v6
        with:
          name: wheels-linux-x86_64
          path: dist

  windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: "3.13"
          architecture: x64
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: x64
          args: --release --out dist --find-interpreter --locked
          sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
      - name: Upload wheels
        uses: actions/upload-artifact@v6
        with:
          name: wheels-windows-x64
          path: dist

  macos:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: "3.x"
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: aarch64
          args: --release --out dist --find-interpreter --locked
          sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
      - name: Upload wheels
        uses: actions/upload-artifact@v6
        with:
          name: wheels-macos-aarch64
          path: dist

  sdist:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Build sdist
        uses: PyO3/maturin-action@v1
        with:
          command: sdist
          args: --out dist
      - name: Upload sdist
        uses: actions/upload-artifact@v6
        with:
          name: wheels-sdist
          path: dist