CI / Formatting, tests and builds (push) Successful in 2m55s
scripts/check-licenses.mjs lit les dépendances Rust (cargo metadata, la coque avec --desktop) et les paquets npm que le viewer embarque, et refuse toute licence qui n'a pas d'alternative compatible avec Apache-2.0, ou pas de licence du tout. MPL-2.0 est accepté: son copyleft porte sur les fichiers de la bibliothèque, livrés sans modification. 868 dépendances passent aujourd'hui. Le README dit ce qui est vérifié. Le backlog est régénéré depuis le tracker, et les notes de la 0.6.0 sont rédigées en brouillon. Refs #59 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.8 KiB
Makefile
53 lines
1.8 KiB
Makefile
# Project gates. Plain `make` runs everything that must pass before a commit.
|
|
|
|
.PHONY: all fmt lint test build proto bench clean desktop desktop-lint
|
|
|
|
all: fmt lint test build
|
|
|
|
fmt:
|
|
cargo fmt --all
|
|
npm --prefix apps/viewer run format
|
|
|
|
lint:
|
|
cargo fmt --all --check
|
|
cargo clippy --workspace --all-targets -- -D warnings
|
|
npm --prefix apps/viewer run lint
|
|
|
|
# `--skip export_bindings`: the ts-rs generation tests would write into
|
|
# apps/viewer/src/proto on every run. The `proto` target handles that, along
|
|
# with the matching formatting.
|
|
test:
|
|
cargo test --workspace -- --skip export_bindings
|
|
|
|
# The protocol's TypeScript types are generated, never written by hand.
|
|
# They are excluded from the formatter and the linter (see biome.json): their
|
|
# format belongs to ts-rs, otherwise every `make` leaves a diff in the repository.
|
|
proto:
|
|
cargo test -p rs-proto -p rs-store -p rs-session -p rs-signaling export_bindings
|
|
|
|
build:
|
|
cargo build --workspace
|
|
npm --prefix apps/viewer run build
|
|
|
|
# Test bench: always in release, a debug binary skews the measurements.
|
|
bench:
|
|
cargo run --release -p rs-session --bin rustscreen-cli -- --synthetic
|
|
|
|
# The Tauri shell: WebKitGTK at build time, so inside `nix develop .#desktop`.
|
|
# Its crate has its own workspace; it shares the target directory to avoid
|
|
# rebuilding everything. pnpm for the shell's interface, npm for the viewer.
|
|
desktop:
|
|
pnpm --dir apps/desktop install --frozen-lockfile
|
|
pnpm --dir apps/desktop build
|
|
cd apps/desktop/src-tauri && CARGO_TARGET_DIR=../../../target cargo build --release --features pipewire
|
|
|
|
desktop-lint:
|
|
node scripts/check-licenses.mjs --desktop
|
|
pnpm --dir apps/desktop lint
|
|
pnpm --dir apps/desktop test
|
|
cd apps/desktop/src-tauri && cargo fmt --check && CARGO_TARGET_DIR=../../../target cargo clippy --features pipewire -- -D warnings
|
|
|
|
clean:
|
|
cargo clean
|
|
rm -rf apps/viewer/dist apps/desktop/dist
|