diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..f1bf3f5 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,6 @@ +[alias] +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" +unit-test = "test --lib" +integration-test = "test --test integration" +schema = "run --bin schema" \ No newline at end of file diff --git a/.github/workflows/cosmwasm-ci.yml b/.github/workflows/cosmwasm-ci.yml index c3096fd..69861d8 100644 --- a/.github/workflows/cosmwasm-ci.yml +++ b/.github/workflows/cosmwasm-ci.yml @@ -42,7 +42,6 @@ jobs: - name: Install Tools run: | - cargo install cargo-wasm --version 0.4.1 --locked cargo install cosmwasm-check --version 1.4.1 --locked cargo install cargo-llvm-cov --version 0.5.35 --locked cargo install cargo-sbom --version 0.8.4 --locked @@ -55,9 +54,8 @@ jobs: - name: Build run: | - cargo build --release --verbose - # RUSTFLAGS='-C link-arg=-s' cargo wasm build - # cosmwasm-check target/wasm32-unknown-unknown/release/cw_escrow.wasm + RUSTFLAGS='-C link-arg=-s' cargo wasm + cosmwasm-check target/wasm32-unknown-unknown/release/cw_escrow.wasm - name: Test run: | diff --git a/README.md b/README.md index 8f8f93b..d4e3135 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ Using toolchain plugin, install Rust v1.69 including: Anything we cannot get from standard toolchain we need to install manually. ```bash -cargo install cargo-wasm --version 0.4.1 --locked cargo install cosmwasm-check --version 1.4.1 --locked cargo install cargo-llvm-cov --version 0.5.35 --locked cargo install cargo-sbom --version 0.8.4 --locked @@ -45,8 +44,8 @@ cargo install cargo-sonar --version 0.21.0 --locked Build WASM and perform a cosmwasm-check ```bash -# cargo build --release -RUSTFLAGS='-C link-arg=-s' cargo wasm build +# uses `wasm` alias from .carg/config +RUSTFLAGS='-C link-arg=-s' cargo wasm cosmwasm-check target/wasm32-unknown-unknown/release/cw_escrow.wasm ```