name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
- # this might remove tools that are actually needed,
- # if set to "true" but frees about 6 GB
- tool-cache: false
+ tool-cache: true
android: true
dotnet: true
haskell: true
}
}
+func emptyEnv() map[string]string {
+ return map[string]string{}
+}
+
// Generate autogen packages
func Generate() error {
generatorPackages := []string{
func Check() {
if runtime.GOARCH == "amd64" && runtime.GOOS != "darwin" {
mg.Deps(Test386)
+ if isCI() {
+ mg.Deps(CleanTest)
+ }
} else {
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
}
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
// causes memory issues in CI.
mg.Deps(TestRace)
+ if isCI() {
+ mg.Deps(CleanTest)
+ }
}
func testGoFlags() string {
return "-timeout=1m"
}
+// Clean Go's test cache.
+func CleanTest() error {
+ return runCmd(emptyEnv(), goexe, "clean", "-testcache")
+}
+
// Run tests in 32-bit mode
// Note that we don't run with the extended tag. Currently not supported in 32 bit.
func Test386() error {