forked from galacticcouncil/hydration-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
82 lines (63 loc) · 2.3 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
cargo := cargo --config net.git-fetch-with-cli=true
ifeq ($(shell uname),Darwin)
# macOS-specific commands
sha256sum := shasum -a 256
else
# Default commands for other systems
sha256sum := sha256sum
endif
.PHONY: build
build:
$(cargo) build --release --locked
.PHONY: build-release
build-release:
$(cargo) build --release --locked --features metadata-hash
.PHONY: check
check:
$(cargo) check --release
.PHONY: build-benchmarks
build-benchmarks:
$(cargo) build --release --features runtime-benchmarks
.PHONY: test
test:
$(cargo) test --locked
.PHONY: test-release
test-release:
$(cargo) test --release --locked
.PHONY: test-benchmarks
test-benchmarks:
$(cargo) test --release --features runtime-benchmarks
.PHONY: coverage
coverage:
$(cargo) tarpaulin --avoid-cfg-tarpaulin --all-features --workspace --locked --exclude-files node/* --exclude-files runtime/* --exclude-files infrastructure/* --exclude-files utils/* --exclude-files **/weights.rs --ignore-tests -o Xml -o lcov --timeout 120
.PHONY: clippy
clippy:
$(cargo) clippy --release --locked --all-targets -- -D warnings -A deprecated
.PHONY: clippy-all
clippy-all:
$(cargo) clippy --release --locked --all-targets --all-features -- -D warnings -A deprecated
.PHONY: format
format:
$(cargo) fmt
.PHONY: try-runtime
try-runtime:
$(cargo) build --release --features try-runtime
try-runtime --runtime ./target/release/wbuild/hydradx-runtime/hydradx_runtime.wasm on-runtime-upgrade --blocktime 12000 --checks all live --uri wss://archive.rpc.hydration.cloud
.PHONY: build-docs
build-docs:
$(cargo) doc --release --target-dir ./HydraDX-dev-docs --no-deps
.PHONY: clean
clean:
$(cargo) clean
.PHONY: docker
docker:
docker build -t hydra-dx .
docker tag hydra-dx galacticcouncil/hydra-dx:latest
checksum:
$(sha256sum) target/release/hydradx > target/release/hydradx.sha256
cp target/release/wbuild/hydradx-runtime/hydradx_runtime.compact.compressed.wasm target/release/
$(sha256sum) target/release/hydradx_runtime.compact.compressed.wasm > target/release/hydradx_runtime.compact.compressed.wasm.sha256
release: build-release checksum
all: clippy build-benchmarks test-benchmarks test build checksum
chopstics: release
npx @acala-network/chopsticks xcm --parachain=launch-configs/chopsticks/hydradx.yml --parachain=launch-configs/chopsticks/assethub.yml