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 | 5 |
6 # Recipe module for Skia Swarming trigger. | 6 # Recipe module for Skia Swarming trigger. |
7 | 7 |
8 | 8 |
9 import os | 9 import os |
10 import json | 10 import json |
(...skipping 27 matching lines...) Expand all Loading... |
38 'Build-Mac-Clang-x86_64-Release', | 38 'Build-Mac-Clang-x86_64-Release', |
39 'Build-Ubuntu-GCC-Arm64-Debug-Android_Vulkan', | 39 'Build-Ubuntu-GCC-Arm64-Debug-Android_Vulkan', |
40 'Build-Ubuntu-GCC-x86_64-Debug', | 40 'Build-Ubuntu-GCC-x86_64-Debug', |
41 'Build-Ubuntu-GCC-x86_64-Debug-GN', | 41 'Build-Ubuntu-GCC-x86_64-Debug-GN', |
42 'Build-Ubuntu-GCC-x86_64-Release-RemoteRun', | 42 'Build-Ubuntu-GCC-x86_64-Release-RemoteRun', |
43 'Build-Ubuntu-GCC-x86_64-Release-Trybot', | 43 'Build-Ubuntu-GCC-x86_64-Release-Trybot', |
44 'Build-Win-MSVC-x86_64-Release', | 44 'Build-Win-MSVC-x86_64-Release', |
45 'Build-Win-MSVC-x86_64-Release-Vulkan', | 45 'Build-Win-MSVC-x86_64-Release-Vulkan', |
46 'Housekeeper-Nightly-RecreateSKPs_Canary', | 46 'Housekeeper-Nightly-RecreateSKPs_Canary', |
47 'Housekeeper-PerCommit', | 47 'Housekeeper-PerCommit', |
| 48 'Housekeeper-PerCommit-Presubmit', |
48 'Infra-PerCommit', | 49 'Infra-PerCommit', |
49 'Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Trybot', | 50 'Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Trybot', |
50 'Perf-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-CT_BENCH_1k_SKPs', | 51 'Perf-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-CT_BENCH_1k_SKPs', |
51 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', | 52 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
52 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Debug-GN_Android', | 53 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Debug-GN_Android', |
53 'Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug-Vulkan', | 54 'Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug-Vulkan', |
54 'Test-Android-GCC-Nexus7v2-GPU-Tegra3-Arm7-Release', | 55 'Test-Android-GCC-Nexus7v2-GPU-Tegra3-Arm7-Release', |
55 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release', | 56 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release', |
56 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot', | 57 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot', |
57 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN', | 58 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN', |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 got_revision, | 294 got_revision, |
294 infrabots_dir, | 295 infrabots_dir, |
295 idempotent=False, | 296 idempotent=False, |
296 store_output=False, | 297 store_output=False, |
297 extra_isolate_hashes=extra_isolate_hashes, | 298 extra_isolate_hashes=extra_isolate_hashes, |
298 cipd_packages=[cipd_pkg(api, infrabots_dir, 'go')], | 299 cipd_packages=[cipd_pkg(api, infrabots_dir, 'go')], |
299 ) | 300 ) |
300 return api.swarming.collect_swarming_task(task) | 301 return api.swarming.collect_swarming_task(task) |
301 | 302 |
302 | 303 |
| 304 def presubmit_swarm(api, builder_cfg, got_revision, infrabots_dir): |
| 305 task = trigger_task( |
| 306 api, |
| 307 'presubmit', |
| 308 api.properties['buildername'], |
| 309 api.properties['mastername'], |
| 310 api.properties['slavename'], |
| 311 api.properties['buildnumber'], |
| 312 builder_cfg, |
| 313 got_revision, |
| 314 infrabots_dir, |
| 315 idempotent=False, |
| 316 store_output=False, |
| 317 cipd_packages=None) |
| 318 api.swarming.collect_swarming_task(task) |
| 319 |
| 320 |
303 def recreate_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, | 321 def recreate_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, |
304 extra_isolate_hashes): | 322 extra_isolate_hashes): |
305 task = trigger_task( | 323 task = trigger_task( |
306 api, | 324 api, |
307 'RecreateSKPs', | 325 'RecreateSKPs', |
308 api.properties['buildername'], | 326 api.properties['buildername'], |
309 api.properties['mastername'], | 327 api.properties['mastername'], |
310 api.properties['slavename'], | 328 api.properties['slavename'], |
311 api.properties['buildnumber'], | 329 api.properties['buildnumber'], |
312 builder_cfg, | 330 builder_cfg, |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 | 606 |
589 builder_name = api.properties['buildername'] | 607 builder_name = api.properties['buildername'] |
590 | 608 |
591 # Get ready to compile. | 609 # Get ready to compile. |
592 infrabots_dir = api.path['checkout'].join('infra', 'bots') | 610 infrabots_dir = api.path['checkout'].join('infra', 'bots') |
593 if 'Infra' in builder_name: | 611 if 'Infra' in builder_name: |
594 return infra_swarm(api, got_revision, infrabots_dir, extra_hashes) | 612 return infra_swarm(api, got_revision, infrabots_dir, extra_hashes) |
595 | 613 |
596 builder_cfg = api.builder_name_schema.DictForBuilderName(builder_name) | 614 builder_cfg = api.builder_name_schema.DictForBuilderName(builder_name) |
597 | 615 |
| 616 if 'Presubmit' in builder_name: |
| 617 return presubmit_swarm(api, builder_cfg, got_revision, infrabots_dir) |
| 618 |
598 if 'RecreateSKPs' in builder_name: | 619 if 'RecreateSKPs' in builder_name: |
599 recreate_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, | 620 recreate_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, |
600 extra_hashes) | 621 extra_hashes) |
601 return | 622 return |
602 | 623 |
603 if '-CT_' in builder_name: | 624 if '-CT_' in builder_name: |
604 ct_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, extra_hashes) | 625 ct_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, extra_hashes) |
605 return | 626 return |
606 | 627 |
607 # Compile. | 628 # Compile. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 'upload new .isolated file for upload_dm_results_skia', | 713 'upload new .isolated file for upload_dm_results_skia', |
693 stdout=api.raw_io.output('def456 XYZ.isolated')) | 714 stdout=api.raw_io.output('def456 XYZ.isolated')) |
694 if 'Perf' in builder and '-CT_' not in builder: | 715 if 'Perf' in builder and '-CT_' not in builder: |
695 test += api.step_data( | 716 test += api.step_data( |
696 'upload new .isolated file for perf_skia', | 717 'upload new .isolated file for perf_skia', |
697 stdout=api.raw_io.output('def456 XYZ.isolated')) | 718 stdout=api.raw_io.output('def456 XYZ.isolated')) |
698 if 'Valgrind' not in builder: | 719 if 'Valgrind' not in builder: |
699 test += api.step_data( | 720 test += api.step_data( |
700 'upload new .isolated file for upload_nano_results_skia', | 721 'upload new .isolated file for upload_nano_results_skia', |
701 stdout=api.raw_io.output('def456 XYZ.isolated')) | 722 stdout=api.raw_io.output('def456 XYZ.isolated')) |
702 if 'Housekeeper' in builder and 'RecreateSKPs' not in builder: | 723 if ('Housekeeper' in builder and |
| 724 'RecreateSKPs' not in builder and |
| 725 'Presubmit' not in builder): |
703 test += api.step_data( | 726 test += api.step_data( |
704 'upload new .isolated file for housekeeper_skia', | 727 'upload new .isolated file for housekeeper_skia', |
705 stdout=api.raw_io.output('def456 XYZ.isolated')) | 728 stdout=api.raw_io.output('def456 XYZ.isolated')) |
706 if 'Win' in builder: | 729 if 'Win' in builder: |
707 paths.append(api.path['slave_build'].join( | 730 paths.append(api.path['slave_build'].join( |
708 'skia', 'infra', 'bots', 'assets', 'win_toolchain', 'VERSION')) | 731 'skia', 'infra', 'bots', 'assets', 'win_toolchain', 'VERSION')) |
709 paths.append(api.path['slave_build'].join( | 732 paths.append(api.path['slave_build'].join( |
710 'skia', 'infra', 'bots', 'assets', 'win_vulkan_sdk', 'VERSION')) | 733 'skia', 'infra', 'bots', 'assets', 'win_vulkan_sdk', 'VERSION')) |
711 paths.append(api.path['slave_build'].join( | 734 paths.append(api.path['slave_build'].join( |
712 'skia', 'infra', 'bots', 'assets', 'skimage', 'VERSION')) | 735 'skia', 'infra', 'bots', 'assets', 'skimage', 'VERSION')) |
(...skipping 29 matching lines...) Expand all Loading... |
742 path_config='kitchen', | 765 path_config='kitchen', |
743 revision='abc123', | 766 revision='abc123', |
744 **gerrit_kwargs) + | 767 **gerrit_kwargs) + |
745 api.step_data( | 768 api.step_data( |
746 'upload new .isolated file for test_skia', | 769 'upload new .isolated file for test_skia', |
747 stdout=api.raw_io.output('def456 XYZ.isolated')) + | 770 stdout=api.raw_io.output('def456 XYZ.isolated')) + |
748 api.step_data( | 771 api.step_data( |
749 'upload new .isolated file for upload_dm_results_skia', | 772 'upload new .isolated file for upload_dm_results_skia', |
750 stdout=api.raw_io.output('def456 XYZ.isolated')) | 773 stdout=api.raw_io.output('def456 XYZ.isolated')) |
751 ) | 774 ) |
OLD | NEW |