MCPcopy
hub / github.com/sirupsen/logrus / getBuildMatrix

Function getBuildMatrix

ci/magefile.go:62–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62func 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
87func CrossBuild() error {
88 matrix, err := getBuildMatrix()

Callers 1

CrossBuildFunction · 0.85

Calls 2

getFullBuildMatrixFunction · 0.85
intersectFunction · 0.85

Tested by

no test coverage detected