Skip to content

Commit

Permalink
refinements on Makefile, enable or disable CGO explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
msf committed Jun 19, 2024
1 parent 5223352 commit f28d588
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ bin:
bin/moq: bin
GOBIN=$(PWD)/bin go install github.com/matryer/[email protected]
bin/golangci-lint: bin
GOBIN=$(PWD)/bin go install github.com/golangci/golangci-lint/cmd/[email protected].0
GOBIN=$(PWD)/bin go install github.com/golangci/golangci-lint/cmd/[email protected].1
bin/gofumpt: bin
GOBIN=$(PWD)/bin go install mvdan.cc/[email protected]

build: cmd/main.go
go build -o indexer cmd/main.go
CGO_ENABLED=0 go build -o indexer cmd/main.go

lint: bin/golangci-lint bin/gofumpt
go fmt ./...
Expand All @@ -32,7 +32,7 @@ lint: bin/golangci-lint bin/gofumpt

test:
go mod tidy
go test -timeout=$(TEST_TIMEOUT) -race -bench=. -benchmem -cover ./...
CGO_ENABLED=1 go test -timeout=$(TEST_TIMEOUT) -race -bench=. -benchmem -cover ./...

gen-mocks: bin/moq ./client/jsonrpc/ ./client/duneapi/
./bin/moq -pkg jsonrpc_mock -out ./mocks/jsonrpc/rpcnode.go ./client/jsonrpc BlockchainClient
Expand Down

0 comments on commit f28d588

Please sign in to comment.