-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
39 lines (32 loc) · 1.14 KB
/
Makefile
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
check:
cargo check --target wasm32-unknown-unknown --lib
clippy:
cargo +nightly clippy --tests
fmt:
cargo +nightly fmt
# Only generates the entry point schema since that is the only
# contract that can be called externally.
.PHONY: schema
schema:
cargo run --package skip-go-entry-point --bin schema
test:
cargo test --locked --workspace
update:
cargo update
# Need to have https://github.com/killercup/cargo-edit installed for this to work
upgrade:
cargo upgrade
# copied from DAO DAO:
# https://github.com/DA0-DA0/polytone/blob/main/devtools/optimize.sh
optimize:
if [[ $(shell uname -m) =~ "arm64" ]]; then \
docker run --rm -v "$(CURDIR)":/code \
--mount type=volume,source="$(notdir $(CURDIR))_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/arm64 \
cosmwasm/workspace-optimizer-arm64:0.14.0; else \
docker run --rm -v "$(CURDIR)":/code \
--mount type=volume,source="$(notdir $(CURDIR))_cache",target=/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
--platform linux/amd64 \
cosmwasm/workspace-optimizer:0.14.0; fi