Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (41 loc) · 1.69 KB
/
Copy pathMakefile
File metadata and controls
53 lines (41 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: setup check check-ci check-chars fmt-check lint lint-full build test build-examples fmt clean
# One-time dev environment setup
setup:
@echo "Installing apdev-rs..."
@command -v apdev-rs >/dev/null 2>&1 || cargo install apdev-rs
@echo "Installing git pre-commit hook..."
@mkdir -p .git/hooks
@cp .githooks/pre-commit .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Done! Development environment is ready."
# Fast local check (pre-commit). Lints lib+bins only — test code is still
# COMPILED (and any error caught) by `test`, just not clippy-linted here. The
# full clippy --all-targets pass lives in `check-ci` / `lint-full`.
check: fmt-check lint check-chars build test build-examples
# Full check mirroring CI: clippy over all targets incl. tests + examples.
check-ci: fmt-check lint-full check-chars build test build-examples
check-chars:
apdev-rs check-chars src/
fmt-check:
cargo fmt --all -- --check
# Fast lint: lib + bins only. Skips re-type-checking all 122 test binaries
# (which `test` compiles anyway) — the single biggest make-check speedup.
lint:
cargo clippy --lib --bins --all-features -- -D warnings
# Full lint: every target (lib, bins, tests, examples). Slower; use in CI.
lint-full:
cargo clippy --all-targets --all-features -- -D warnings
build:
cargo build --all-features
# Most integration tests compile into ONE binary (tests/it.rs, autotests=false)
# for fast builds; the few files that touch process-global Config/env state stay
# as separate binaries (see Cargo.toml [[test]] entries) so `cargo test` keeps
# per-process isolation for them.
test:
cargo test --all-features
build-examples:
cargo build --examples
fmt:
cargo fmt --all
clean:
cargo clean