From b959ca35779b5831805422d4f4e5de2fbcb98829 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 2 Apr 2025 16:30:10 -0700 Subject: [PATCH] .cirrus.yml: add golangci-lint cache for freebsd task This shaves the linting time: - from 8 to 2 minutes on Cirrus CI with 4 CPUs and 8 GB RAM; - from 11 to 3 minutes on Cirrus CI with 2 CPUs and 4 GB RAM; when the cache is reused. The cache size is quite modest (~3MB compressed, ~7MB uncompressed). Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 8f2b341538..abb0db8236 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -333,6 +333,13 @@ freebsd_alt_build_task: memory: 8Gb setup_script: - pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf zstd + - go version # Downloads a new go version based on go.mod's go directive. + golint_cache: + folder: ~/.cache/golangci-lint + reupload_on_changes: true + fingerprint_script: + - go version + - grep GOLANGCI_LINT_VERSION Makefile | head -1 lint_script: - gmake golangci-lint build_amd64_script: