Skip to content

Commit a5c0cfb

Browse files
authored
build: fix lint on ARM (ethereum#24311)
* build: append GOARM to arm lint download URL otherwise it fails with: downloading from https://github.com/golangci/golangci-lint/releases/download/v1.42.0/golangci-lint-1.42.0-linux-arm.tar.gz ci.go:347: download error: status 404 * build: increase timeout for lint Otherwise it times out on a pi * Increase timeout even further saw longer build times
1 parent cac09a3 commit a5c0cfb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: .golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file configures github.com/golangci/golangci-lint.
22

33
run:
4-
timeout: 5m
4+
timeout: 20m
55
tests: true
66
# default is true. Enables skipping of directories:
77
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$

Diff for: build/ci.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ func downloadLinter(cachedir string) string {
334334
const version = "1.42.0"
335335

336336
csdb := build.MustLoadChecksums("build/checksums.txt")
337-
base := fmt.Sprintf("golangci-lint-%s-%s-%s", version, runtime.GOOS, runtime.GOARCH)
337+
arch := runtime.GOARCH
338+
if arch == "arm" {
339+
arch += "v" + os.Getenv("GOARM")
340+
}
341+
base := fmt.Sprintf("golangci-lint-%s-%s-%s", version, runtime.GOOS, arch)
338342
url := fmt.Sprintf("https://github.com/golangci/golangci-lint/releases/download/v%s/%s.tar.gz", version, base)
339343
archivePath := filepath.Join(cachedir, base+".tar.gz")
340344
if err := csdb.DownloadFile(url, archivePath); err != nil {

0 commit comments

Comments
 (0)