-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (70 loc) · 2.99 KB
/
Makefile
File metadata and controls
89 lines (70 loc) · 2.99 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Soroban Debugger — developer convenience targets
#
# Targets:
# regen-man Regenerate all man pages from current CLI source
# check-man Verify committed man pages match generated output (used in CI)
# test-man-tmpdir Run portability tests for man page temp directory handling
# fmt Check Rust formatting
# lint Run Rust clippy lints (strict)
# lint-strict Run Rust clippy with CI-equivalent strict flags
# hooks-install Install pre-commit hooks for local validation
# hooks-check Run pre-commit hooks against all files
# test-rust Run Rust backend tests
# test-rust-network Run only loopback network-dependent Rust tests
# test-vscode Run VS Code extension tests
# ci-local Run all practical gates developers must satisfy before pushing
.PHONY: all build fmt lint lint-strict hooks-install hooks-check test-rust test-rust-sandbox test-rust-network test-vscode ci-local clean regen-man check-man test-man-tmpdir
all: build
build:
cargo build
cd extensions/vscode && npm install && npm run build
fmt:
cargo fmt --all -- --check
lint-strict:
cargo clippy --workspace --all-targets --all-features -- -D warnings
lint:
$(MAKE) lint-strict
hooks-install:
pre-commit install
hooks-check:
pre-commit run --all-files
test-rust:
cargo test --workspace --features network-tests
test-rust-sandbox:
cargo test --workspace
test-rust-network:
cargo test --workspace --features network-tests
test-rust-network:
@echo "Running network-dependent Rust integration tests only..."
cargo test --test parity_tests parity_dap_server
cargo test --test remote_run_tests test_remote_run_execution
test-vscode:
cd extensions/vscode && npm install && npm run test
# Regenerate all man pages from current CLI source.
# Run after any CLI flag, subcommand, or help text change, then commit the .1 files.
regen-man:
@echo "Regenerating man pages..."
cargo build --quiet
@echo "Man pages updated in man/man1/ — remember to commit the .1 files."
# Verify committed man pages match generated output.
# Exits non-zero with a diff if drift is detected.
# Environment: TMPDIR can be exported to override temp directory for restricted environments.
# Usage: export TMPDIR=/custom/tmp && make check-man
# or: TMPDIR=/custom/tmp bash scripts/check_manpages.sh
check-man:
@bash scripts/check_manpages.sh
# Test portability of man page generation across different temp directory configurations.
test-man-tmpdir:
@bash scripts/test_manpage_tmpdir.sh
# The single local entrypoint for developers
ci-local: fmt lint test-rust test-vscode check-man
@echo "======================================="
@echo "✅ All local CI gates passed successfully!"
@echo "======================================="
# Sandbox-safe local gate for restricted environments.
# Runs deterministic checks and explicitly reports skipped network/temp-dependent gates.
ci-sandbox: fmt lint test-rust-sandbox check-man
@bash run_local_ci.sh --sandbox
clean:
cargo clean
rm -rf extensions/vscode/node_modules extensions/vscode/dist