9f97f3abbe
CI - Python Bindings / sdist (push) Failing after 1s
CI - Python Bindings / Build x86_64-unknown-linux-musl (push) Failing after 1s
CI / fmt (push) Failing after 1s
E2E Output Validation / compare-outputs (push) Failing after 1s
Sync Docs to Developer Hub / sync-docs (push) Failing after 1s
CI - Python Bindings / Build x86_64-unknown-linux-gnu (push) Failing after 1s
CI - WASM Bindings / Build WASM (push) Failing after 0s
CI / clippy (push) Failing after 1s
CI / build-and-test (ubuntu-latest) (push) Failing after 0s
CI - WASM Bindings / Edge runtime PDF parse test (push) Has been skipped
CI - WASM Bindings / Browser PDF parse test (push) Has been skipped
Deploy Demo to GitHub Pages / deploy (push) Failing after 1s
CI / build-docker-image (push) Failing after 3s
CI - Node Bindings / Build darwin-x64 (push) Has been cancelled
CI - Node Bindings / Test win32-x64-msvc (push) Has been cancelled
CI - Node Bindings / Build linux-arm64-gnu (push) Has been cancelled
CI - Node Bindings / Build linux-x64-gnu (push) Has been cancelled
CI - Node Bindings / Build linux-x64-musl (push) Has been cancelled
CI - Node Bindings / Build win32-arm64-msvc (push) Has been cancelled
CI - Node Bindings / Build win32-x64-msvc (push) Has been cancelled
CI - Node Bindings / Test darwin-arm64 (push) Has been cancelled
CI - Node Bindings / Test darwin-x64 (push) Has been cancelled
CI - Node Bindings / Test linux-x64-gnu (push) Has been cancelled
CI - Node Bindings / Test linux-x64-musl (push) Has been cancelled
CI - Node Bindings / Test win32-arm64-msvc (push) Has been cancelled
CI - Python Bindings / Build aarch64-pc-windows-msvc (push) Has been cancelled
CI - Python Bindings / Build x86_64-pc-windows-msvc (push) Has been cancelled
CI - Python Bindings / Build x86_64-apple-darwin (push) Has been cancelled
CI - Python Bindings / Build aarch64-apple-darwin (push) Has been cancelled
CI - Python Bindings / Build aarch64-unknown-linux-gnu (push) Has been cancelled
CI - Node Bindings / Build darwin-arm64 (push) Has been cancelled
CI - Python Bindings / Test x86_64-apple-darwin (push) Has been cancelled
CI - Python Bindings / Test aarch64-apple-darwin (push) Has been cancelled
CI - Python Bindings / Test x86_64-unknown-linux-gnu (push) Has been cancelled
CI - Python Bindings / Test x86_64-unknown-linux-musl (push) Has been cancelled
CI - Python Bindings / Test aarch64-pc-windows-msvc (push) Has been cancelled
CI - Python Bindings / Test x86_64-pc-windows-msvc (push) Has been cancelled
CI / build-and-test (macos-26-intel) (push) Has been cancelled
CI / build-and-test (macos-latest) (push) Has been cancelled
CI / build-and-test (windows-11-arm) (push) Has been cancelled
CI / build-and-test (windows-latest) (push) Has been cancelled
E2E Output Validation / upload-dataset (push) Has been cancelled
113 lines
3.6 KiB
YAML
113 lines
3.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
SKIP_INTEGRATION_TESTS: yes
|
|
|
|
jobs:
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: rustup toolchain install stable --profile minimal --component rustfmt
|
|
- run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libtesseract-dev libleptonica-dev
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cache/pdfium-rs
|
|
target
|
|
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
|
|
- run: rustup toolchain install stable --profile minimal --component clippy
|
|
- run: cargo clippy --all-targets
|
|
|
|
build-and-test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest, macos-26-intel, windows-latest, windows-11-arm]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libtesseract-dev libleptonica-dev
|
|
|
|
- name: Install system dependencies (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: brew install tesseract leptonica
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cache/pdfium-rs
|
|
~/Library/Caches/pdfium-rs
|
|
${{ runner.os == 'Windows' && format('{0}\pdfium-rs', env.LOCALAPPDATA) || '' }}
|
|
target
|
|
key: ${{ matrix.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Force Ninja generator (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- run: cargo build --workspace --all-targets --exclude liteparse-python --exclude liteparse-napi
|
|
- run: cargo test --workspace --exclude liteparse-python --exclude liteparse-napi
|
|
|
|
- name: CLI smoke test
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
./target/debug/lit --version
|
|
./target/debug/lit parse demo/docs/apple-10k-2024.pdf --no-ocr --max-pages 1 -q | head -5
|
|
|
|
- name: OCR smoke test (runtime tessdata download)
|
|
shell: bash
|
|
run: |
|
|
# Wipe any tessdata that tesseract-rs/build.rs downloaded during
|
|
# `cargo build`, so the parse exercises the runtime first-use
|
|
# download path (the code path that npm/pip prebuilt users hit).
|
|
rm -rf "$HOME/Library/Application Support/tesseract-rs" \
|
|
"$HOME/.tesseract-rs" \
|
|
"${APPDATA:-}/tesseract-rs" 2>/dev/null || true
|
|
|
|
LIT=./target/debug/lit
|
|
[ -f "$LIT.exe" ] && LIT="$LIT.exe"
|
|
"$LIT" parse demo/docs/long_tiny_text.pdf --max-pages 1 -q -o ocr-out.txt
|
|
|
|
# If OCR ran, page 1 has substantial text beyond just the
|
|
# "--- Page 1 ---" header (~16 bytes). A tessdata-load failure
|
|
# surfaces as systemic OCR failure and an empty/tiny output.
|
|
size=$(wc -c < ocr-out.txt)
|
|
echo "OCR output size: $size bytes"
|
|
test "$size" -gt 200
|
|
|
|
# Test that docker builds
|
|
build-docker-image:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build the base Docker image
|
|
run: docker build .
|
|
- name: Build the full Docker image
|
|
run: docker build . -f full.Dockerfile
|