From 2b54bf3e64f1969dea1fac79365d0b84aa6714a9 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 13 Apr 2022 17:24:32 -0700 Subject: [PATCH] Move GOPROXY from Makefile to cirrus.yml GOPROXY's default value is "https://proxy.golang.org,direct" since go 1.13, so it is redundant to set it explicitly. For some reason though, GOPROXY in Cirrus CI is set to direct, which makes things such as go mod tidy very slow. So, set the proper (default) value for in in .cirrus.yml. Do the same for GOSUMDB. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 3 +++ Makefile | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index eed12b02f6..ee01312796 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,6 +7,9 @@ env: #### # Name of the ultimate destination branch for this CI run, PR or post-merge. DEST_BRANCH: "main" + # Sane (default) value for GOPROXY and GOSUMDB. + GOPROXY: "https://proxy.golang.org,direct" + GOSUMDB: "sum.golang.org" # Overrides default location (/tmp/cirrus) for repo clone GOPATH: &gopath "/var/tmp/go" GOCACHE: "${GOPATH}/cache" diff --git a/Makefile b/Makefile index ff3e69087e..57b8035be7 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,6 @@ ### Variables & Definitions ### -export GOPROXY=https://proxy.golang.org - GO ?= go GO_LDFLAGS:= $(shell if $(GO) version|grep -q gccgo ; then echo "-gccgoflags"; else echo "-ldflags"; fi) GOCMD = CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO)