From 2f4cac46f7f473566ebea26574f14df724573fdf Mon Sep 17 00:00:00 2001 From: aarzilli Date: Mon, 28 Oct 2024 16:42:04 +0100 Subject: [PATCH] TeamCity: move riscv64 backend testing to tip Updates #3832 --- .teamcity/settings.kts | 2 +- pkg/goversion/compat.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index d07d54101..25bc7d7d9 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -53,7 +53,7 @@ val targets = arrayOf( "linux/ppc64le/1.23", - "linux/riscv64/1.23", + "linux/riscv64/tip", "windows/amd64/1.23", "windows/amd64/tip", diff --git a/pkg/goversion/compat.go b/pkg/goversion/compat.go index e4f9704a5..debb3f1cc 100644 --- a/pkg/goversion/compat.go +++ b/pkg/goversion/compat.go @@ -2,6 +2,7 @@ package goversion import ( "fmt" + "runtime" "github.com/go-delve/delve/pkg/logflags" ) @@ -24,6 +25,13 @@ func Compatible(producer string, warnonly bool) error { if ver.IsOldDevel() { return nil } + if runtime.GOARCH == "riscv64" && !ver.AfterOrEqual(GoVersion{1, 24, versionedDevel, "", ""}) { + if warnonly { + logflags.WriteError(fmt.Sprintf(goTooOldWarn, ver.String())) + return nil + } + return fmt.Errorf(goTooOldErr, ver.String()) + } if !ver.AfterOrEqual(GoVersion{MinSupportedVersionOfGoMajor, MinSupportedVersionOfGoMinor, betaRev(0), "", ""}) { if warnonly { logflags.WriteError(fmt.Sprintf(goTooOldWarn, ver.String()))