forked from mfactory-lab/ic-solana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/make
.DEFAULT_GOAL: help
help: ## Show this help
@printf "\033[33m%s:\033[0m\n" 'Available commands'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
# ----------------------------------------------------------------------------------------------------------------------
.PHONY: start
start: ## Start the canisters
RUST_BACKTRACE=1 dfx start --clean
.PHONY: build
build: ## Build the canisters
./scripts/build
.PHONY: test
test: ## Run tests
dfx build test_canister; \
@{ \
export IC_SOLANA_PROVIDER_PATH=./target/wasm32-unknown-unknown/release/ic_solana_provider.wasm.gz; \
export SCHNORR_CANISTER_PATH=./target/wasm32-unknown-unknown/release/test_canister.wasm.gz; \
$(MAKE) build; \
cargo test --test integration_tests $(if $(TEST_NAME),-- $(TEST_NAME) --nocapture,-- --nocapture); \
}
.PHONY: test-e2e
test-e2e: build ## Run e2e tests
dfx canister call test_canister test
.PHONY: clean
clean: ## Cleanup
rm -rf .dfx
rm -rf node_modules
rm -rf src/declarations
cargo clean
%::
@true