-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
74 lines (58 loc) · 1.55 KB
/
justfile
File metadata and controls
74 lines (58 loc) · 1.55 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
# simdna - justfile for development and publishing
# Extract version from Cargo.toml
get_version:
@grep '^version' Cargo.toml | head -1 | sed 's/.*"\([0-9]*\.[0-9]*\.[0-9]*\)".*/\1/'
# Check if version is in CHANGELOG.md
check_changelog:
#!/bin/bash
set -e
VERSION=$(just get_version)
if ! grep -q "\[$VERSION\]" CHANGELOG.md; then
echo "Error: Version $VERSION not found in CHANGELOG.md"
exit 1
fi
echo "✓ Version $VERSION found in CHANGELOG.md"
# Run all tests
test:
cargo test
# Run tests with verbose output
test-verbose:
cargo test -- --nocapture
# Run benchmarks
bench:
cargo bench
# Build release binary
build:
cargo build --release
# Run clippy lints
lint:
cargo clippy -- -D warnings
# Format code
fmt:
cargo fmt
# Check formatting without modifying
fmt-check:
cargo fmt -- --check
# Run the example binary
run:
cargo run --release
# Generate documentation
doc:
cargo doc --no-deps --open
# Clean build artifacts
clean:
cargo clean
# Run fuzz tests (requires nightly)
fuzz target="roundtrip" duration="60":
cd fuzz && cargo +nightly fuzz run {{ target }} -- -max_total_time={{ duration }}
# Publish package
do_publish:
cargo run --release
git add .; git commit -m "Release v$(just get_version)"; git push
cargo publish
# Full pre-publish check
check: fmt-check lint test
@echo "✓ All checks passed"
# Main publish command that runs all steps
publish: check_changelog check do_publish
@echo "✓ Successfully published simdna version $(just get_version)"