forked from water-credits/water-credits-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 733 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (22 loc) · 733 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
CONTRACTS = credit_factory credit_token verification_oracle retirement_registry project_registry governance
WASM_DIR = target/wasm32-unknown-unknown/release
.PHONY: build fix-wasm test lint fmt
build:
for contract in $(CONTRACTS); do \
cargo build --target wasm32-unknown-unknown --release -p $$contract; \
done
$(MAKE) fix-wasm
fix-wasm:
for contract in $(CONTRACTS); do \
wasm-tools print $(WASM_DIR)/$$contract.wasm \
| wasm-tools parse -o $(WASM_DIR)/$$contract.wasm -; \
wasm-tools strip -d 'target_features' \
-o $(WASM_DIR)/$$contract.wasm \
$(WASM_DIR)/$$contract.wasm; \
done
test: build
cargo test --workspace -- --nocapture
lint:
cargo clippy --workspace -- -D warnings
fmt:
cargo fmt --check