From 1051a3115b3ffe565bc7677cc57b600a62080306 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Fri, 19 Apr 2024 08:22:10 -0700 Subject: [PATCH] chore: improve localnet incremental build times (#2049) * chore: improve localnet incremental build times * try to enable buildkit in github actions --- Dockerfile-localnet | 5 +++-- Makefile | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile-localnet b/Dockerfile-localnet index 65ca4188b4..ba86debb86 100644 --- a/Dockerfile-localnet +++ b/Dockerfile-localnet @@ -3,6 +3,7 @@ FROM golang:1.20-alpine3.18 ENV GOPATH /go ENV GOOS=linux ENV CGO_ENABLED=1 +ENV GOCACHE=/root/.cache/go-build RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux python3 py3-pip RUN pip install requests @@ -14,8 +15,8 @@ COPY go.sum . RUN go mod download COPY . . -RUN make install -RUN make install-zetae2e +RUN --mount=type=cache,target="/root/.cache/go-build" make install +RUN --mount=type=cache,target="/root/.cache/go-build" make install-zetae2e RUN ssh-keygen -A WORKDIR /root diff --git a/Makefile b/Makefile index b8a6d7415f..2cc2bf1d80 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ TEST_DIR?="./..." TEST_BUILD_FLAGS := -tags pebbledb,ledger HSM_BUILD_FLAGS := -tags pebbledb,ledger,hsm_test +export DOCKER_BUILDKIT := 1 + clean: clean-binaries clean-dir clean-test-dir clean-coverage clean-binaries: