mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-14 00:18:03 -05:00
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Co-authored-by: colinlyguo <102356659+colinlyguo@users.noreply.github.com> Co-authored-by: colinlyguo <colinlyguo@gmail.com> Co-authored-by: HAOYUatHZ <haoyu@protonmail.com>
46 lines
1.7 KiB
Makefile
46 lines
1.7 KiB
Makefile
.PHONY: lint docker clean roller mock_roller
|
|
|
|
IMAGE_NAME=go-roller
|
|
IMAGE_VERSION=latest
|
|
|
|
ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3)))
|
|
ZK_VERSION=$(shell grep -m 1 "common-rs" ../common/libzkp/impl/Cargo.lock | cut -d "#" -f2 | cut -c-7)
|
|
else
|
|
ZK_VERSION=$(shell grep -m 1 "common-rs" ../common/libzkp/impl/Cargo.lock | cut -d "\#" -f2 | cut -c-7)
|
|
endif
|
|
|
|
libzkp:
|
|
cd ../common/libzkp/impl && cargo build --release && cp ./target/release/libzkp.a ../interface/
|
|
cp -r ../common/libzkp/interface ./core/prover/lib
|
|
|
|
roller: ## Build the Roller instance.
|
|
cd ../common/libzkp/impl && cargo build --release && cp ./target/release/libzkp.a ../interface/
|
|
cp -r ../common/libzkp/interface ./core/prover/lib
|
|
GOBIN=$(PWD)/build/bin go build -ldflags "-X scroll-tech/roller/core.ZK_VERSION=${ZK_VERSION}" -o $(PWD)/build/bin/roller ./cmd
|
|
|
|
gpu-roller: ## Build the GPU Roller instance.
|
|
cd ../common/libzkp/impl && cargo build --release && cp ./target/release/libzkp.a ../interface/
|
|
cp -r ../common/libzkp/interface ./core/prover/lib
|
|
GOBIN=$(PWD)/build/bin go build -ldflags "-X scroll-tech/roller/core.ZK_VERSION=${ZK_VERSION}" -tags gpu -o $(PWD)/build/bin/roller ./cmd
|
|
|
|
mock_roller:
|
|
GOBIN=$(PWD)/build/bin go build -tags mock_prover -o $(PWD)/build/bin/roller $(PWD)/cmd
|
|
|
|
test-prover:
|
|
go test -tags ffi -timeout 0 -v ./core/prover
|
|
|
|
test-gpu-prover:
|
|
go test -tags="gpu ffi" -timeout 0 -v ./core/prover
|
|
|
|
lastest-zk-version:
|
|
curl -sL https://api.github.com/repos/scroll-tech/common-rs/commits | jq -r ".[0].sha"
|
|
|
|
lint: ## Lint the files - used for CI
|
|
GOBIN=$(PWD)/build/bin go run ../build/lint.go
|
|
|
|
clean: ## Empty out the bin folder
|
|
@rm -rf build/bin
|
|
|
|
# docker:
|
|
# docker build -t scrolltech/${IMAGE_NAME}:${IMAGE_VERSION} ../ -f ./Dockerfile
|