mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 23:17:29 +00:00
.github/workflows: shard the Windows builder
It's one of the slower ones, so split it up into chunks. Updates tailscale/corp#28679 Change-Id: I16a5ba667678bf238c84417a51dda61baefbecf7 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
5a52f80c4c
commit
9af42f425c
@@ -213,6 +213,16 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
// As a special case, if the packages looks like "sharded:1/2" then shell out to
|
||||
// ./tool/listpkgs to cut up the package list pieces for each sharded builder.
|
||||
if nOfM, ok := strings.CutPrefix(packages[0], "sharded:"); ok && len(packages) == 1 {
|
||||
out, err := exec.Command("go", "run", "tailscale.com/tool/listpkgs", "-shard", nOfM, "./...").Output()
|
||||
if err != nil {
|
||||
log.Fatalf("failed to list packages for sharded test: %v", err)
|
||||
}
|
||||
packages = strings.Split(strings.TrimSpace(string(out)), "\n")
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
type nextRun struct {
|
||||
tests []*packageTests
|
||||
|
Reference in New Issue
Block a user