-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
111 lines (88 loc) · 2.9 KB
/
justfile
File metadata and controls
111 lines (88 loc) · 2.9 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
clippy-flags := "--workspace --tests --benches --examples --all-targets"
gen := "test_cases/massive_parallel_system/gen_big_problem.py"
# Check most of CI, but locally.
@check-most:
just lint
just check-wasm
just test
just fmt-check
just fuzz-check
lint:
cargo clippy {{clippy-flags}} -- -D warnings
cargo clippy {{clippy-flags}} --features dbg-jac -- -D warnings
# Fix some lints automatically.
lint-fix:
cargo clippy {{clippy-flags}} --fix -- -D warnings
# Check our WASM projects build properly.
check-wasm:
cargo check -p ezpz-wasm --target wasm32-unknown-unknown
cd ezpz-wasm; wasm-pack build --target web --dev; cd -
test:
cargo nextest run --all-features --release
cargo test --doc
# Run unit tests, output coverage to `lcov.info`.
test-with-coverage:
cargo llvm-cov nextest --all-features --release --workspace --lcov --output-path lcov.info
cargo test --doc
# Flamegraph our benchmarks
flamegraph:
cargo flamegraph -p ezpz --bench solver_bench
# Run benchmarks
bench:
cargo criterion -p ezpz --bench solver_bench
git restore test_cases/massive_parallel_system/problem.md
# Check formatting and typos.
fmt-check:
cargo fmt --check
cargo sort --check
typos
# Generate a constraint system with varying number of lines.
@regen-massive-test num_lines:
python3 {{gen}} {{num_lines}} > test_cases/massive_parallel_system/problem.md
# Generate an overconstraint system with varying number of lines.
@regen-massive-test-overconstrained num_lines:
python3 {{gen}} {{num_lines}} true > test_cases/massive_parallel_system/problem.md
# Install the ezpz CLI.
# The output text will tell you where it got installed.
# Probably in ~/.cargo/bin/ezpz
install:
cargo install --path ezpz-cli
# Like `install` but faster.
@reinstall:
cargo install --path ezpz-cli --quiet --offline --force
# Create a new test case
new-test name:
mkdir test_cases/{{name}}
touch test_cases/{{name}}/problem.md
# Regenerate residual-viz baseline images (run when residual math or viz changes).
# Sets TWENTY_TWENTY=overwrite so twenty_twenty writes the current output to the baseline paths.
residual-viz-overwrite:
TWENTY_TWENTY=overwrite cargo test -p ezpz --features residual-viz residual_viz::tests
publish version:
cargo publish -p ezpz --dry-run
git tag {{version}}
git push --tags
cargo publish -p ezpz
[linux]
[windows]
fuzz:
cargo +nightly fuzz run fuzz_target_1
[macos]
fuzz:
cargo +nightly fuzz run fuzz_target_1 --target aarch64-apple-darwin
[linux]
[windows]
fuzz-check:
cargo +nightly fuzz check
[macos]
fuzz-check:
cargo +nightly fuzz check --target aarch64-apple-darwin
# Install dependencies needed for ezpz's CLI to render graphics
[linux]
install-viz-deps:
sudo apt-get update
sudo apt install -y pkg-config libfontconfig1-dev
mutants:
cargo mutants -p ezpz
mutants-iterate:
cargo mutants -p ezpz --iterate