-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
136 lines (104 loc) · 4.03 KB
/
Makefile
File metadata and controls
136 lines (104 loc) · 4.03 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
SER_TESTS = "tests/serialization_tests"
install-cli:
cargo install --locked --path forest/cli --force
install-daemon:
cargo install --locked --path forest/daemon --force
install: install-cli install-daemon
install-deps:
apt-get update -y
apt-get install --no-install-recommends -y build-essential clang protobuf-compiler ocl-icd-opencl-dev aria2 cmake
install-lint-tools:
RUSTFLAGS="-Cstrip=symbols" cargo install --locked taplo-cli cargo-audit cargo-spellcheck cargo-udeps
clean-all:
cargo clean
clean:
@echo "Cleaning local packages..."
@cargo clean -p forest-cli
@cargo clean -p forest-daemon
@cargo clean -p forest_cli_shared
@cargo clean -p forest_libp2p
@cargo clean -p forest_blocks
@cargo clean -p forest_chain_sync
@cargo clean -p forest_message
@cargo clean -p forest_state_manager
@cargo clean -p forest_interpreter
@cargo clean -p forest_crypto
@cargo clean -p forest_encoding
@cargo clean -p forest_ipld
@cargo clean -p forest_legacy_ipld_amt
@cargo clean -p forest_json
@cargo clean -p forest_fil_types
@cargo clean -p forest_rpc
@cargo clean -p forest_key_management
@cargo clean -p forest_utils
@cargo clean -p forest_test_utils
@cargo clean -p forest_message_pool
@cargo clean -p forest_genesis
@cargo clean -p forest_actor_interface
@cargo clean -p forest_networks
@echo "Done cleaning."
# Lints with everything we have in our CI arsenal
lint-all: lint audit spellcheck udeps
audit:
cargo audit
udeps:
cargo udeps --all-targets --features submodule_tests
spellcheck:
cargo spellcheck --code 1
lint: license clean
cargo fmt --all --check
taplo fmt --check
taplo lint
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --no-default-features --features forest_deleg_cns,paritydb -- -D warnings
# Formats Rust and TOML files
fmt:
cargo fmt --all
taplo fmt
build:
cargo build --bin forest --bin forest-cli
release:
cargo build --release --bin forest --bin forest-cli
docker-run:
docker build -t forest:latest -f ./Dockerfile . && docker run forest
# Git submodule test vectors
pull-serialization-tests:
git submodule update --init
run-serialization-vectors:
cargo nextest run --release --manifest-path=$(SER_TESTS)/Cargo.toml --features submodule_tests
run-vectors: run-serialization-vectors
test-vectors: pull-serialization-tests run-vectors
# Test all without the submodule test vectors with release configuration
test:
cargo nextest run --all --exclude serialization_tests --exclude forest_message --exclude forest_crypto --exclude forest_db
cargo nextest run -p forest_crypto --features blst --no-default-features
cargo nextest run -p forest_message --features blst --no-default-features
cargo nextest run -p forest_db --no-default-features --features paritydb
cargo nextest run -p forest_db --no-default-features --features rocksdb
test-slow:
cargo nextest run -p forest_message_pool --features slow_tests
cargo nextest run -p forest-cli --features slow_tests
cargo nextest run -p forest-daemon --features slow_tests
test-release:
cargo nextest run --release --all --exclude serialization_tests --exclude forest_message --exclude forest_crypto
cargo nextest run --release -p forest_crypto --features blst --no-default-features
cargo nextest run --release -p forest_message --features blst --no-default-features
test-slow-release:
cargo nextest run --release -p forest_message_pool --features slow_tests
cargo nextest run --release -p forest-cli --features slow_tests
cargo nextest run --release -p forest-daemon --features slow_tests
smoke-test:
./scripts/smoke_test.sh
test-all: test-release test-vectors test-slow-release
# Checks if all headers are present and adds if not
license:
./scripts/add_license.sh
docs:
cargo doc --no-deps
mdbook:
mdbook serve documentation
mdbook-build:
mdbook build ./documentation
rustdoc:
cargo doc --workspace --no-deps
.PHONY: clean clean-all lint build release test test-all test-release license test-vectors run-vectors pull-serialization-tests install-cli install-daemon install install-deps install-lint-tools docs run-serialization-vectors rustdoc