From 0f494706a32aa88ddc0c462cba7dfe99c9035201 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 12 Jul 2024 09:19:12 +0200 Subject: [PATCH] make: add linter cache --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3e5c852..44855b5 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,12 @@ ifneq ($(sys),) BUILD_SYSTEM = $(sys) endif -DOCKER_TOOLS = docker run -v $$(pwd):/build chantools-tools +DOCKER_TOOLS = docker run \ + --rm \ + -v $(shell bash -c "go env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache)"):/tmp/build/.cache \ + -v $(shell bash -c "go env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache)"):/tmp/build/.modcache \ + -v $(shell bash -c "mkdir -p /tmp/go-lint-cache; echo /tmp/go-lint-cache"):/root/.cache/golangci-lint \ + -v $$(pwd):/build chantools-tools TEST_FLAGS = -test.timeout=20m