-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 1.74 KB
/
Makefile
File metadata and controls
52 lines (40 loc) · 1.74 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
BIN_NAME := futuresight
CARGO ?= cargo
## Defaults are set for Parmigiana test net
MAX_BLOCK_HISTORY ?= 40
BLOCK_DELAY_SECS ?= 60
HOST_RPC_URL ?= https://rpc-host.parmigiana.signet.sh
ROLLUP_RPC_URL ?= https://rpc.parmigiana.signet.sh
.PHONY: help build run dev release fmt lint clean test watch parmigiana
help:
@echo "FutureSight Make Targets"
@echo "------------------------"
@echo " make build - Build debug binary"
@echo " make release - Build optimized release binary"
@echo " make run - Run (debug) with optional HOST_RPC_URL, ROLLUP_RPC_URL, MAX_BLOCK_HISTORY, and BLOCK_DELAY_SECS env vars"
@echo " make dev - Run with cargo watch (requires cargo-watch)"
@echo " make test - Run tests (none yet)"
@echo " make watch - Runs FutureSight with cargo-watch; Requires cargo-watch to be installed"
@echo " make fmt - Format code"
@echo " make lint - Run clippy lints"
@echo " make clean - Clean target directory"
@echo " make help - Show this help"
build:
$(CARGO) build
release:
$(CARGO) build --release
run: build
BLOCK_DELAY_SECS=$(BLOCK_DELAY_SECS) MAX_BLOCK_HISTORY=$(MAX_BLOCK_HISTORY) HOST_RPC_URL=$(HOST_RPC_URL) ROLLUP_RPC_URL=$(ROLLUP_RPC_URL) $(CARGO) run
# Requires cargo-watch: cargo install cargo-watch
watch:
HOST_RPC_URL=$(HOST_RPC_URL) ROLLUP_RPC_URL=$(ROLLUP_RPC_URL) cargo watch -x run
parmigiana: build
BLOCK_DELAY_SECS=$(BLOCK_DELAY_SECS) MAX_BLOCK_HISTORY=$(MAX_BLOCK_HISTORY) HOST_RPC_URL=https://host-rpc.parmigiana.signet.sh ROLLUP_RPC_URL=https://rpc.parmigiana.signet.sh $(CARGO) run
fmt:
$(CARGO) fmt --all || true
lint:
$(CARGO) clippy -- -D warnings || true
clean:
$(CARGO) clean
test:
$(CARGO) test --all