Skip to content

Commit 0f49470

Browse files
committed
make: add linter cache
1 parent d3ab662 commit 0f49470

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ ifneq ($(sys),)
3535
BUILD_SYSTEM = $(sys)
3636
endif
3737

38-
DOCKER_TOOLS = docker run -v $$(pwd):/build chantools-tools
38+
DOCKER_TOOLS = docker run \
39+
--rm \
40+
-v $(shell bash -c "go env GOCACHE || (mkdir -p /tmp/go-cache; echo /tmp/go-cache)"):/tmp/build/.cache \
41+
-v $(shell bash -c "go env GOMODCACHE || (mkdir -p /tmp/go-modcache; echo /tmp/go-modcache)"):/tmp/build/.modcache \
42+
-v $(shell bash -c "mkdir -p /tmp/go-lint-cache; echo /tmp/go-lint-cache"):/root/.cache/golangci-lint \
43+
-v $$(pwd):/build chantools-tools
3944

4045
TEST_FLAGS = -test.timeout=20m
4146

0 commit comments

Comments
 (0)