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
120 lines
2.8 KiB
YAML
120 lines
2.8 KiB
YAML
name: CI - WASM Bindings
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'crates/**'
|
|
- 'packages/wasm/**'
|
|
- 'scripts/browser-compat/**'
|
|
- 'scripts/edge-compat/**'
|
|
- '.github/workflows/ci-wasm.yml'
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'crates/**'
|
|
- 'packages/wasm/**'
|
|
- 'scripts/browser-compat/**'
|
|
- 'scripts/edge-compat/**'
|
|
- '.github/workflows/ci-wasm.yml'
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
name: Build WASM
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- uses: dtolnay/rust-toolchain@1.95.0
|
|
with:
|
|
targets: wasm32-unknown-unknown
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cache/pdfium-rs
|
|
target
|
|
key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Install wasm-pack
|
|
run: cargo install wasm-pack --locked
|
|
|
|
- name: Build WASM package
|
|
working-directory: packages/wasm
|
|
run: npm run build
|
|
|
|
- name: Verify output
|
|
run: |
|
|
test -f packages/wasm/pkg/liteparse_wasm_bg.wasm
|
|
test -f packages/wasm/pkg/liteparse_wasm.js
|
|
test -f packages/wasm/pkg/liteparse_wasm.d.ts
|
|
WASM_SIZE=$(stat --format=%s packages/wasm/pkg/liteparse_wasm_bg.wasm)
|
|
echo "WASM binary size: $(numfmt --to=iec $WASM_SIZE)"
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wasm-pkg
|
|
path: packages/wasm/pkg/
|
|
if-no-files-found: error
|
|
|
|
browser-test:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
name: Browser PDF parse test
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Download WASM artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: wasm-pkg
|
|
path: packages/wasm/pkg/
|
|
|
|
- name: Install Playwright
|
|
run: |
|
|
npm install playwright@latest
|
|
npx playwright install --with-deps chromium
|
|
|
|
- name: Run browser parse test
|
|
run: node scripts/browser-compat/wasm-test.mjs
|
|
|
|
edge-test:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
name: Edge runtime PDF parse test
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Download WASM artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: wasm-pkg
|
|
path: packages/wasm/pkg/
|
|
|
|
- name: Install Miniflare
|
|
run: npm install miniflare@latest
|
|
|
|
- name: Run edge runtime parse test
|
|
run: node scripts/edge-compat/wasm-test.mjs
|