Skip to content

Commit

Permalink
main: fix Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlinjin authored and kcalvinalvin committed Jan 31, 2024
1 parent 17c3b69 commit 4939a60
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
strategy:
matrix:
go: ["1.20", "1.21"]
rust:
- version: stable
clippy: true
- version: 1.72.0 # As specified in rust-toolchain
steps:
- uses: actions/checkout@v3

Expand All @@ -21,11 +25,18 @@ jobs:
with:
go-version: ${{ matrix.go }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust.version }}
override: true
profile: minimal

- name: Build
run: go build -v ./...
run: make all

- name: Install Linters
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2

- name: Test
run: sh ./goclean.sh
run: make test
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,27 @@ help: ## Display help
install-rust: ## Install rust if not installed
if ! type cargo &> /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh; fi

install-uniffi-bindgen-go: install-rust ## Install uniffi-bindgen-go if not installed
if ! type uniffi-bindgen-go &> /dev/null; then cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.0+v0.25.0; fi
install-uniffi-bindgen-go: #install-rust ## Install uniffi-bindgen-go if not installed
#if ! type uniffi-bindgen-go &> /dev/null; then
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.0+v0.25.0 #; fi

build-bdk: install-uniffi-bindgen-go ## Build BDK static library
uniffi-bindgen-go -o bdkwallet bdkwallet/bdkgo_crate/src/bdkgo.udl
cargo build --release

build-utreexod: build-bdk ## Build utreexod with all features
go build ./... --tags=bdkwallet
go build --tags=bdkwallet ./...

build-utreexod-without-bdk: ## Build utreexod without BDK wallet
go build ./...

test:
test: build-bdk ## Run all test
cargo test
sh ./goclean.sh

all: build-bdk build-utreexod
all: build-bdk build-utreexod ## Build all

clean:
clean: ## Clean all
rm utreexod
go clean
cargo clean

0 comments on commit 4939a60

Please sign in to comment.