github.com/blong14/gache@v0.0.0-20240124023949-89416fd8bbfa/Makefile (about) 1 GO := ~/sdk/go1.21/bin/go 2 GOVERSION := go1.21.3 3 GOLINT := v1.50 4 5 bench: $(wildcard ./**/*.go) 6 $(GO) test -cpu=1,4,8 -bench=BenchmarkSkiplist -run=XXX ./... 7 8 build: $(wildcard ./**/*.go) 9 $(GO) build -o $(PWD)/bin/ github.com/blong14/gache/cmd/... 10 11 .PHONY: clean 12 clean: 13 $(GO) clean ./... 14 rm $(PWD)/bin/* || true 15 rm $(PWD)/.deps/* || true 16 17 .PHONY: init 18 init: go.mod go.sum 19 $(GO) mod tidy 20 $(GO) mod vendor 21 22 .PHONY: lint 23 lint: 24 docker run --rm -v $(PWD):/app -w /app golangci/golangci-lint:${GOLINT} golangci-lint run 25 26 test: 27 $(GO) test -race -cpu=8 -parallel=8 ./... 28 29 dl-golang: 30 @wget -P .deps https://go.dev/dl/${GOVERSION}.linux-amd64.tar.gz 31 @tar -xf .deps/${GOVERSION}.linux-amd64.tar.gz