Skip to content

Commit

Permalink
improve makefile (#1279)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Jun 24, 2024
1 parent 2f9d536 commit bc238dd
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
.PHONY: runtime-upgrade-test
runtime-upgrade-test:
cargo build -p $(runtime)-runtime --release --locked
cd tests/e2e && yarn --frozen-lockfile && yarn test:runtime-upgrade-$(runtime)
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\n Usage: \033[36mmake \x1b[33m[target]\033[0m\n" } /^[a-zA-Z_-]+:.*?##/ { printf " \x1b[33m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)

.DEFAULT_GOAL := help

# use `cargo nextest run` if cargo-nextest is installed, fallback cargo test
cargo_test = $(shell which cargo-nextest >/dev/null && echo "cargo nextest run" || echo "cargo test")

.PHONY: test
test:
test: ## Run unit tests
${cargo_test} --workspace

.PHONY: test-features
test-features:
test-features: ## Run features tests
${cargo_test} --workspace --features try-runtime,runtime-benchmarks,evm-tracing

.PHONY: test-runtimes
test-runtimes:
test-runtimes: ## Run integration tests
SKIP_WASM_BUILD= ${cargo_test} -p integration-tests --features=shibuya
SKIP_WASM_BUILD= ${cargo_test} -p integration-tests --features=shiden
SKIP_WASM_BUILD= ${cargo_test} -p integration-tests --features=astar

.PHONY: test-all
test-all: test test-runtimes test-features
test-all: ## Run all tests
$(MAKE) test
$(MAKE) test-runtimes
$(MAKE) test-features

.PHONY: runtime-upgrade-test
runtime-upgrade-test: ## Runtime upgrade test. e.g. make runtime-upgrade-test runtime=astar
cargo build -p $(runtime)-runtime --release --locked
cd tests/e2e && yarn --frozen-lockfile && yarn test:runtime-upgrade-$(runtime)

.PHONY: build
build: ## Build release profile
cargo build --release --locked

0 comments on commit bc238dd

Please sign in to comment.