borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | package main |
| 6 | |
| 7 | /* |
| 8 | Generate the tasks.json file. |
| 9 | */ |
| 10 | |
| 11 | import ( |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 12 | "encoding/json" |
| 13 | "fmt" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 14 | "os" |
| 15 | "path" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 16 | "sort" |
| 17 | "strings" |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 18 | "time" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 19 | |
| 20 | "github.com/skia-dev/glog" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 21 | "go.skia.org/infra/go/util" |
| 22 | "go.skia.org/infra/task_scheduler/go/specs" |
| 23 | ) |
| 24 | |
| 25 | const ( |
Kevin Lubick | 797ef16 | 2016-12-15 10:45:08 -0500 | [diff] [blame] | 26 | DEFAULT_OS = DEFAULT_OS_LINUX |
| 27 | DEFAULT_OS_LINUX = "Ubuntu-14.04" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 28 | |
| 29 | // Pool for Skia bots. |
| 30 | POOL_SKIA = "Skia" |
| 31 | |
| 32 | // Name prefix for upload jobs. |
| 33 | PREFIX_UPLOAD = "Upload" |
| 34 | ) |
| 35 | |
| 36 | var ( |
| 37 | // "Constants" |
| 38 | |
| 39 | // Top-level list of all jobs to run at each commit. |
| 40 | JOBS = []string{ |
Eric Boren | eaef615 | 2016-11-18 08:24:21 -0500 | [diff] [blame] | 41 | "Build-Mac-Clang-Arm7-Debug-iOS", |
| 42 | "Build-Mac-Clang-Arm7-Release-iOS", |
Mike Klein | b48fd3c | 2017-01-23 11:58:53 -0500 | [diff] [blame] | 43 | "Build-Mac-Clang-arm-Debug-GN_iOS", |
| 44 | "Build-Mac-Clang-arm-Release-GN_iOS", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 45 | "Build-Mac-Clang-arm64-Debug-Android", |
Mike Klein | 6749af4 | 2016-11-07 15:38:48 -0500 | [diff] [blame] | 46 | "Build-Mac-Clang-arm64-Debug-GN_iOS", |
Mike Klein | b48fd3c | 2017-01-23 11:58:53 -0500 | [diff] [blame] | 47 | "Build-Mac-Clang-arm64-Release-GN_iOS", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 48 | "Build-Mac-Clang-x86_64-Debug", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 49 | "Build-Mac-Clang-x86_64-Debug-CommandBuffer", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 50 | "Build-Mac-Clang-x86_64-Release", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 51 | "Build-Mac-Clang-x86_64-Release-CommandBuffer", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 52 | "Build-Ubuntu-Clang-arm-Debug-Android", |
| 53 | "Build-Ubuntu-Clang-arm-Release-Android", |
| 54 | "Build-Ubuntu-Clang-arm64-Debug-Android", |
| 55 | "Build-Ubuntu-Clang-arm64-Debug-Android_FrameworkDefs", |
| 56 | "Build-Ubuntu-Clang-arm64-Debug-Android_Vulkan", |
| 57 | "Build-Ubuntu-Clang-arm64-Release-Android", |
| 58 | "Build-Ubuntu-Clang-arm64-Release-Android_Vulkan", |
| 59 | "Build-Ubuntu-Clang-mips64el-Debug-Android", |
| 60 | "Build-Ubuntu-Clang-mips64el-Release-Android", |
| 61 | "Build-Ubuntu-Clang-mipsel-Debug-Android", |
| 62 | "Build-Ubuntu-Clang-mipsel-Release-Android", |
| 63 | "Build-Ubuntu-Clang-x64-Debug-Android", |
| 64 | "Build-Ubuntu-Clang-x64-Release-Android", |
| 65 | "Build-Ubuntu-Clang-x86-Debug-Android", |
| 66 | "Build-Ubuntu-Clang-x86-Debug-Android_Vulkan", |
| 67 | "Build-Ubuntu-Clang-x86-Release-Android", |
| 68 | "Build-Ubuntu-Clang-x86-Release-Android_Vulkan", |
| 69 | "Build-Ubuntu-Clang-x86_64-Debug", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 70 | "Build-Ubuntu-Clang-x86_64-Debug-ASAN", |
| 71 | "Build-Ubuntu-Clang-x86_64-Debug-MSAN", |
Kevin Lubick | 9c7dcac | 2017-01-18 09:24:56 -0500 | [diff] [blame] | 72 | "Build-Ubuntu-Clang-x86_64-Debug-Vulkan", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 73 | "Build-Ubuntu-Clang-x86_64-Release", |
Mike Klein | d8ee67c | 2017-01-19 12:14:50 -0500 | [diff] [blame] | 74 | "Build-Ubuntu-Clang-x86_64-Release-ASAN", |
Mike Klein | 5677075 | 2017-01-05 08:09:57 -0500 | [diff] [blame] | 75 | "Build-Ubuntu-Clang-x86_64-Release-Fast", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 76 | "Build-Ubuntu-Clang-x86_64-Release-TSAN", |
Kevin Lubick | 9c7dcac | 2017-01-18 09:24:56 -0500 | [diff] [blame] | 77 | "Build-Ubuntu-Clang-x86_64-Release-Vulkan", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 78 | "Build-Ubuntu-GCC-x86-Debug", |
| 79 | "Build-Ubuntu-GCC-x86-Release", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 80 | "Build-Ubuntu-GCC-x86_64-Debug", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 81 | "Build-Ubuntu-GCC-x86_64-Debug-NoGPU", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 82 | "Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 83 | "Build-Ubuntu-GCC-x86_64-Release", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 84 | "Build-Ubuntu-GCC-x86_64-Release-ANGLE", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 85 | "Build-Ubuntu-GCC-x86_64-Release-Mesa", |
| 86 | "Build-Ubuntu-GCC-x86_64-Release-NoGPU", |
| 87 | "Build-Ubuntu-GCC-x86_64-Release-PDFium", |
Eric Boren | 3dc73f3 | 2016-12-13 08:48:46 -0500 | [diff] [blame] | 88 | "Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 89 | "Build-Ubuntu-GCC-x86_64-Release-SKNX_NO_SIMD", |
| 90 | "Build-Ubuntu-GCC-x86_64-Release-Shared", |
Eric Boren | bd488f8 | 2016-11-23 11:03:28 -0500 | [diff] [blame] | 91 | "Build-Ubuntu-GCC-x86_64-Release-Valgrind", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 92 | "Build-Win-Clang-arm64-Release-Android", |
Eric Boren | cb4feeb | 2016-11-28 10:12:09 -0500 | [diff] [blame] | 93 | "Build-Win-MSVC-x86-Debug", |
| 94 | "Build-Win-MSVC-x86-Debug-ANGLE", |
| 95 | "Build-Win-MSVC-x86-Debug-Exceptions", |
| 96 | "Build-Win-MSVC-x86-Debug-GDI", |
| 97 | "Build-Win-MSVC-x86-Release", |
| 98 | "Build-Win-MSVC-x86-Release-ANGLE", |
| 99 | "Build-Win-MSVC-x86-Release-GDI", |
| 100 | "Build-Win-MSVC-x86_64-Debug", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 101 | "Build-Win-MSVC-x86_64-Debug-ANGLE", |
| 102 | "Build-Win-MSVC-x86_64-Debug-GDI", |
| 103 | "Build-Win-MSVC-x86_64-Debug-Vulkan", |
Eric Boren | cb4feeb | 2016-11-28 10:12:09 -0500 | [diff] [blame] | 104 | "Build-Win-MSVC-x86_64-Release", |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 105 | "Build-Win-MSVC-x86_64-Release-ANGLE", |
| 106 | "Build-Win-MSVC-x86_64-Release-GDI", |
Eric Boren | cb4feeb | 2016-11-28 10:12:09 -0500 | [diff] [blame] | 107 | "Build-Win-MSVC-x86_64-Release-Vulkan", |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 108 | "Housekeeper-Nightly-RecreateSKPs_Canary", |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 109 | "Housekeeper-PerCommit", |
Eric Boren | 792079cf | 2016-11-09 14:03:20 -0500 | [diff] [blame] | 110 | "Housekeeper-PerCommit-InfraTests", |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 111 | "Housekeeper-Weekly-RecreateSKPs", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 112 | "Perf-Android-Clang-AndroidOne-CPU-MT6582-arm-Debug-Android", |
| 113 | "Perf-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-Android", |
| 114 | "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Debug-Android", |
| 115 | "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-Android", |
| 116 | "Perf-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-Android", |
| 117 | "Perf-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-Android_Vulkan", |
| 118 | "Perf-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Release-Android", |
| 119 | "Perf-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Release-Android_Vulkan", |
| 120 | "Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android", |
| 121 | "Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_Vulkan", |
| 122 | "Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Release-Android", |
| 123 | "Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Release-Android_Vulkan", |
| 124 | "Perf-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android", |
| 125 | "Perf-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-Android", |
| 126 | "Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-Android", |
| 127 | "Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 128 | "Perf-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android", |
| 129 | "Perf-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android_Vulkan", |
| 130 | "Perf-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Release-Android", |
| 131 | "Perf-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Release-Android_Vulkan", |
| 132 | "Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android", |
| 133 | "Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 134 | "Perf-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Debug-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 135 | "Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android", |
Greg Daniel | 879bdc9 | 2016-12-19 09:28:50 -0500 | [diff] [blame] | 136 | // "Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android_Vulkan", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 137 | "Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android", |
Greg Daniel | 879bdc9 | 2016-12-19 09:28:50 -0500 | [diff] [blame] | 138 | // "Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 139 | "Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-Android", |
| 140 | "Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Debug-Android_Vulkan", |
| 141 | "Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Release-Android", |
| 142 | "Perf-Android-Clang-Pixel-GPU-Adreno530-arm64-Release-Android_Vulkan", |
Kevin Lubick | e29ce64 | 2016-12-09 11:11:33 -0500 | [diff] [blame] | 143 | "Perf-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android", |
| 144 | "Perf-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 145 | "Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench", |
| 146 | "Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Vulkan_Skpbench", |
| 147 | "Perf-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug", |
| 148 | "Perf-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release", |
| 149 | "Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug", |
| 150 | "Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release", |
| 151 | "Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug", |
| 152 | "Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Release", |
Eric Boren | b409c6a | 2016-11-28 07:22:18 -0500 | [diff] [blame] | 153 | "Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Release-CommandBuffer", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 154 | "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 155 | "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 156 | "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 157 | "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release", |
Mike Klein | d8ee67c | 2017-01-19 12:14:50 -0500 | [diff] [blame] | 158 | "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN", |
Mike Klein | 5677075 | 2017-01-05 08:09:57 -0500 | [diff] [blame] | 159 | "Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast", |
Eric Boren | bd488f8 | 2016-11-23 11:03:28 -0500 | [diff] [blame] | 160 | "Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN", |
Mike Klein | d8ee67c | 2017-01-19 12:14:50 -0500 | [diff] [blame] | 161 | "Perf-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 162 | "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 163 | "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 164 | "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 165 | "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release", |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 166 | "Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs", |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 167 | "Perf-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-CT_BENCH_1k_SKPs", |
Eric Boren | bd488f8 | 2016-11-23 11:03:28 -0500 | [diff] [blame] | 168 | "Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 169 | "Perf-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug", |
| 170 | "Perf-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release", |
Kevin Lubick | 893c49e | 2017-01-17 15:15:40 -0500 | [diff] [blame] | 171 | "Perf-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Debug", |
| 172 | "Perf-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Release", |
Kevin Lubick | 9c7dcac | 2017-01-18 09:24:56 -0500 | [diff] [blame] | 173 | "Perf-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan", |
| 174 | "Perf-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Release-Vulkan", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 175 | "Perf-Win10-MSVC-Golo-GPU-GT610-x86_64-Release", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 176 | "Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug", |
| 177 | "Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE", |
| 178 | "Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan", |
| 179 | "Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release", |
| 180 | "Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE", |
| 181 | "Perf-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-Vulkan", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 182 | "Perf-Win10-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug-ANGLE", |
| 183 | "Perf-Win10-MSVC-NUC-GPU-IntelIris6100-x86_64-Release-ANGLE", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 184 | "Perf-Win10-MSVC-ShuttleA-GPU-AMDHD7770-x86_64-Debug", |
| 185 | "Perf-Win10-MSVC-ShuttleA-GPU-AMDHD7770-x86_64-Release", |
Eric Boren | 78f5af7 | 2016-11-30 12:49:00 -0500 | [diff] [blame] | 186 | "Perf-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug", |
| 187 | "Perf-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan", |
| 188 | "Perf-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Release", |
| 189 | "Perf-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Release-Vulkan", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 190 | "Perf-Win10-MSVC-ShuttleB-GPU-IntelHD4600-x86_64-Debug", |
| 191 | "Perf-Win10-MSVC-ShuttleB-GPU-IntelHD4600-x86_64-Release", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 192 | "Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug", |
| 193 | "Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE", |
| 194 | "Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Release", |
| 195 | "Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Release-ANGLE", |
| 196 | "Perf-Win10-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug", |
| 197 | "Perf-Win10-MSVC-ShuttleC-GPU-iHD530-x86_64-Release", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 198 | "Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug", |
| 199 | "Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE", |
| 200 | "Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan", |
| 201 | "Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Release", |
| 202 | "Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Release-ANGLE", |
| 203 | "Perf-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Release-Vulkan", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 204 | "Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86-Debug", |
| 205 | "Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug", |
| 206 | "Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI", |
| 207 | "Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release", |
Eric Boren | 792079cf | 2016-11-09 14:03:20 -0500 | [diff] [blame] | 208 | "Perf-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Debug", |
| 209 | "Perf-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Release", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 210 | "Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Debug-Android", |
| 211 | "Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-Android", |
| 212 | "Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Debug-Android", |
| 213 | "Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-Android", |
| 214 | "Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-Android", |
| 215 | "Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-Android_Vulkan", |
| 216 | "Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Release-Android", |
| 217 | "Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Release-Android_Vulkan", |
Kevin Lubick | 56ff9a1 | 2016-12-14 08:48:00 -0500 | [diff] [blame] | 218 | "Test-Android-Clang-GalaxyTab3-GPU-Vivante-arm-Debug-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 219 | "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android", |
| 220 | "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_Vulkan", |
| 221 | "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Release-Android", |
| 222 | "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Release-Android_Vulkan", |
| 223 | "Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android", |
| 224 | "Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-Android", |
| 225 | "Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-Android", |
| 226 | "Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 227 | "Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android", |
| 228 | "Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android_Vulkan", |
| 229 | "Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Release-Android", |
| 230 | "Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Release-Android_Vulkan", |
| 231 | "Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android", |
| 232 | "Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 233 | "Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Debug-Android", |
| 234 | "Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-Android", |
| 235 | "Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android", |
Greg Daniel | 80a08dd | 2017-01-20 10:45:49 -0500 | [diff] [blame] | 236 | "Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Debug-Android_Vulkan", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 237 | "Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android", |
Greg Daniel | 80a08dd | 2017-01-20 10:45:49 -0500 | [diff] [blame] | 238 | "Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan", |
Kevin Lubick | e29ce64 | 2016-12-09 11:11:33 -0500 | [diff] [blame] | 239 | "Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android", |
| 240 | "Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 241 | "Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android", |
| 242 | "Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_Vulkan", |
| 243 | "Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Release-Android", |
| 244 | "Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Release-Android_Vulkan", |
| 245 | "Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug", |
| 246 | "Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release", |
| 247 | "Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug", |
| 248 | "Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release", |
| 249 | "Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug", |
Eric Boren | b409c6a | 2016-11-28 07:22:18 -0500 | [diff] [blame] | 250 | "Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 251 | "Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Release", |
| 252 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 253 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 254 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 255 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release", |
Mike Klein | d8ee67c | 2017-01-19 12:14:50 -0500 | [diff] [blame] | 256 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN", |
Mike Klein | 5677075 | 2017-01-05 08:09:57 -0500 | [diff] [blame] | 257 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-Fast", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 258 | "Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN", |
Eric Boren | bd488f8 | 2016-11-23 11:03:28 -0500 | [diff] [blame] | 259 | "Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN", |
Mike Klein | d8ee67c | 2017-01-19 12:14:50 -0500 | [diff] [blame] | 260 | "Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-ASAN", |
Eric Boren | bd488f8 | 2016-11-23 11:03:28 -0500 | [diff] [blame] | 261 | "Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Release-TSAN", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 262 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 263 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug", |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 264 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_100k_SKPs", |
| 265 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_1m_SKPs", |
| 266 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_IMG_DECODE_100k_SKPs", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 267 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 268 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release", |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 269 | "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD", |
Eric Boren | bd488f8 | 2016-11-23 11:03:28 -0500 | [diff] [blame] | 270 | "Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind", |
Mike Klein | 2afffbd | 2016-12-05 10:42:36 -0500 | [diff] [blame] | 271 | "Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug", |
| 272 | "Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release", |
Kevin Lubick | 893c49e | 2017-01-17 15:15:40 -0500 | [diff] [blame] | 273 | "Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Debug", |
| 274 | "Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Release", |
Kevin Lubick | 9c7dcac | 2017-01-18 09:24:56 -0500 | [diff] [blame] | 275 | "Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan", |
| 276 | "Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Release-Vulkan", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 277 | "Test-Win10-MSVC-Golo-GPU-GT610-x86_64-Release", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 278 | "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug", |
| 279 | "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE", |
| 280 | "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan", |
| 281 | "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release", |
| 282 | "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-ANGLE", |
| 283 | "Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Release-Vulkan", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 284 | "Test-Win10-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug-ANGLE", |
| 285 | "Test-Win10-MSVC-NUC-GPU-IntelIris6100-x86_64-Release-ANGLE", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 286 | "Test-Win10-MSVC-ShuttleA-GPU-AMDHD7770-x86_64-Debug", |
| 287 | "Test-Win10-MSVC-ShuttleA-GPU-AMDHD7770-x86_64-Release", |
Eric Boren | 78f5af7 | 2016-11-30 12:49:00 -0500 | [diff] [blame] | 288 | "Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug", |
| 289 | "Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan", |
| 290 | "Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Release", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 291 | "Test-Win10-MSVC-ShuttleB-GPU-IntelHD4600-x86_64-Debug", |
| 292 | "Test-Win10-MSVC-ShuttleB-GPU-IntelHD4600-x86_64-Release", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 293 | "Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug", |
| 294 | "Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE", |
| 295 | "Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Release", |
| 296 | "Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Release-ANGLE", |
| 297 | "Test-Win10-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug", |
| 298 | "Test-Win10-MSVC-ShuttleC-GPU-iHD530-x86_64-Release", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 299 | "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug", |
| 300 | "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-ANGLE", |
| 301 | "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan", |
| 302 | "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Release", |
| 303 | "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Release-ANGLE", |
| 304 | "Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Release-Vulkan", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 305 | "Test-Win2k8-MSVC-GCE-CPU-AVX2-x86-Debug", |
| 306 | "Test-Win2k8-MSVC-GCE-CPU-AVX2-x86-Release", |
| 307 | "Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug", |
| 308 | "Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug-GDI", |
| 309 | "Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release", |
| 310 | "Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release-GDI", |
Eric Boren | 792079cf | 2016-11-09 14:03:20 -0500 | [diff] [blame] | 311 | "Test-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Debug", |
| 312 | "Test-iOS-Clang-iPadMini4-GPU-GX6450-Arm7-Release", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 313 | } |
| 314 | |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 315 | // LINUX_GCE_DIMENSIONS are the Swarming dimensions for Linux GCE |
| 316 | // instances. |
| 317 | LINUX_GCE_DIMENSIONS = []string{ |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 318 | "cpu:x86-64-avx2", |
| 319 | "gpu:none", |
Kevin Lubick | 797ef16 | 2016-12-15 10:45:08 -0500 | [diff] [blame] | 320 | fmt.Sprintf("os:%s", DEFAULT_OS_LINUX), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 321 | fmt.Sprintf("pool:%s", POOL_SKIA), |
| 322 | } |
| 323 | |
| 324 | // Defines the structure of job names. |
| 325 | jobNameSchema *JobNameSchema |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 326 | ) |
| 327 | |
| 328 | // deriveCompileTaskName returns the name of a compile task based on the given |
| 329 | // job name. |
| 330 | func deriveCompileTaskName(jobName string, parts map[string]string) string { |
| 331 | if parts["role"] == "Housekeeper" { |
| 332 | return "Build-Ubuntu-GCC-x86_64-Release-Shared" |
| 333 | } else if parts["role"] == "Test" || parts["role"] == "Perf" { |
| 334 | task_os := parts["os"] |
| 335 | ec := parts["extra_config"] |
Kevin Lubick | b03b5ac | 2016-11-14 13:42:27 -0500 | [diff] [blame] | 336 | ec = strings.TrimSuffix(ec, "_Skpbench") |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 337 | if task_os == "Android" { |
| 338 | if ec == "Vulkan" { |
| 339 | ec = "Android_Vulkan" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 340 | } |
borenet | 5238343 | 2016-10-17 10:17:53 -0700 | [diff] [blame] | 341 | task_os = "Ubuntu" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 342 | } else if task_os == "iOS" { |
| 343 | ec = task_os |
| 344 | task_os = "Mac" |
| 345 | } else if strings.Contains(task_os, "Win") { |
| 346 | task_os = "Win" |
Kevin Lubick | 893c49e | 2017-01-17 15:15:40 -0500 | [diff] [blame] | 347 | } else if strings.Contains(task_os, "Ubuntu") { |
| 348 | task_os = "Ubuntu" |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 349 | } |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 350 | jobNameMap := map[string]string{ |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 351 | "role": "Build", |
| 352 | "os": task_os, |
| 353 | "compiler": parts["compiler"], |
| 354 | "target_arch": parts["arch"], |
| 355 | "configuration": parts["configuration"], |
Eric Boren | 5083130 | 2016-11-18 13:10:51 -0500 | [diff] [blame] | 356 | } |
| 357 | if ec != "" { |
| 358 | jobNameMap["extra_config"] = ec |
| 359 | } |
| 360 | name, err := jobNameSchema.MakeJobName(jobNameMap) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 361 | if err != nil { |
| 362 | glog.Fatal(err) |
| 363 | } |
| 364 | return name |
| 365 | } else { |
| 366 | return jobName |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | // swarmDimensions generates swarming bot dimensions for the given task. |
| 371 | func swarmDimensions(parts map[string]string) []string { |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 372 | d := map[string]string{ |
| 373 | "pool": POOL_SKIA, |
| 374 | } |
| 375 | if os, ok := parts["os"]; ok { |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 376 | d["os"] = map[string]string{ |
Kevin Lubick | 893c49e | 2017-01-17 15:15:40 -0500 | [diff] [blame] | 377 | "Android": "Android", |
| 378 | "Mac": "Mac-10.11", |
| 379 | "Ubuntu": DEFAULT_OS_LINUX, |
Kevin Lubick | 9063eca | 2017-02-01 11:10:32 -0500 | [diff] [blame^] | 380 | "Ubuntu16": "Ubuntu-16.10", |
Kevin Lubick | 893c49e | 2017-01-17 15:15:40 -0500 | [diff] [blame] | 381 | "Win": "Windows-2008ServerR2-SP1", |
| 382 | "Win10": "Windows-10-14393", |
| 383 | "Win2k8": "Windows-2008ServerR2-SP1", |
| 384 | "Win8": "Windows-8.1-SP0", |
| 385 | "iOS": "iOS-9.3.1", |
Eric Boren | 54ff2fc | 2016-12-02 12:09:10 -0500 | [diff] [blame] | 386 | }[os] |
Ben Wagner | 7355737 | 2016-12-29 16:27:03 -0500 | [diff] [blame] | 387 | // Chrome Golo has a different Windows image. |
| 388 | if parts["model"] == "Golo" && os == "Win10" { |
| 389 | d["os"] = "Windows-10-10586" |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 390 | } |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 391 | } else { |
| 392 | d["os"] = DEFAULT_OS |
| 393 | } |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 394 | if parts["role"] == "Test" || parts["role"] == "Perf" { |
| 395 | if strings.Contains(parts["os"], "Android") { |
| 396 | // For Android, the device type is a better dimension |
| 397 | // than CPU or GPU. |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 398 | deviceInfo := map[string][]string{ |
| 399 | "AndroidOne": {"sprout", "MOB30Q"}, |
| 400 | "GalaxyS7": {"heroqlteatt", "MMB29M"}, |
Kevin Lubick | 56ff9a1 | 2016-12-14 08:48:00 -0500 | [diff] [blame] | 401 | "GalaxyTab3": {"goyawifi", "JDQ39"}, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 402 | "NVIDIA_Shield": {"foster", "MRA58K"}, |
| 403 | "Nexus10": {"manta", "LMY49J"}, |
Kevin Lubick | e2d4141 | 2016-12-28 10:10:09 -0500 | [diff] [blame] | 404 | "Nexus5": {"hammerhead", "M4B30Z"}, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 405 | "Nexus6": {"shamu", "M"}, |
| 406 | "Nexus6p": {"angler", "NMF26C"}, |
| 407 | "Nexus7": {"grouper", "LMY47V"}, |
| 408 | "Nexus7v2": {"flo", "M"}, |
Kevin Lubick | 5ac8260 | 2017-01-13 09:37:03 -0500 | [diff] [blame] | 409 | "NexusPlayer": {"fugu", "N2G10B"}, |
Kevin Lubick | 7cf7745 | 2016-12-28 13:35:13 -0500 | [diff] [blame] | 410 | "Pixel": {"sailfish", "NMF26Q"}, |
Kevin Lubick | eaef549 | 2016-12-15 12:36:12 -0500 | [diff] [blame] | 411 | "PixelC": {"dragon", "NMF26H"}, |
Kevin Lubick | 7cf7745 | 2016-12-28 13:35:13 -0500 | [diff] [blame] | 412 | "PixelXL": {"marlin", "NMF26Q"}, |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 413 | }[parts["model"]] |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 414 | d["device_type"] = deviceInfo[0] |
| 415 | d["device_os"] = deviceInfo[1] |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 416 | } else if strings.Contains(parts["os"], "iOS") { |
| 417 | d["device"] = map[string]string{ |
Eric Boren | 792079cf | 2016-11-09 14:03:20 -0500 | [diff] [blame] | 418 | "iPadMini4": "iPad5,1", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 419 | }[parts["model"]] |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 420 | } else if parts["cpu_or_gpu"] == "CPU" { |
| 421 | d["gpu"] = "none" |
| 422 | d["cpu"] = map[string]string{ |
| 423 | "AVX": "x86-64", |
| 424 | "AVX2": "x86-64-avx2", |
| 425 | "SSE4": "x86-64", |
| 426 | }[parts["cpu_or_gpu_value"]] |
| 427 | if strings.Contains(parts["os"], "Win") && parts["cpu_or_gpu_value"] == "AVX2" { |
| 428 | // AVX2 is not correctly detected on Windows. Fall back on other |
| 429 | // dimensions to ensure that we correctly target machines which we know |
| 430 | // have AVX2 support. |
| 431 | d["cpu"] = "x86-64" |
| 432 | d["os"] = "Windows-2008ServerR2-SP1" |
| 433 | } |
| 434 | } else { |
| 435 | d["gpu"] = map[string]string{ |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 436 | "AMDHD7770": "1002:683d", |
| 437 | "GeForce320M": "10de:08a4", |
| 438 | "GT610": "10de:104a", |
| 439 | "GTX1070": "10de:1ba1", |
| 440 | "GTX550Ti": "10de:1244", |
| 441 | "GTX660": "10de:11c0", |
| 442 | "GTX960": "10de:1401", |
| 443 | // TODO(benjaminwagner): This device ID doesn't |
| 444 | // match HD4000. |
| 445 | "HD4000": "8086:0a2e", |
| 446 | // This bot will eventually go away, so I'm not |
| 447 | // going to bother renaming it. |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 448 | "iHD530": "8086:1912", |
Ben Wagner | 17f811b | 2016-12-22 08:40:14 -0500 | [diff] [blame] | 449 | "IntelHD4600": "8086:0412", |
| 450 | "IntelIris540": "8086:1926", |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 451 | "IntelIris6100": "8086:162b", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 452 | }[parts["cpu_or_gpu_value"]] |
| 453 | } |
| 454 | } else { |
| 455 | d["gpu"] = "none" |
| 456 | } |
| 457 | rv := make([]string, 0, len(d)) |
| 458 | for k, v := range d { |
| 459 | rv = append(rv, fmt.Sprintf("%s:%s", k, v)) |
| 460 | } |
| 461 | sort.Strings(rv) |
| 462 | return rv |
| 463 | } |
| 464 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 465 | // compile generates a compile task. Returns the name of the last task in the |
| 466 | // generated chain of tasks, which the Job should add as a dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 467 | func compile(b *specs.TasksCfgBuilder, name string, parts map[string]string) string { |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 468 | // Collect the necessary CIPD packages. |
| 469 | pkgs := []*specs.CipdPackage{} |
| 470 | |
| 471 | // Android bots require a toolchain. |
| 472 | if strings.Contains(name, "Android") { |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 473 | if strings.Contains(name, "Mac") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 474 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("android_ndk_darwin")) |
Mike Klein | 86c2c0f | 2016-11-02 13:13:16 -0400 | [diff] [blame] | 475 | } else if strings.Contains(name, "Win") { |
Mike Klein | e9215f0 | 2016-11-02 15:44:26 -0400 | [diff] [blame] | 476 | pkg := b.MustGetCipdPackageFromAsset("android_ndk_windows") |
| 477 | pkg.Path = "n" |
| 478 | pkgs = append(pkgs, pkg) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 479 | } else { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 480 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("android_ndk_linux")) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 481 | } |
Kevin Lubick | 9c7dcac | 2017-01-18 09:24:56 -0500 | [diff] [blame] | 482 | } else if strings.Contains(name, "Ubuntu") { |
| 483 | if strings.Contains(name, "Clang") { |
| 484 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("clang_linux")) |
| 485 | } |
| 486 | if strings.Contains(name, "Vulkan") { |
| 487 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("linux_vulkan_sdk")) |
| 488 | } |
Mike Klein | 27dcee1 | 2016-11-09 16:31:42 -0500 | [diff] [blame] | 489 | } else if strings.Contains(name, "Win") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 490 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("win_toolchain")) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 491 | if strings.Contains(name, "Vulkan") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 492 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("win_vulkan_sdk")) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 493 | } |
| 494 | } |
| 495 | |
| 496 | // Add the task. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 497 | b.MustAddTask(name, &specs.TaskSpec{ |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 498 | CipdPackages: pkgs, |
| 499 | Dimensions: swarmDimensions(parts), |
| 500 | ExtraArgs: []string{ |
| 501 | "--workdir", "../../..", "swarm_compile", |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 502 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 503 | fmt.Sprintf("buildername=%s", name), |
| 504 | "mastername=fake-master", |
| 505 | "buildnumber=2", |
| 506 | "slavename=fake-buildslave", |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 507 | "nobuildbot=True", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 508 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 509 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 510 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 511 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 512 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 513 | }, |
| 514 | Isolate: "compile_skia.isolate", |
| 515 | Priority: 0.8, |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 516 | }) |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 517 | // All compile tasks are runnable as their own Job. Assert that the Job |
| 518 | // is listed in JOBS. |
| 519 | if !util.In(name, JOBS) { |
| 520 | glog.Fatalf("Job %q is missing from the JOBS list!", name) |
| 521 | } |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 522 | return name |
| 523 | } |
| 524 | |
| 525 | // recreateSKPs generates a RecreateSKPs task. Returns the name of the last |
| 526 | // task in the generated chain of tasks, which the Job should add as a |
| 527 | // dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 528 | func recreateSKPs(b *specs.TasksCfgBuilder, name string) string { |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 529 | b.MustAddTask(name, &specs.TaskSpec{ |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 530 | CipdPackages: []*specs.CipdPackage{}, |
| 531 | Dimensions: LINUX_GCE_DIMENSIONS, |
| 532 | ExecutionTimeout: 4 * time.Hour, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 533 | ExtraArgs: []string{ |
| 534 | "--workdir", "../../..", "swarm_RecreateSKPs", |
| 535 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
| 536 | fmt.Sprintf("buildername=%s", name), |
| 537 | "mastername=fake-master", |
| 538 | "buildnumber=2", |
| 539 | "slavename=fake-buildslave", |
| 540 | "nobuildbot=True", |
| 541 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 542 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
| 543 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
| 544 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 545 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
| 546 | }, |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 547 | IoTimeout: 40 * time.Minute, |
| 548 | Isolate: "compile_skia.isolate", |
| 549 | Priority: 0.8, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 550 | }) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 551 | return name |
| 552 | } |
| 553 | |
| 554 | // ctSKPs generates a CT SKPs task. Returns the name of the last task in the |
| 555 | // generated chain of tasks, which the Job should add as a dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 556 | func ctSKPs(b *specs.TasksCfgBuilder, name string) string { |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 557 | b.MustAddTask(name, &specs.TaskSpec{ |
| 558 | CipdPackages: []*specs.CipdPackage{}, |
| 559 | Dimensions: []string{"pool:SkiaCT"}, |
| 560 | ExecutionTimeout: 24 * time.Hour, |
| 561 | ExtraArgs: []string{ |
| 562 | "--workdir", "../../..", "swarm_ct_skps", |
| 563 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
| 564 | fmt.Sprintf("buildername=%s", name), |
| 565 | "mastername=fake-master", |
| 566 | "buildnumber=2", |
| 567 | "slavename=fake-buildslave", |
| 568 | "nobuildbot=True", |
| 569 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 570 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
| 571 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
| 572 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 573 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
| 574 | }, |
| 575 | IoTimeout: time.Hour, |
| 576 | Isolate: "ct_skps_skia.isolate", |
| 577 | Priority: 0.8, |
| 578 | }) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 579 | return name |
| 580 | } |
| 581 | |
| 582 | // housekeeper generates a Housekeeper task. Returns the name of the last task |
| 583 | // in the generated chain of tasks, which the Job should add as a dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 584 | func housekeeper(b *specs.TasksCfgBuilder, name, compileTaskName string) string { |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 585 | b.MustAddTask(name, &specs.TaskSpec{ |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 586 | CipdPackages: []*specs.CipdPackage{b.MustGetCipdPackageFromAsset("go")}, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 587 | Dependencies: []string{compileTaskName}, |
| 588 | Dimensions: LINUX_GCE_DIMENSIONS, |
| 589 | ExtraArgs: []string{ |
| 590 | "--workdir", "../../..", "swarm_housekeeper", |
| 591 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
| 592 | fmt.Sprintf("buildername=%s", name), |
| 593 | "mastername=fake-master", |
| 594 | "buildnumber=2", |
| 595 | "slavename=fake-buildslave", |
| 596 | "nobuildbot=True", |
| 597 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 598 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
| 599 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
| 600 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 601 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
| 602 | }, |
| 603 | Isolate: "housekeeper_skia.isolate", |
| 604 | Priority: 0.8, |
| 605 | }) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 606 | return name |
| 607 | } |
| 608 | |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 609 | // infra generates an infra_tests task. Returns the name of the last task in the |
| 610 | // generated chain of tasks, which the Job should add as a dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 611 | func infra(b *specs.TasksCfgBuilder, name string) string { |
| 612 | b.MustAddTask(name, &specs.TaskSpec{ |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 613 | CipdPackages: []*specs.CipdPackage{}, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 614 | Dimensions: LINUX_GCE_DIMENSIONS, |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 615 | ExtraArgs: []string{ |
| 616 | "--workdir", "../../..", "swarm_infra", |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 617 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 618 | fmt.Sprintf("buildername=%s", name), |
| 619 | "mastername=fake-master", |
| 620 | "buildnumber=2", |
| 621 | "slavename=fake-buildslave", |
| 622 | "nobuildbot=True", |
| 623 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 624 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
| 625 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 626 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 627 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 628 | }, |
| 629 | Isolate: "infra_skia.isolate", |
| 630 | Priority: 0.8, |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 631 | }) |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 632 | return name |
| 633 | } |
| 634 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 635 | // doUpload indicates whether the given Job should upload its results. |
| 636 | func doUpload(name string) bool { |
| 637 | skipUploadBots := []string{ |
| 638 | "ASAN", |
| 639 | "Coverage", |
| 640 | "MSAN", |
| 641 | "TSAN", |
| 642 | "UBSAN", |
| 643 | "Valgrind", |
| 644 | } |
| 645 | for _, s := range skipUploadBots { |
| 646 | if strings.Contains(name, s) { |
| 647 | return false |
| 648 | } |
| 649 | } |
| 650 | return true |
| 651 | } |
| 652 | |
| 653 | // test generates a Test task. Returns the name of the last task in the |
| 654 | // generated chain of tasks, which the Job should add as a dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 655 | func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compileTaskName string, pkgs []*specs.CipdPackage) string { |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 656 | s := &specs.TaskSpec{ |
Eric Boren | 1f2f64b | 2016-11-09 18:35:15 -0500 | [diff] [blame] | 657 | CipdPackages: pkgs, |
| 658 | Dependencies: []string{compileTaskName}, |
| 659 | Dimensions: swarmDimensions(parts), |
| 660 | ExecutionTimeout: 4 * time.Hour, |
| 661 | Expiration: 20 * time.Hour, |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 662 | ExtraArgs: []string{ |
| 663 | "--workdir", "../../..", "swarm_test", |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 664 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 665 | fmt.Sprintf("buildername=%s", name), |
| 666 | "mastername=fake-master", |
| 667 | "buildnumber=2", |
| 668 | "slavename=fake-buildslave", |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 669 | "nobuildbot=True", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 670 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 671 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 672 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 673 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 674 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 675 | }, |
Eric Boren | 1f2f64b | 2016-11-09 18:35:15 -0500 | [diff] [blame] | 676 | IoTimeout: 40 * time.Minute, |
| 677 | Isolate: "test_skia.isolate", |
| 678 | Priority: 0.8, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 679 | } |
| 680 | if strings.Contains(parts["extra_config"], "Valgrind") { |
| 681 | s.ExecutionTimeout = 9 * time.Hour |
| 682 | s.Expiration = 48 * time.Hour |
| 683 | s.IoTimeout = time.Hour |
| 684 | } else if strings.Contains(parts["extra_config"], "MSAN") { |
| 685 | s.ExecutionTimeout = 9 * time.Hour |
| 686 | } |
| 687 | b.MustAddTask(name, s) |
| 688 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 689 | // Upload results if necessary. |
| 690 | if doUpload(name) { |
| 691 | uploadName := fmt.Sprintf("%s%s%s", PREFIX_UPLOAD, jobNameSchema.Sep, name) |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 692 | b.MustAddTask(uploadName, &specs.TaskSpec{ |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 693 | Dependencies: []string{name}, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 694 | Dimensions: LINUX_GCE_DIMENSIONS, |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 695 | ExtraArgs: []string{ |
| 696 | "--workdir", "../../..", "upload_dm_results", |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 697 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 698 | fmt.Sprintf("buildername=%s", name), |
| 699 | "mastername=fake-master", |
| 700 | "buildnumber=2", |
| 701 | "slavename=fake-buildslave", |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 702 | "nobuildbot=True", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 703 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 704 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 705 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 706 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 707 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 708 | }, |
| 709 | Isolate: "upload_dm_results.isolate", |
| 710 | Priority: 0.8, |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 711 | }) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 712 | return uploadName |
| 713 | } |
| 714 | return name |
| 715 | } |
| 716 | |
| 717 | // perf generates a Perf task. Returns the name of the last task in the |
| 718 | // generated chain of tasks, which the Job should add as a dependency. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 719 | func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compileTaskName string, pkgs []*specs.CipdPackage) string { |
Kevin Lubick | b03b5ac | 2016-11-14 13:42:27 -0500 | [diff] [blame] | 720 | recipe := "swarm_perf" |
| 721 | isolate := "perf_skia.isolate" |
| 722 | if strings.Contains(parts["extra_config"], "Skpbench") { |
| 723 | recipe = "swarm_skpbench" |
| 724 | isolate = "skpbench_skia.isolate" |
| 725 | } |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 726 | s := &specs.TaskSpec{ |
Eric Boren | 1f2f64b | 2016-11-09 18:35:15 -0500 | [diff] [blame] | 727 | CipdPackages: pkgs, |
| 728 | Dependencies: []string{compileTaskName}, |
| 729 | Dimensions: swarmDimensions(parts), |
| 730 | ExecutionTimeout: 4 * time.Hour, |
| 731 | Expiration: 20 * time.Hour, |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 732 | ExtraArgs: []string{ |
Kevin Lubick | b03b5ac | 2016-11-14 13:42:27 -0500 | [diff] [blame] | 733 | "--workdir", "../../..", recipe, |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 734 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 735 | fmt.Sprintf("buildername=%s", name), |
| 736 | "mastername=fake-master", |
| 737 | "buildnumber=2", |
| 738 | "slavename=fake-buildslave", |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 739 | "nobuildbot=True", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 740 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 741 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 742 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 743 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 744 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 745 | }, |
Eric Boren | 1f2f64b | 2016-11-09 18:35:15 -0500 | [diff] [blame] | 746 | IoTimeout: 40 * time.Minute, |
Kevin Lubick | b03b5ac | 2016-11-14 13:42:27 -0500 | [diff] [blame] | 747 | Isolate: isolate, |
Eric Boren | 1f2f64b | 2016-11-09 18:35:15 -0500 | [diff] [blame] | 748 | Priority: 0.8, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 749 | } |
| 750 | if strings.Contains(parts["extra_config"], "Valgrind") { |
| 751 | s.ExecutionTimeout = 9 * time.Hour |
| 752 | s.Expiration = 48 * time.Hour |
| 753 | s.IoTimeout = time.Hour |
| 754 | } else if strings.Contains(parts["extra_config"], "MSAN") { |
| 755 | s.ExecutionTimeout = 9 * time.Hour |
| 756 | } |
| 757 | b.MustAddTask(name, s) |
| 758 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 759 | // Upload results if necessary. |
| 760 | if strings.Contains(name, "Release") && doUpload(name) { |
| 761 | uploadName := fmt.Sprintf("%s%s%s", PREFIX_UPLOAD, jobNameSchema.Sep, name) |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 762 | b.MustAddTask(uploadName, &specs.TaskSpec{ |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 763 | Dependencies: []string{name}, |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 764 | Dimensions: LINUX_GCE_DIMENSIONS, |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 765 | ExtraArgs: []string{ |
| 766 | "--workdir", "../../..", "upload_nano_results", |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 767 | fmt.Sprintf("repository=%s", specs.PLACEHOLDER_REPO), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 768 | fmt.Sprintf("buildername=%s", name), |
| 769 | "mastername=fake-master", |
| 770 | "buildnumber=2", |
| 771 | "slavename=fake-buildslave", |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 772 | "nobuildbot=True", |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 773 | fmt.Sprintf("swarm_out_dir=%s", specs.PLACEHOLDER_ISOLATED_OUTDIR), |
| 774 | fmt.Sprintf("revision=%s", specs.PLACEHOLDER_REVISION), |
borenet | 98b2e7a | 2016-10-13 06:23:45 -0700 | [diff] [blame] | 775 | fmt.Sprintf("patch_storage=%s", specs.PLACEHOLDER_PATCH_STORAGE), |
skia.buildbots | 2478c73 | 2016-11-04 14:37:26 -0400 | [diff] [blame] | 776 | fmt.Sprintf("patch_issue=%s", specs.PLACEHOLDER_ISSUE), |
| 777 | fmt.Sprintf("patch_set=%s", specs.PLACEHOLDER_PATCHSET), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 778 | }, |
| 779 | Isolate: "upload_nano_results.isolate", |
| 780 | Priority: 0.8, |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 781 | }) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 782 | return uploadName |
| 783 | } |
| 784 | return name |
| 785 | } |
| 786 | |
| 787 | // process generates tasks and jobs for the given job name. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 788 | func process(b *specs.TasksCfgBuilder, name string) { |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 789 | deps := []string{} |
| 790 | |
| 791 | parts, err := jobNameSchema.ParseJobName(name) |
| 792 | if err != nil { |
| 793 | glog.Fatal(err) |
| 794 | } |
| 795 | |
| 796 | // RecreateSKPs. |
| 797 | if strings.Contains(name, "RecreateSKPs") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 798 | deps = append(deps, recreateSKPs(b, name)) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 799 | } |
| 800 | |
| 801 | // CT bots. |
| 802 | if strings.Contains(name, "-CT_") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 803 | deps = append(deps, ctSKPs(b, name)) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 804 | } |
| 805 | |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 806 | // Infra tests. |
| 807 | if name == "Housekeeper-PerCommit-InfraTests" { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 808 | deps = append(deps, infra(b, name)) |
borenet | 2dbbfa5 | 2016-10-14 06:32:09 -0700 | [diff] [blame] | 809 | } |
| 810 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 811 | // Compile bots. |
| 812 | if parts["role"] == "Build" { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 813 | deps = append(deps, compile(b, name, parts)) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 814 | } |
| 815 | |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 816 | // Most remaining bots need a compile task. |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 817 | compileTaskName := deriveCompileTaskName(name, parts) |
borenet | 5238343 | 2016-10-17 10:17:53 -0700 | [diff] [blame] | 818 | compileTaskParts, err := jobNameSchema.ParseJobName(compileTaskName) |
| 819 | if err != nil { |
| 820 | glog.Fatal(err) |
| 821 | } |
Eric Boren | 628e78b | 2016-11-17 11:33:27 -0500 | [diff] [blame] | 822 | // These bots do not need a compile task. |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 823 | if parts["role"] != "Build" && |
| 824 | name != "Housekeeper-PerCommit-InfraTests" && |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 825 | !strings.Contains(name, "RecreateSKPs") && |
| 826 | !strings.Contains(name, "-CT_") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 827 | compile(b, compileTaskName, compileTaskParts) |
borenet | 5238343 | 2016-10-17 10:17:53 -0700 | [diff] [blame] | 828 | } |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 829 | |
| 830 | // Housekeeper. |
Eric Boren | 22f5ef7 | 2016-12-02 11:01:33 -0500 | [diff] [blame] | 831 | if name == "Housekeeper-PerCommit" { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 832 | deps = append(deps, housekeeper(b, name, compileTaskName)) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 833 | } |
| 834 | |
| 835 | // Common assets needed by the remaining bots. |
| 836 | pkgs := []*specs.CipdPackage{ |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 837 | b.MustGetCipdPackageFromAsset("skimage"), |
| 838 | b.MustGetCipdPackageFromAsset("skp"), |
| 839 | b.MustGetCipdPackageFromAsset("svg"), |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 840 | } |
Eric Boren | 4b254b9 | 2016-11-08 12:55:32 -0500 | [diff] [blame] | 841 | if strings.Contains(name, "Ubuntu") && strings.Contains(name, "SAN") { |
| 842 | pkgs = append(pkgs, b.MustGetCipdPackageFromAsset("clang_linux")) |
| 843 | } |
Kevin Lubick | b03b5ac | 2016-11-14 13:42:27 -0500 | [diff] [blame] | 844 | // Skpbench only needs skps |
| 845 | if strings.Contains(name, "Skpbench") { |
| 846 | pkgs = []*specs.CipdPackage{ |
| 847 | b.MustGetCipdPackageFromAsset("skp"), |
| 848 | } |
| 849 | } |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 850 | |
| 851 | // Test bots. |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 852 | if parts["role"] == "Test" && !strings.Contains(name, "-CT_") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 853 | deps = append(deps, test(b, name, parts, compileTaskName, pkgs)) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 854 | } |
| 855 | |
| 856 | // Perf bots. |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 857 | if parts["role"] == "Perf" && !strings.Contains(name, "-CT_") { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 858 | deps = append(deps, perf(b, name, parts, compileTaskName, pkgs)) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 859 | } |
| 860 | |
| 861 | // Add the Job spec. |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 862 | j := &specs.JobSpec{ |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 863 | Priority: 0.8, |
| 864 | TaskSpecs: deps, |
Eric Boren | f5a90e8 | 2016-11-15 15:18:20 -0500 | [diff] [blame] | 865 | } |
| 866 | if name == "Housekeeper-Nightly-RecreateSKPs_Canary" { |
| 867 | j.Trigger = "nightly" |
| 868 | } |
| 869 | if name == "Housekeeper-Weekly-RecreateSKPs" { |
| 870 | j.Trigger = "weekly" |
| 871 | } |
Eric Boren | 71b762f | 2016-11-30 14:05:16 -0500 | [diff] [blame] | 872 | if name == "Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_1m_SKPs" { |
| 873 | j.Trigger = "weekly" |
| 874 | } |
Eric Boren | 8615fe5 | 2016-12-12 14:30:12 -0500 | [diff] [blame] | 875 | b.MustAddJob(name, j) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 876 | } |
| 877 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 878 | // Regenerate the tasks.json file. |
| 879 | func main() { |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 880 | b := specs.MustNewTasksCfgBuilder() |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 881 | // Create the JobNameSchema. |
Eric Boren | 6441a46 | 2017-01-13 13:37:53 -0500 | [diff] [blame] | 882 | schema, err := NewJobNameSchema(path.Join(b.CheckoutRoot(), "infra", "bots", ".recipe_deps", "skia-recipes", "recipe_modules", "builder_name_schema", "builder_name_schema.json")) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 883 | if err != nil { |
| 884 | glog.Fatal(err) |
| 885 | } |
| 886 | jobNameSchema = schema |
| 887 | |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 888 | // Create Tasks and Jobs. |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 889 | for _, name := range JOBS { |
| 890 | process(b, name) |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 891 | } |
| 892 | |
borenet | ed20a70 | 2016-10-20 11:04:31 -0700 | [diff] [blame] | 893 | b.MustFinish() |
borenet | db182c7 | 2016-09-30 12:53:12 -0700 | [diff] [blame] | 894 | } |
| 895 | |
| 896 | // TODO(borenet): The below really belongs in its own file, probably next to the |
| 897 | // builder_name_schema.json file. |
| 898 | |
| 899 | // JobNameSchema is a struct used for (de)constructing Job names in a |
| 900 | // predictable format. |
| 901 | type JobNameSchema struct { |
| 902 | Schema map[string][]string `json:"builder_name_schema"` |
| 903 | Sep string `json:"builder_name_sep"` |
| 904 | } |
| 905 | |
| 906 | // NewJobNameSchema returns a JobNameSchema instance based on the given JSON |
| 907 | // file. |
| 908 | func NewJobNameSchema(jsonFile string) (*JobNameSchema, error) { |
| 909 | var rv JobNameSchema |
| 910 | f, err := os.Open(jsonFile) |
| 911 | if err != nil { |
| 912 | return nil, err |
| 913 | } |
| 914 | defer util.Close(f) |
| 915 | if err := json.NewDecoder(f).Decode(&rv); err != nil { |
| 916 | return nil, err |
| 917 | } |
| 918 | return &rv, nil |
| 919 | } |
| 920 | |
| 921 | // ParseJobName splits the given Job name into its component parts, according |
| 922 | // to the schema. |
| 923 | func (s *JobNameSchema) ParseJobName(n string) (map[string]string, error) { |
| 924 | split := strings.Split(n, s.Sep) |
| 925 | if len(split) < 2 { |
| 926 | return nil, fmt.Errorf("Invalid job name: %q", n) |
| 927 | } |
| 928 | role := split[0] |
| 929 | split = split[1:] |
| 930 | keys, ok := s.Schema[role] |
| 931 | if !ok { |
| 932 | return nil, fmt.Errorf("Invalid job name; %q is not a valid role.", role) |
| 933 | } |
| 934 | extraConfig := "" |
| 935 | if len(split) == len(keys)+1 { |
| 936 | extraConfig = split[len(split)-1] |
| 937 | split = split[:len(split)-1] |
| 938 | } |
| 939 | if len(split) != len(keys) { |
| 940 | return nil, fmt.Errorf("Invalid job name; %q has incorrect number of parts.", n) |
| 941 | } |
| 942 | rv := make(map[string]string, len(keys)+2) |
| 943 | rv["role"] = role |
| 944 | if extraConfig != "" { |
| 945 | rv["extra_config"] = extraConfig |
| 946 | } |
| 947 | for i, k := range keys { |
| 948 | rv[k] = split[i] |
| 949 | } |
| 950 | return rv, nil |
| 951 | } |
| 952 | |
| 953 | // MakeJobName assembles the given parts of a Job name, according to the schema. |
| 954 | func (s *JobNameSchema) MakeJobName(parts map[string]string) (string, error) { |
| 955 | role, ok := parts["role"] |
| 956 | if !ok { |
| 957 | return "", fmt.Errorf("Invalid job parts; jobs must have a role.") |
| 958 | } |
| 959 | keys, ok := s.Schema[role] |
| 960 | if !ok { |
| 961 | return "", fmt.Errorf("Invalid job parts; unknown role %q", role) |
| 962 | } |
| 963 | rvParts := make([]string, 0, len(parts)) |
| 964 | rvParts = append(rvParts, role) |
| 965 | for _, k := range keys { |
| 966 | v, ok := parts[k] |
| 967 | if !ok { |
| 968 | return "", fmt.Errorf("Invalid job parts; missing %q", k) |
| 969 | } |
| 970 | rvParts = append(rvParts, v) |
| 971 | } |
| 972 | if _, ok := parts["extra_config"]; ok { |
| 973 | rvParts = append(rvParts, parts["extra_config"]) |
| 974 | } |
| 975 | return strings.Join(rvParts, s.Sep), nil |
| 976 | } |