Makefile 581 B

12345678910111213141516171819202122
  1. all: testdeps
  2. go test ./...
  3. go test ./... -short -race
  4. env GOOS=linux GOARCH=386 go test ./...
  5. go vet
  6. go get github.com/gordonklaus/ineffassign
  7. ineffassign .
  8. testdeps: testdata/redis/src/redis-server
  9. bench: testdeps
  10. go test ./... -test.run=NONE -test.bench=. -test.benchmem
  11. .PHONY: all test testdeps bench
  12. testdata/redis:
  13. mkdir -p $@
  14. wget -qO- https://github.com/antirez/redis/archive/5.0.tar.gz | tar xvz --strip-components=1 -C $@
  15. testdata/redis/src/redis-server: testdata/redis
  16. sed -i.bak 's/libjemalloc.a/libjemalloc.a -lrt/g' $</src/Makefile
  17. cd $< && make all