.PHONY: all all: clippy test .PHONY: check check: cargo check .PHONY: check-receiver check-receiver: $(MAKE) -C tests/example-receiver check .PHONY: clippy clippy: cargo clippy .PHONY: clippy-receiver clippy-receiver: $(MAKE) -C tests/example-receiver clippy .PHONY: test test: unit-test unit-test-receiver integration-test .PHONY: unit-test unit-test: RUST_BACKTRACE=1 cargo test .PHONY: unit-test-nocapture unit-test-nocapture: RUST_BACKTRACE=1 cargo test -- --nocapture .PHONY: unit-test-receiver unit-test-receiver: $(MAKE) -C tests/example-receiver unit-test .PHONY: integration-test integration-test: compile-optimized compile-optimized-receiver if tests/integration.sh; then echo -n '\a'; else echo -n '\a'; sleep 0.125; echo -n '\a'; fi compile-optimized-receiver: $(MAKE) -C tests/example-receiver compile-optimized .PHONY: compile _compile compile: _compile contract.wasm.gz _compile: cargo build --target wasm32-unknown-unknown --locked cp ./target/wasm32-unknown-unknown/debug/*.wasm ./contract.wasm .PHONY: compile-optimized _compile-optimized compile-optimized: _compile-optimized contract.wasm.gz _compile-optimized: RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown --locked @# The following line is not necessary, may work only on linux (extra size optimization) wasm-opt -Oz ./target/wasm32-unknown-unknown/release/*.wasm -o ./contract.wasm .PHONY: compile-optimized-reproducible compile-optimized-reproducible: docker run --rm -v "$$(pwd)":/contract \ --mount type=volume,source="$$(basename "$$(pwd)")_cache",target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ enigmampc/secret-contract-optimizer:1.0.5 contract.wasm.gz: contract.wasm cat ./contract.wasm | gzip -9 > ./contract.wasm.gz .PHONY: schema schema: cargo run --example schema .PHONY: clean clean: cargo clean rm -f ./contract.wasm ./contract.wasm.gz