From e70a4a4a1edd0655c656a6c72c5dcb0502b0c305 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Thu, 29 Feb 2024 07:38:02 +1000 Subject: [PATCH] Make builds and tests consistent (#1222) --- Makefile | 26 +++++++------------ .../src/commands/contract/optimize.rs | 2 +- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 6ef25299a..a5a051c4f 100644 --- a/Makefile +++ b/Makefile @@ -24,36 +24,30 @@ ifeq ($(shell uname -s),Darwin) MACOS_MIN_VER = -ldflags='-extldflags -mmacosx-version-min=13.0' endif -# update the Cargo.lock every time the Cargo.toml changes. -Cargo.lock: Cargo.toml - cargo update --workspace +install_rust: install -install_rust: Cargo.lock - cargo install --path ./cmd/soroban-cli --debug - cargo install --path ./cmd/crates/soroban-test/tests/fixtures/hello --root ./target --debug --quiet - -install: install_rust - -build_rust: Cargo.lock - cargo build +install: + cargo install --locked --path ./cmd/soroban-cli --debug + cargo install --locked --path ./cmd/crates/soroban-test/tests/fixtures/hello --root ./target --debug --quiet # regenerate the example lib in `cmd/crates/soroban-spec-typsecript/fixtures/ts` build-snapshot: typescript-bindings-fixtures -build: build_rust +build: + cargo build -build-test-wasms: Cargo.lock +build-test-wasms: cargo build --package 'test_*' --profile test-wasms --target wasm32-unknown-unknown -build-test: build-test-wasms install_rust +build-test: build-test-wasms install test: build-test - cargo test + cargo test e2e-test: cargo test --test it -- --ignored -check: Cargo.lock +check: cargo clippy --all-targets watch: diff --git a/cmd/soroban-cli/src/commands/contract/optimize.rs b/cmd/soroban-cli/src/commands/contract/optimize.rs index 751dabb12..9230c5068 100644 --- a/cmd/soroban-cli/src/commands/contract/optimize.rs +++ b/cmd/soroban-cli/src/commands/contract/optimize.rs @@ -23,7 +23,7 @@ pub enum Error { #[error("optimization error: {0}")] OptimizationError(OptimizationError), #[cfg(not(feature = "opt"))] - #[error("Must install with \"opt\" feature, e.g. `cargo install soroban-cli --features opt")] + #[error("Must install with \"opt\" feature, e.g. `cargo install --locked soroban-cli --features opt")] Install, }