File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 2424 name : Free Disk Space (Ubuntu)
2525 uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
2626 with :
27- # this might remove tools that are actually needed,
28- # if set to "true" but frees about 6 GB
29- tool-cache : false
27+ tool-cache : true
3028 android : true
3129 dotnet : true
3230 haskell : true
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ func flagEnv() map[string]string {
7070 }
7171}
7272
73+ func emptyEnv () map [string ]string {
74+ return map [string ]string {}
75+ }
76+
7377// Generate autogen packages
7478func Generate () error {
7579 generatorPackages := []string {
@@ -138,6 +142,9 @@ func Docker() error {
138142func Check () {
139143 if runtime .GOARCH == "amd64" && runtime .GOOS != "darwin" {
140144 mg .Deps (Test386 )
145+ if isCI () {
146+ mg .Deps (CleanTest )
147+ }
141148 } else {
142149 fmt .Printf ("Skip Test386 on %s and/or %s\n " , runtime .GOARCH , runtime .GOOS )
143150 }
@@ -151,6 +158,9 @@ func Check() {
151158 // don't run two tests in parallel, they saturate the CPUs anyway, and running two
152159 // causes memory issues in CI.
153160 mg .Deps (TestRace )
161+ if isCI () {
162+ mg .Deps (CleanTest )
163+ }
154164}
155165
156166func testGoFlags () string {
@@ -161,6 +171,11 @@ func testGoFlags() string {
161171 return "-timeout=1m"
162172}
163173
174+ // Clean Go's test cache.
175+ func CleanTest () error {
176+ return runCmd (emptyEnv (), goexe , "clean" , "-testcache" )
177+ }
178+
164179// Run tests in 32-bit mode
165180// Note that we don't run with the extended tag. Currently not supported in 32 bit.
166181func Test386 () error {
You can’t perform that action at this time.
0 commit comments