Skip to content

PDF pipeline: docling-parse line sanitizer + TableFormer + conformance push (4/14 exact) #25

PDF pipeline: docling-parse line sanitizer + TableFormer + conformance push (4/14 exact)

PDF pipeline: docling-parse line sanitizer + TableFormer + conformance push (4/14 exact) #25

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
# Manual re-run from the Actions tab / `gh workflow run`. Runs lint + test only;
# the release job is gated to `push` events, so a manual run never publishes.
workflow_dispatch:
# Cancel superseded PR runs, but never interrupt a master run (it may publish).
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
# Rust version for the style/lint gates. Pinned on purpose: rustfmt and clippy
# change their output/lints between releases, so a floating `stable` would let
# a new toolchain fail CI on otherwise-unrelated commits. Bump this manually
# (and fix any new findings in the same PR) when you want to adopt a newer one.
LINT_TOOLCHAIN: "1.96.0"
jobs:
lint:
name: fmt · clippy (pinned)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.LINT_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
test:
name: test (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Tests stay on the current stable so they catch real compiler breakage.
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Pure-Rust unit tests + the output-regression suite. The PDF/image/METS
# snapshot tests need pdfium + the ONNX models, so they are NOT run here —
# this job downloads no ML models and stays fast.
- name: Test
run: cargo test --workspace
publish:
name: release & publish
needs: [lint, test]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write # push the version-bump commit + tag
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history + tags, for the semantic version bump
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Decide the next version from conventional commits since the last tag; if
# there is one, bump + commit + tag it, push to master, and publish the
# crates (in dependency order, skipping any already on crates.io). A no-op
# when no release-worthy commit landed. The release commit is pushed with
# GITHUB_TOKEN and carries [skip ci], so it does not re-trigger CI.
- name: Release & publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: bash scripts/release.sh