forked from AcalaNetwork/Acala
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
128 lines (95 loc) · 3.02 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
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
.PHONY: run
run: githooks
cargo run --manifest-path bin/acala-dev/Cargo.toml -- --dev -lruntime=debug --instant-sealing
.PHONY: run-eth
run-eth: githooks
cargo run --manifest-path bin/acala-dev/Cargo.toml --features with-ethereum-compatibility -- --dev -lruntime=debug -levm=debug --instant-sealing
.PHONY: toolchain
toolchain:
./scripts/init.sh
.PHONY: build-full
build-full: githooks
cargo build
.PHONY: build-all
build-all: build-dev build-acala
.PHONY: build-dev
build-dev:
cargo build --manifest-path bin/acala-dev/Cargo.toml --locked
.PHONY: build-acala
build-acala:
cargo build --manifest-path bin/acala/Cargo.toml --locked --features with-all-runtime
.PHONY: check
check: githooks
SKIP_WASM_BUILD= cargo check
.PHONY: check-tests
check-tests: githooks
SKIP_WASM_BUILD= cargo check --tests --all
.PHONY: check-all
check-all: check-dev check-acala
.PHONY: check-dev
check-dev:
SKIP_WASM_BUILD= cargo check --manifest-path bin/acala-dev/Cargo.toml --tests --all
.PHONY: check-acala
check-acala:
SKIP_WASM_BUILD= cargo check --manifest-path bin/acala/Cargo.toml --tests --all --features with-all-runtime
.PHONY: check-debug
check-debug:
RUSTFLAGS="-Z macro-backtrace" SKIP_WASM_BUILD= cargo +nightly check
.PHONY: test
test: githooks
SKIP_WASM_BUILD= cargo test --all
.PHONY: test-eth
test-eth: githooks
SKIP_WASM_BUILD= cargo test --manifest-path bin/acala/Cargo.toml test_evm_module --features with-ethereum-compatibility -p mandala-runtime
.PHONY: test-all
test-all: test-dev test-acala
.PHONY: test-dev
test-dev:
SKIP_WASM_BUILD= cargo test --manifest-path bin/acala-dev/Cargo.toml --all
.PHONY: test-acala
test-acala:
SKIP_WASM_BUILD= cargo test --manifest-path bin/acala/Cargo.toml --all --features with-all-runtime
.PHONY: test-benchmarking
test-benchmarking:
SKIP_WASM_BUILD= cargo test --manifest-path bin/acala/Cargo.toml --features runtime-benchmarks -p mandala-runtime benchmarking
.PHONY: build
build: githooks
SKIP_WASM_BUILD= cargo build
.PHONY: purge
purge: target/debug/acala-dev
target/debug/acala-dev purge-chain --dev -y
.PHONY: restart
restart: purge run
target/debug/acala-dev:
SKIP_WASM_BUILD= cargo build
GITHOOKS_SRC = $(wildcard githooks/*)
GITHOOKS_DEST = $(patsubst githooks/%, .git/hooks/%, $(GITHOOKS_SRC))
.git/hooks:
mkdir .git/hooks
.git/hooks/%: githooks/%
cp $^ $@
.PHONY: githooks
githooks: .git/hooks $(GITHOOKS_DEST)
.PHONY: init
init: toolchain submodule build-full
.PHONY: submodule
submodule:
git submodule update --init --recursive
.PHONY: update-orml
update-orml:
cd orml && git checkout master && git pull
git add orml
.PHONY: update
update: update-orml cargo-update check-all
.PHONY: cargo-update
cargo-update:
cargo update
cargo update --manifest-path bin/acala-dev/Cargo.toml
cargo update --manifest-path bin/acala-dev/cli/Cargo.toml
cargo update --manifest-path bin/acala-dev/service/Cargo.toml
.PHONY: build-wasm-mandala
build-wasm-mandala:
./scripts/build-only-wasm.sh mandala-runtime
.PHONY: generate-tokens
generate-tokens:
./scripts/generate-tokens-and-predeploy-contracts.sh