-
Notifications
You must be signed in to change notification settings - Fork 102
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
Cleanup build commands in Makefile #550
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.PHONY: all build build-rust build-go test | ||
|
||
# Builds the Rust library libwasmvm | ||
BUILDERS_PREFIX := cosmwasm/libwasmvm-builder:0100 | ||
# Contains a full Go dev environment including CGO support in order to run Go tests on the built shared library | ||
|
@@ -30,33 +28,37 @@ test-filenames: | |
echo $(SHARED_LIB_DST) | ||
echo $(SHARED_LIB_SRC) | ||
|
||
all: build test | ||
|
||
build: build-rust build-go | ||
|
||
build-rust: build-rust-release | ||
.PHONY: build | ||
build: | ||
make build-libwasmvm | ||
make build-go | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the dependency notation we had before they may run in parallel ( |
||
# Use debug build for quick testing. | ||
# In order to use "--features backtraces" here we need a Rust nightly toolchain, which we don't have by default | ||
build-rust-debug: | ||
.PHONY: build-libwasmvm-debug | ||
build-libwasmvm-debug: | ||
(cd libwasmvm && cargo build) | ||
cp libwasmvm/target/debug/$(SHARED_LIB_SRC) internal/api/$(SHARED_LIB_DST) | ||
make update-bindings | ||
|
||
# use release build to actually ship - smaller and much faster | ||
build-rust-release: | ||
.PHONY: build-libwasmvm | ||
build-libwasmvm: | ||
(cd libwasmvm && cargo build --release) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need two different commands for the release build |
||
cp libwasmvm/target/release/$(SHARED_LIB_SRC) internal/api/$(SHARED_LIB_DST) | ||
make update-bindings | ||
|
||
.PHONY: build-go | ||
build-go: | ||
go build ./... | ||
go build -o build/demo ./cmd/demo | ||
|
||
.PHONY: test | ||
test: | ||
# Use package list mode to include all subdirectores. The -count=1 turns off caching. | ||
RUST_BACKTRACE=1 go test -v -count=1 ./... | ||
|
||
.PHONY: test-safety | ||
test-safety: | ||
# Use package list mode to include all subdirectores. The -count=1 turns off caching. | ||
GOEXPERIMENT=cgocheck2 go test -race -v -count=1 ./... | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decentralize .PHONY to avoid outdated list