Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make builds and tests consistent #1222

Merged
merged 4 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion cmd/soroban-cli/src/commands/contract/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
Loading