1640e30330
Auto-fix pass (uninlined format args, needless borrows, to_vec, size_of_val, map_err->inspect_err) plus hand fixes: fully annotated the sqlite-vec transmute (c_char for cross-platform correctness), type alias for the duplicate-scan tuple, slice signatures over &mut Vec/&PathBuf, and #[allow(dead_code)] documenting the intentionally dormant caption worker. The CI clippy step now fails on any new warning.
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
# windows-latest to match the release target — the ML crates (ort, candle)
|
|
# and the NSIS bundle only ever ship from Windows.
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 11
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- name: Install frontend dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
# tsc + vite build; also produces dist/ which tauri's build script expects
|
|
- name: Type-check and build frontend
|
|
run: pnpm build:vite
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: src-tauri
|
|
|
|
- name: Rustfmt
|
|
working-directory: src-tauri
|
|
run: cargo fmt --check
|
|
|
|
# --no-default-features: default enables candle-cuda for the main dev
|
|
# machine; CI runners have no CUDA toolkit and must build CPU-only.
|
|
- name: Clippy
|
|
working-directory: src-tauri
|
|
run: cargo clippy --all-targets --locked --no-default-features -- -D warnings
|