Skip to content

Commit fbb118e

Browse files
committed
cirrus: save/restore golangci-lint cache for linux
This shaves off some time from golangci-lint run. For linux, it's down from 5 to 3 minutes (for the whole task, not just the golangci-lint runs), and the cache is only ~7MB (according to golangci-lint, probably uncompressed) or ~2MB (according to cirrus CI, probably compressed). For Mac, due to remote build tag we don't lint much so linting takes less than a minute, so it is not worth optimizing. For Windows, similar. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 4f75d0b commit fbb118e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.cirrus.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ validate-source_task:
120120
fi
121121
# Standard setup stage call, used by nearly every task in CI.
122122
setup_script: &setup '$GOSRC/$SCRIPT_BASE/setup_environment.sh'
123+
golangci-lint_cache:
124+
folder: /root/.cache/golangci-lint
125+
reupload_on_changes: true
126+
fingerprint_script:
127+
- go version
128+
- grep GOLANGCI_LINT_VERSION Makefile | head -1
123129
# Standard main execution stage call, used by nearly every task in CI.
124130
main_script: &main '/usr/bin/time --verbose --output="$STATS_LOGFILE" $GOSRC/$SCRIPT_BASE/runner.sh'
125131

0 commit comments

Comments
 (0)