forked from jito-foundation/restaking
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
56 lines (47 loc) · 1.08 KB
/
Copy pathmakefile
File metadata and controls
56 lines (47 loc) · 1.08 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
56
# Makefile for Jito Restaking Project
# Commands
CARGO := cargo
CARGO_SORT := cargo sort
CARGO_CLIPPY := cargo clippy
CARGO_FMT := cargo +nightly fmt
CARGO_SBF := cargo-build-sbf
CARGO_NEXTEST := cargo nextest
YARN := yarn
SHANK_CLI := ./target/release/jito-shank-cli
# Default target
.PHONY: all
all: build test
# Linting
.PHONY: lint
lint:
$(CARGO_SORT) --workspace --check
$(CARGO_FMT) --all --check
$(CARGO_CLIPPY) --all-features -- -D warnings -D clippy::all -D clippy::nursery -D clippy::integer_division -D clippy::arithmetic_side_effects -D clippy::style -D clippy::perf
# Code generation
.PHONY: generate-code
generate-code: build-release
$(SHANK_CLI)
$(YARN) install
$(YARN) generate-clients
$(YARN) update-dependencies
# Build debug
.PHONY: build
build:
$(CARGO) build
# Build release
.PHONY: build-release
build-release:
$(CARGO) build --release
# Build Solana BPF/SBF programs
.PHONY: build-sbf
build-sbf:
$(CARGO_SBF)
# Run tests
.PHONY: test
test:
$(CARGO_NEXTEST) run --all-features
# Format code
.PHONY: format
format:
$(CARGO_SORT) --workspace
$(CARGO_FMT) --all