forked from Betta-Pay/BettaPay-Contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (34 loc) · 998 Bytes
/
Copy pathMakefile
File metadata and controls
46 lines (34 loc) · 998 Bytes
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
SOROBAN ?= soroban
.PHONY: build
build:
@echo "Building all contracts..."
cargo build --target wasm32-unknown-unknown --release
.PHONY: optimize
optimize: build
@mkdir -p target/optimized
@for contract in $(shell find . -path "*/target/wasm32-unknown-unknown/release/*.wasm" -type f); do \
output=$$(basename $$contract .wasm)_opt.wasm; \
$(SOROBAN) contract optimize --wasm $$contract --optimized-wasm target/optimized/$$output; \
done
.PHONY: clean
clean:
cargo clean
@rm -rf target/optimized
.PHONY: fmt test check clippy test_scripts wasm_size all
fmt:
cargo fmt --all -- --check
.PHONY: fmt test check clippy all
fmt:
cargo fmt --all --check
test:
cargo test --workspace
check:
cargo check --workspace
clippy:
cargo clippy --workspace --all-targets --all-features -- -D warnings
test_scripts:
bash scripts/tests/tooling_smoke_test.sh
wasm_size: optimize
bash scripts/check_wasm_size.sh
all: fmt check clippy test test_scripts wasm_size
all: fmt check clippy test