Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package main | 5 package main |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 Generate the tasks.json file. | 8 Generate the tasks.json file. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 PREFIX_UPLOAD = "Upload" | 36 PREFIX_UPLOAD = "Upload" |
| 37 ) | 37 ) |
| 38 | 38 |
| 39 var ( | 39 var ( |
| 40 // "Constants" | 40 // "Constants" |
| 41 | 41 |
| 42 // Top-level list of all jobs to run at each commit. | 42 // Top-level list of all jobs to run at each commit. |
| 43 JOBS = []string{ | 43 JOBS = []string{ |
| 44 "Build-Ubuntu-GCC-x86_64-Release-GN", | 44 "Build-Ubuntu-GCC-x86_64-Release-GN", |
| 45 "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN", | 45 "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN", |
| 46 "Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_And roid", | |
| 46 "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN", | 47 "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-GN", |
| 47 "Housekeeper-PerCommit-InfraTests", | 48 "Housekeeper-PerCommit-InfraTests", |
| 48 } | 49 } |
| 49 | 50 |
| 50 // UPLOAD_DIMENSIONS are the Swarming dimensions for upload tasks. | 51 // UPLOAD_DIMENSIONS are the Swarming dimensions for upload tasks. |
| 51 UPLOAD_DIMENSIONS = []string{ | 52 UPLOAD_DIMENSIONS = []string{ |
| 52 "cpu:x86-64-avx2", | 53 "cpu:x86-64-avx2", |
| 53 "gpu:none", | 54 "gpu:none", |
| 54 "os:Ubuntu", | 55 "os:Ubuntu", |
| 55 fmt.Sprintf("pool:%s", POOL_SKIA), | 56 fmt.Sprintf("pool:%s", POOL_SKIA), |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 76 return "Build-Ubuntu-GCC-x86_64-Release-Shared" | 77 return "Build-Ubuntu-GCC-x86_64-Release-Shared" |
| 77 } else if parts["role"] == "Test" || parts["role"] == "Perf" { | 78 } else if parts["role"] == "Test" || parts["role"] == "Perf" { |
| 78 task_os := parts["os"] | 79 task_os := parts["os"] |
| 79 ec := parts["extra_config"] | 80 ec := parts["extra_config"] |
| 80 if task_os == "Android" { | 81 if task_os == "Android" { |
| 81 if ec == "Vulkan" { | 82 if ec == "Vulkan" { |
| 82 ec = "Android_Vulkan" | 83 ec = "Android_Vulkan" |
| 83 } else if !strings.Contains(ec, "GN_Android") { | 84 } else if !strings.Contains(ec, "GN_Android") { |
| 84 ec = task_os | 85 ec = task_os |
| 85 } | 86 } |
| 86 » » » task_os = "Android" | 87 » » » task_os = "Ubuntu" |
| 87 } else if task_os == "iOS" { | 88 } else if task_os == "iOS" { |
| 88 ec = task_os | 89 ec = task_os |
| 89 task_os = "Mac" | 90 task_os = "Mac" |
| 90 } else if strings.Contains(task_os, "Win") { | 91 } else if strings.Contains(task_os, "Win") { |
| 91 task_os = "Win" | 92 task_os = "Win" |
| 92 } | 93 } |
| 93 name, err := jobNameSchema.MakeJobName(map[string]string{ | 94 name, err := jobNameSchema.MakeJobName(map[string]string{ |
| 94 "role": "Build", | 95 "role": "Build", |
| 95 "os": task_os, | 96 "os": task_os, |
| 96 "compiler": parts["compiler"], | 97 "compiler": parts["compiler"], |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 deps = append(deps, infra(cfg, name)) | 469 deps = append(deps, infra(cfg, name)) |
| 469 } | 470 } |
| 470 | 471 |
| 471 // Compile bots. | 472 // Compile bots. |
| 472 if parts["role"] == "Build" { | 473 if parts["role"] == "Build" { |
| 473 deps = append(deps, compile(cfg, name, parts)) | 474 deps = append(deps, compile(cfg, name, parts)) |
| 474 } | 475 } |
| 475 | 476 |
| 476 // Any remaining bots need a compile task. | 477 // Any remaining bots need a compile task. |
| 477 compileTaskName := deriveCompileTaskName(name, parts) | 478 compileTaskName := deriveCompileTaskName(name, parts) |
| 479 compileTaskParts, err := jobNameSchema.ParseJobName(compileTaskName) | |
| 480 if err != nil { | |
| 481 glog.Fatal(err) | |
| 482 } | |
| 483 // Temporarily disable the Housekeeper's compile Task, since we aren't | |
| 484 // yet running that Job. | |
| 485 if parts["role"] != "Housekeeper" { | |
|
dogben
2016/10/17 16:32:31
Should this just be name != "Housekeeper-PerCommit
borenet
2016/10/17 16:51:03
So we need this if-statement just to prevent us fr
| |
| 486 compile(cfg, compileTaskName, compileTaskParts) | |
| 487 } | |
| 478 | 488 |
| 479 // Housekeeper. | 489 // Housekeeper. |
| 480 if parts["role"] == "Housekeeper" && name != "Housekeeper-PerCommit-Infr aTests" { | 490 if parts["role"] == "Housekeeper" && name != "Housekeeper-PerCommit-Infr aTests" { |
| 481 deps = append(deps, housekeeper(cfg, name, compileTaskName)) | 491 deps = append(deps, housekeeper(cfg, name, compileTaskName)) |
| 482 } | 492 } |
| 483 | 493 |
| 484 // Common assets needed by the remaining bots. | 494 // Common assets needed by the remaining bots. |
| 485 pkgs := []*specs.CipdPackage{ | 495 pkgs := []*specs.CipdPackage{ |
| 486 getCipdPackage("skimage"), | 496 getCipdPackage("skimage"), |
| 487 getCipdPackage("skp"), | 497 getCipdPackage("skp"), |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 if !ok { | 669 if !ok { |
| 660 return "", fmt.Errorf("Invalid job parts; missing %q", k ) | 670 return "", fmt.Errorf("Invalid job parts; missing %q", k ) |
| 661 } | 671 } |
| 662 rvParts = append(rvParts, v) | 672 rvParts = append(rvParts, v) |
| 663 } | 673 } |
| 664 if _, ok := parts["extra_config"]; ok { | 674 if _, ok := parts["extra_config"]; ok { |
| 665 rvParts = append(rvParts, parts["extra_config"]) | 675 rvParts = append(rvParts, parts["extra_config"]) |
| 666 } | 676 } |
| 667 return strings.Join(rvParts, s.Sep), nil | 677 return strings.Join(rvParts, s.Sep), nil |
| 668 } | 678 } |
| OLD | NEW |