-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.17 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.17 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
#!/usr/bin/make -f
CONTAINER_RUNTIME := $(shell which docker 2>/dev/null || which podman 2>/dev/null)
UNAME_M := $(shell uname -m)
.PHONY: all
all: clean fmt lint test schema optimize
.PHONY: clean
clean:
@cargo clean
.PHONY: fmt
fmt:
@cargo fmt --all -- --check
.PHONY: lint
lint:
@cargo clippy
.PHONY: build
build:
@cargo build
.PHONY: test
test:
@cargo test --verbose
.PHONY: schema
schema:
@cargo run --example schema
.PHONY: coverage
coverage:
@cargo tarpaulin --ignore-tests --out Html
.PHONY: optimize
optimize:
ifeq ($(UNAME_M),arm64)
@docker run --rm -v $(CURDIR):/code \
--mount type=volume,source=restricted-marker-transfer_cache,target=/code/target \
--mount type=volume,source=restricted-marker-transfer_registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer-arm64:0.12.13
else
@docker run --rm -v $(CURDIR):/code \
--mount type=volume,source=restricted-marker-transfer_cache,target=/code/target \
--mount type=volume,source=restricted-marker-transfer_registry_cache,target=/usr/local/cargo/registry \
cosmwasm/rust-optimizer:0.12.13
endif
.PHONY: install
install: optimize
@cp artifacts/restricted_marker_transfer.wasm $(PIO_HOME)