-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
136 lines (105 loc) · 2.95 KB
/
Copy pathMakefile
File metadata and controls
136 lines (105 loc) · 2.95 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
.PHONY: all build test clean run-node install-deps help
all: build
help:
@echo "Polkadot Signal - Build Commands"
@echo "================================"
@echo "make build - Build all components"
@echo "make test - Run all tests"
@echo "make clean - Clean build artifacts"
@echo "make run-node - Run development node"
@echo "make install-deps - Install dependencies"
@echo "make build-client - Build TypeScript client"
@echo "make build-protocol - Build protocol library"
@echo "make build-pallets - Build Substrate pallets"
@echo "make check - Check code without building"
@echo "make clippy - Run clippy linter"
@echo "make fmt - Format code"
@echo "make docs - Generate documentation"
build:
cargo build --release
build-debug:
cargo build
build-pallets:
cargo build -p pallet-signal-keys -p pallet-signal-groups -p pallet-message-queue
build-protocol:
cargo build -p signal-protocol
build-p2p:
cargo build -p p2p-messaging
build-storage:
cargo build -p ipfs-storage
build-node:
cargo build -p polkadot-signal-node --release
build-client:
cd client && npm install && npm run build
test:
cargo test --all
test-pallets:
cargo test -p pallet-signal-keys -p pallet-signal-groups -p pallet-message-queue
test-protocol:
cargo test -p signal-protocol
test-p2p:
cargo test -p p2p-messaging
test-storage:
cargo test -p ipfs-storage
check:
cargo check --all
clippy:
cargo clippy --all -- -D warnings
fmt:
cargo fmt --all
clean:
cargo clean
cd client && rm -rf node_modules dist
run-node:
cargo run --release -p polkadot-signal-node -- --dev --tmp
run-node-alice:
cargo run --release -p polkadot-signal-node -- \
--chain dev \
--alice \
--tmp \
--port 30333 \
--rpc-port 9944
run-node-bob:
cargo run --release -p polkadot-signal-node -- \
--chain dev \
--bob \
--tmp \
--port 30334 \
--rpc-port 9945 \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/ALICE_PEER_ID
install-deps:
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain stable
cd client && npm install
docs:
cargo doc --no-deps --open
benchmark:
cargo run --release -p polkadot-signal-node -- benchmark \
--chain dev \
--execution wasm \
--wasm-execution compiled \
--pallet pallet_signal_keys \
--extrinsic '*' \
--steps 20 \
--repeat 10 \
--output pallets/signal-keys/src/weights.rs
generate-weights:
cargo run --release --features runtime-benchmarks -- benchmark \
--chain dev \
--execution wasm \
--wasm-execution compiled \
--pallet pallet_signal_keys \
--extrinsic '*' \
--steps 20 \
--repeat 10 \
--output pallets/signal-keys/src/weights.rs
ipfs-start:
ipfs daemon --init
docker-build:
docker build -t polkadot-signal:latest .
docker-run:
docker run -p 9944:9944 -p 30333:30333 polkadot-signal:latest
wasm:
cargo build --target wasm32-unknown-unknown --release
example-demo:
cargo run --release -p polkadot-signal-examples --bin demo