strategy:
matrix:
go-version: [1.22.x, 1.23.x]
- os: [ubuntu-latest, macos-latest, windows-latest]
+ os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'ubuntu-latest'
fmt.Printf("Skip Test386 on %s and/or %s\n", runtime.GOARCH, runtime.GOOS)
}
- mg.Deps(Fmt, Vet)
+ if isCi() && isDarwin() {
+ // Skip on macOS in CI (disk space issues)
+ } else {
+ mg.Deps(Fmt, Vet)
+ }
// don't run two tests in parallel, they saturate the CPUs anyway, and running two
// causes memory issues in CI.
return nil
}
+func isCi() bool {
+ return os.Getenv("CI") != ""
+}
+
+func isDarwin() bool {
+ return runtime.GOOS == "darwin"
+}
+
// Run go vet linter
func Vet() error {
if err := sh.Run(goexe, "vet", "./..."); err != nil {