From 24210dcad9d5bc0556f36eddeed30e284b987017 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 21 Nov 2025 09:49:26 +0100 Subject: [PATCH] github: Remove test binaries after CI test runs --- magefile.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/magefile.go b/magefile.go index 3e2268b52..0a92ca86d 100644 --- a/magefile.go +++ b/magefile.go @@ -61,6 +61,11 @@ func Uninstall() error { return sh.Run(goexe, "clean", "-i", packageName) } +// Uninstall all installed binaries (including test binaries) +func UninstallAll() error { + return sh.Run(goexe, "clean", "-i", "./...") +} + func flagEnv() map[string]string { hash, _ := sh.Output("git", "rev-parse", "--short", "HEAD") return map[string]string{ @@ -143,7 +148,7 @@ func Check() { if runtime.GOARCH == "amd64" && runtime.GOOS != "darwin" { mg.Deps(Test386) if isCI() { - mg.Deps(CleanTest) + mg.Deps(CleanTest, UninstallAll) } } else { fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS) @@ -159,7 +164,7 @@ func Check() { // causes memory issues in CI. mg.Deps(TestRace) if isCI() { - mg.Deps(CleanTest) + mg.Deps(CleanTest, UninstallAll) } } -- 2.39.5