forked from SatoshiPortal/boltz-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (38 loc) · 1.55 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
CLANG_PREFIX += AR=$(shell brew --prefix llvm)/bin/llvm-ar CC=$(shell brew --prefix llvm)/bin/clang
endif
LND_MACAROON_HEX=$(shell xxd -p regtest/boltz/data/lnd1/data/chain/bitcoin/regtest/admin.macaroon | tr -d '\n')
BITCOIND_COOKIE=$(shell cat regtest/boltz/data/bitcoind/regtest/.cookie)
REGTEST_PREFIX = LND_MACAROON_HEX=$(LND_MACAROON_HEX) BITCOIND_COOKIE=$(BITCOIND_COOKIE)
init:
cargo install wasm-pack
build: cargo-build cargo-clippy
cargo-build:
cargo build --all-targets --all-features
wasm-build:
cargo build --target=wasm32-unknown-unknown --all-features
clippy: cargo-clippy wasm-clippy
test: cargo-test wasm-test
regtest-test: cargo-regtest-test wasm-regtest-test
cargo-clippy:
cargo clippy --all-targets --all-features -- -D warnings
cargo-test:
cargo test --features "esplora, electrum, lnurl" -- --nocapture
cargo-regtest-test:
$(REGTEST_PREFIX) cargo test regtest --features "electrum, regtest" -- --nocapture
wasm-clippy:
$(CLANG_PREFIX) cargo clippy --target=wasm32-unknown-unknown --all-features -- -D warnings
BROWSER ?= firefox
wasm-test:
$(CLANG_PREFIX) wasm-pack test --headless --$(BROWSER)
wasm-test-chrome:
BROWSER=chrome $(MAKE) wasm-test
wasm-test-safari:
BROWSER=safari $(MAKE) wasm-test
wasm-regtest-test:
$(CLANG_PREFIX) $(REGTEST_PREFIX) WASM_BINDGEN_TEST_TIMEOUT=500 wasm-pack test --headless --$(BROWSER) --features regtest -- regtest
wasm-regtest-test-chrome:
BROWSER=chrome $(MAKE) wasm-regtest-test
wasm-regtest-test-safari:
BROWSER=safari $(MAKE) wasm-regtest-test