From ab9f17b196024f54806585b45ab66597581cd7e9 Mon Sep 17 00:00:00 2001 From: Reuven Podmazo Date: Mon, 5 Sep 2022 10:41:16 +0300 Subject: [PATCH] more perf adjustments --- Makefile | 5 ++--- x/compute/internal/keeper/testdata/test-contract/Makefile | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index b90dcc8c3..f8fa4ca16 100644 --- a/Makefile +++ b/Makefile @@ -350,16 +350,15 @@ build-test-contract: $(MAKE) -C ./x/compute/internal/keeper/testdata/v1-sanity-contract $(MAKE) -C ./x/compute/internal/keeper/testdata/ibc - prep-go-tests: build-test-contract # empty BUILD_PROFILE means debug mode which compiles faster SGX_MODE=SW $(MAKE) build-linux cp ./cosmwasm/enclaves/execute/librust_cosmwasm_enclave.signed.so ./x/compute/internal/keeper go-tests: build-test-contract - # empty BUILD_PROFILE means debug mode which compiles faster - SGX_MODE=SW $(MAKE) build-linux + SGX_MODE=SW $(MAKE) build-linux-with-query cp ./cosmwasm/enclaves/execute/librust_cosmwasm_enclave.signed.so ./x/compute/internal/keeper + cp ./cosmwasm/enclaves/query/librust_cosmwasm_query_enclave.signed.so ./x/compute/internal/keeper rm -rf ./x/compute/internal/keeper/.sgx_secrets mkdir -p ./x/compute/internal/keeper/.sgx_secrets GOMAXPROCS=8 SGX_MODE=SW SCRT_SGX_STORAGE='./' go test -failfast -timeout 40m -v ./x/compute/internal/... $(GO_TEST_ARGS) diff --git a/x/compute/internal/keeper/testdata/test-contract/Makefile b/x/compute/internal/keeper/testdata/test-contract/Makefile index d357c5565..d27a97fd3 100644 --- a/x/compute/internal/keeper/testdata/test-contract/Makefile +++ b/x/compute/internal/keeper/testdata/test-contract/Makefile @@ -3,16 +3,14 @@ Rust_Crate_Source := $(shell find -type f | grep -P '(\.rs|\.toml|\.lock)$$' | g .PHONY: all all: contract.wasm contract_with_floats.wasm too-high-initial-memory.wasm static-too-high-initial-memory.wasm -.PHONY: add-wasm -add-wasm: +contract.wasm: $(Rust_Crate_Source) rustup target add wasm32-unknown-unknown - -contract.wasm: add-wasm $(Rust_Crate_Source) RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown cp ./target/wasm32-unknown-unknown/release/test_contract.wasm ./contract.wasm # Compile with floats -contract_with_floats.wasm: add-wasm $(Rust_Crate_Source) +contract_with_floats.wasm: $(Rust_Crate_Source) + rustup target add wasm32-unknown-unknown RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown --features with_floats cp ./target/wasm32-unknown-unknown/release/test_contract.wasm ./contract_with_floats.wasm