-
Notifications
You must be signed in to change notification settings - Fork 298
/
Makefile
82 lines (54 loc) · 3.17 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
check: githooks
./scripts/run.sh check --no-default-features --target=wasm32-unknown-unknown
check-tests: githooks
./scripts/run.sh check --tests
test: githooks
./scripts/run.sh test
GITHOOKS_SRC = $(wildcard githooks/*)
GITHOOKS_DEST = $(patsubst githooks/%, $(GITHOOK)/%, $(GITHOOKS_SRC))
GITHOOK := $(shell git rev-parse --git-path hooks)
$(GITHOOK):
mkdir $(GITHOOK)
$(GITHOOK)/%: githooks/%
cp "$^" "$(GITHOOK)"
githooks: $(GITHOOK) $(GITHOOKS_DEST)
init: githooks
format:
./scripts/run.sh "fmt"
# Standalone development workflow targets
# Running those inside existing workspace will break due to Cargo unable to support nested worksapce
Cargo.toml: Cargo.dev.toml
cp Cargo.dev.toml Cargo.toml
dev-format: Cargo.toml
cargo fmt --all
dev-format-check: Cargo.toml
cargo fmt --all -- --check
# needs to use run.sh to check individual projects because
# --no-default-features is not allowed in the root of a virtual workspace
dev-check: Cargo.toml check
dev-check-tests: Cargo.toml
cargo check --tests --all
dev-test: Cargo.toml
cargo test --all --features=runtime-benchmarks
# Check feature formatting and propagation.
dev-features-check:
zepter run check
# Try to automatically fix all features.
dev-features-fix:
zepter run default
# Check whether all features are formatted.
dev-features-format-check:
zepter format features
# Formats all features in all manifest files of the workspace.
dev-features-format:
zepter format features --fix
# run benchmarks via Acala node
benchmark-all:
cargo run --release --bin=acala --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=orml_auction --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output=./auction/src/weights.rs --template ../templates/orml-weight-template.hbs
cargo run --release --bin=acala --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=orml_authority --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output=./authority/src/weights.rs --template ../templates/orml-weight-template.hbs
cargo run --release --bin=acala --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=module_currencies --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output=./currencies/src/weights.rs --template ../templates/orml-weight-template.hbs
cargo run --release --bin=acala --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=orml_oracle --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output=./oracle/src/weights.rs --template ../templates/orml-weight-template.hbs
cargo run --release --bin=acala --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=orml_tokens --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output=./tokens/src/weights.rs --template ../templates/orml-weight-template.hbs
cargo run --release --bin=acala --features=runtime-benchmarks -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=orml_vesting --extrinsic="*" --wasm-execution=compiled --heap-pages=4096 --output=./vesting/src/weights.rs --template ../templates/orml-weight-template.hbs
release: Cargo.toml
cargo release --execute