()
| 60 | } |
| 61 | |
| 62 | func getBuildMatrix() (map[string][]string, error) { |
| 63 | minimalMatrix := map[string][]string{ |
| 64 | "linux": []string{"amd64"}, |
| 65 | "darwin": []string{"amd64", "arm64"}, |
| 66 | "freebsd": []string{"amd64"}, |
| 67 | "js": []string{"wasm"}, |
| 68 | "solaris": []string{"amd64"}, |
| 69 | "windows": []string{"amd64", "arm64"}, |
| 70 | } |
| 71 | |
| 72 | fullMatrix, err := getFullBuildMatrix() |
| 73 | if err != nil { |
| 74 | return nil, err |
| 75 | } |
| 76 | |
| 77 | for os, arches := range minimalMatrix { |
| 78 | if fullV, ok := fullMatrix[os]; !ok { |
| 79 | delete(minimalMatrix, os) |
| 80 | } else { |
| 81 | minimalMatrix[os] = intersect(arches, fullV) |
| 82 | } |
| 83 | } |
| 84 | return minimalMatrix, nil |
| 85 | } |
| 86 | |
| 87 | func CrossBuild() error { |
| 88 | matrix, err := getBuildMatrix() |
no test coverage detected