-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (40 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
55 lines (40 loc) · 1.07 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
CARGO = cd mint && cargo
WALLET_NPM = npm --prefix wallet
MARKET_NPM = npm --prefix market
RELAY_NPM = npm --prefix relay
.PHONY: setup build test lint fmt fmt-check mint-ci wallet wallet-build wallet-ci relay-ci market-ci ci clean
setup:
rustup component add rustfmt clippy
@command -v protoc >/dev/null || (echo "protoc is required (brew install protobuf)" && exit 1)
build:
$(CARGO) build --all-targets
test:
$(CARGO) test
lint:
$(CARGO) clippy --all-targets -- -D warnings
fmt:
$(CARGO) fmt --all
fmt-check:
$(CARGO) fmt --all -- --check
wallet:
$(WALLET_NPM) run dev
wallet-build:
$(WALLET_NPM) ci && $(WALLET_NPM) run build
mint-ci: fmt-check lint test build
wallet-ci:
$(WALLET_NPM) test -- --run
$(WALLET_NPM) run typecheck
$(WALLET_NPM) run build
$(WALLET_NPM) run test:e2e
relay-ci:
$(RELAY_NPM) test
$(RELAY_NPM) run typecheck
market-ci:
$(MARKET_NPM) test -- --run
$(MARKET_NPM) run typecheck
$(MARKET_NPM) run build
$(MARKET_NPM) run test:e2e
ci: mint-ci wallet-ci relay-ci market-ci
clean:
$(CARGO) clean
rm -rf wallet/dist wallet/node_modules