mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-26 02:58:32 -06:00
Release builds said "Text recognition isn't installed: its models are missing" because no packaging script or release job fetched the OCR models: only `cargo xtask models` does, into the source tree. - packaging/env.sh gains stage_models DEST, which runs `cargo xtask models DEST` (every ATTRIBUTION.toml kind = "model" file, SHA-256 verified, with its licence text). No model file is named, so the models PRs #433/#572 add ship without packaging changes. - `cargo xtask models` also writes ATTRIBUTION.txt crediting each model (CC-BY-SA-4.0 requires attribution when redistributed). - macOS: PdfCraft.app/Contents/Resources/models, before signing. - Windows: models\ beside pdfcraft.exe in the MSI (WiX v5 <Files> harvest) and the portable zip; test-msi.ps1 checks the folder. - Linux deb/rpm/tar.gz/AppImage, Flatpak bundle and FreeBSD tarball: share/pdfcraft/models beside bin/. Models::search_dirs now also looks in <exe dir>/../share/pdfcraft/models (Models::dirs_beside_exe); a test builds every package layout on disk and finds the models in each. release.yml and freebsd.yml check the packages contain them. - The missing-models messages no longer tell end users to run cargo, and the 11 catalogs that keyed an old PRINTCRAFT_MODELS wording (or the previous one) now key the current English text; ATTRIBUTION hashes updated. A test checks the translations match. The web (wasm) build, which the issue reports, still has no models; this is the desktop half only. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
2.0 KiB
YAML
53 lines
2.0 KiB
YAML
# Builds and tests the workspace on FreeBSD, inside a FreeBSD VM on a Linux runner
|
|
# (GitHub has no FreeBSD runners). GPU tests skip themselves when the VM has no adapter.
|
|
name: FreeBSD
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
paths:
|
|
- Cargo.toml
|
|
- Cargo.lock
|
|
- "**/Cargo.toml"
|
|
- .github/workflows/freebsd.yml
|
|
- packaging/freebsd/**
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: freebsd-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
freebsd:
|
|
name: FreeBSD 14 (build + test)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 300
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build and test in a FreeBSD VM
|
|
uses: vmactions/freebsd-vm@c46abacb49f09938ca4e1702d15d836285d694cc # v1
|
|
with:
|
|
release: "14.3"
|
|
usesh: true
|
|
cpu: 4
|
|
mem: 12288
|
|
# Nothing to bring back; copying the target dir out of the VM fails on large builds.
|
|
copyback: false
|
|
prepare: |
|
|
pkg install -y bash git curl pkgconf cmake python3 libxkbcommon wayland libX11 libXcursor libXrandr libXi libxcb mesa-libs vulkan-loader gtk3 fontconfig freetype2 alsa-lib
|
|
curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal
|
|
run: |
|
|
. "$HOME/.cargo/env"
|
|
# The checkout is synced in under another owner; let tests that call git read it.
|
|
git config --global --add safe.directory "*"
|
|
rustc --version
|
|
CARGO_PROFILE_DEV_DEBUG=0 cargo build --workspace --all-targets --locked
|
|
CARGO_PROFILE_DEV_DEBUG=0 cargo test --workspace --locked
|
|
# The release packaging, end to end (a quicker release profile than the real release).
|
|
CARGO_PROFILE_RELEASE_LTO=false CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16 packaging/freebsd/package.sh
|
|
tar -tzf dist/release/pdfcraft-*-freebsd-*.tar.gz | grep -E '/bin/pdfcraft$|/bin/pdfcraft-cli$|applications/|/share/pdfcraft/models/.+\.rten$'
|