-
Notifications
You must be signed in to change notification settings - Fork 69
/
Makefile
59 lines (46 loc) · 1.76 KB
/
Makefile
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
test:
cargo test --all -- --nocapture
test-asm:
cargo test --all --features=asm -- --nocapture
test-asm-chaos:
cargo test --all --features=asm,enable-chaos-mode-by-default -- --nocapture
check:
cargo check --all --all-targets --all-features
cov:
cargo clean
cargo build --tests --all --features=asm
for file in `find target/debug/ -maxdepth 1 -executable -type f`; do mkdir -p "target/cov/$$(basename $$file)"; kcov --exclude-pattern=/.cargo,/usr/lib,tests --verify "target/cov/$$(basename $$file)" "$$file"; done
fmt:
cargo fmt --all -- --check
cd definitions && cargo fmt ${VERBOSE} --all -- --check
clippy_rule = -D warnings \
-D clippy::clone_on_ref_ptr \
-D clippy::enum_glob_use \
-A clippy::collapsible-else-if \
-A clippy::upper_case_acronyms \
-A clippy::unusual_byte_groupings \
-A clippy::inconsistent_digit_grouping \
-A clippy::large_digit_groups \
-A clippy::suspicious_operation_groupings \
-A clippy::unnecessary_cast \
-A clippy::mut_from_ref
clippy:
cargo clippy --all --features=asm -- $(clippy_rule)
cd definitions && cargo clippy --all -- $(clippy_rule)
fuzz:
cargo +nightly fuzz run asm -- -max_total_time=180
cargo +nightly fuzz run isa_a -- -max_total_time=180
ci: fmt check clippy test
git diff --exit-code Cargo.lock
ci-asm: test-asm
git diff --exit-code Cargo.lock
ci-asm-chaos: test-asm-chaos
git diff --exit-code Cargo.lock
ci-generated: update-cdefinitions
git diff --exit-code src/machine/asm/cdefinitions_generated.h
update-cdefinitions:
cargo run --manifest-path=definitions/Cargo.toml --bin generate_asm_constants > src/machine/asm/cdefinitions_generated.h
.PHONY: test clippy fmt fuzz
.PHONY: ci ci-quick ci-all-features ci-cdefinitions
.PHONY: stats security-audit check-licenses check-crates
.PHONY: update-cdefinitions