forked from Layr-Labs/eigenda-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (56 loc) · 1.99 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
LINTER_VERSION = v1.52.1
LINTER_URL = https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
GET_LINT_CMD = "curl -sSfL $(LINTER_URL) | sh -s -- -b $(go env GOPATH)/bin $(LINTER_VERSION)"
GIT_COMMIT ?= $(shell git rev-parse HEAD)
BUILD_TIME := $(shell date -u '+%Y-%m-%d--%H:%M:%S')
GIT_TAG := $(shell git describe --tags --always --dirty)
LDFLAGSSTRING +=-X main.Commit=$(GIT_COMMIT)
LDFLAGSSTRING +=-X main.Date=$(BUILD_TIME)
LDFLAGSSTRING +=-X main.Version=$(GIT_TAG)
LDFLAGS := -ldflags "$(LDFLAGSSTRING)"
.PHONY: eigenda-proxy
eigenda-proxy:
env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build -v $(LDFLAGS) -o ./bin/eigenda-proxy ./cmd/server
.PHONY: docker-build
docker-build:
# we only use this to build the docker image locally, so we give it the dev tag as a reminder
@docker build -t ghcr.io/layr-labs/eigenda-proxy:dev .
run-memstore-server:
./bin/eigenda-proxy --memstore.enabled
disperse-test-blob:
curl -X POST -d my-blob-content http://127.0.0.1:3100/put/
clean:
rm bin/eigenda-proxy
test:
go test ./... -parallel 4
e2e-test:
INTEGRATION=true go test -timeout 1m ./e2e -parallel 4 -deploy-config ../.devnet/devnetL1.json
holesky-test:
TESTNET=true go test -timeout 50m ./e2e -parallel 4 -deploy-config ../.devnet/devnetL1.json
.PHONY: lint
lint:
@if ! test -f &> /dev/null; \
then \
echo "golangci-lint command could not be found...."; \
echo "\nTo install, please run $(GET_LINT_CMD)"; \
echo "\nBuild instructions can be found at: https://golangci-lint.run/usage/install/."; \
exit 1; \
fi
@golangci-lint run
.PHONY: format
format:
@go fmt ./...
go-gen-mocks:
@echo "generating go mocks..."
@GO111MODULE=on go generate --run "mockgen*" ./...
install-lint:
@echo "Installing golangci-lint..."
@sh -c $(GET_LINT_CMD)
op-devnet-allocs:
@echo "Generating devnet allocs..."
@./scripts/op-devnet-allocs.sh
benchmark:
go test -benchmem -run=^$ -bench . ./e2e -test.parallel 4 -deploy-config ../.devnet/devnetL1.json
.PHONY: \
clean \
test