Home | History | Annotate | Download | only in compile
      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 
      6 # Example recipe w/ coverage.
      7 
      8 
      9 DEPS = [
     10   'compile',
     11   'recipe_engine/path',
     12   'recipe_engine/platform',
     13   'recipe_engine/properties',
     14 ]
     15 
     16 
     17 TEST_BUILDERS = {
     18   'client.skia.compile': {
     19     'skiabot-linux-swarm-000': [
     20       'Build-Mac-Clang-arm64-Debug-iOS',
     21       'Build-Mac-Clang-mipsel-Debug-GN_Android',
     22       'Build-Mac-Clang-x64-Release-iOS',
     23       'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
     24       'Build-Mac-Clang-x86_64-Release-GN',
     25       'Build-Ubuntu-Clang-arm64-Debug-GN_Android-Trybot',
     26       'Build-Ubuntu-Clang-arm64-Debug-GN_Android_FrameworkDefs',
     27       'Build-Ubuntu-Clang-arm64-Release-GN_Android',
     28       'Build-Ubuntu-Clang-arm64-Release-GN_Android_Vulkan',
     29       'Build-Ubuntu-Clang-x86_64-Debug-ASAN',
     30       'Build-Ubuntu-Clang-x86_64-Debug-GN',
     31       'Build-Ubuntu-Clang-x86_64-Release-Mini',
     32       'Build-Ubuntu-Clang-x86_64-Release-Vulkan',
     33       'Build-Ubuntu-GCC-arm-Release-Chromecast',
     34       'Build-Ubuntu-GCC-x86-Debug',
     35       'Build-Ubuntu-GCC-x86_64-Debug-GN',
     36       'Build-Ubuntu-GCC-x86_64-Debug-MSAN',
     37       'Build-Ubuntu-GCC-x86_64-Debug-NoGPU',
     38       'Build-Ubuntu-GCC-x86_64-Debug-SK_USE_DISCARDABLE_SCALEDIMAGECACHE',
     39       'Build-Ubuntu-GCC-x86_64-Release-ANGLE',
     40       'Build-Ubuntu-GCC-x86_64-Release-Fast',
     41       'Build-Ubuntu-GCC-x86_64-Release-Flutter_Android',
     42       'Build-Ubuntu-GCC-x86_64-Release-Mesa',
     43       'Build-Ubuntu-GCC-x86_64-Release-PDFium',
     44       'Build-Ubuntu-GCC-x86_64-Release-PDFium_SkiaPaths',
     45       'Build-Ubuntu-GCC-x86_64-Release-Shared',
     46       'Build-Ubuntu-GCC-x86_64-Release-Valgrind',
     47       'Build-Win-Clang-arm64-Release-GN_Android',
     48       'Build-Win-MSVC-x86-Debug',
     49       'Build-Win-MSVC-x86-Debug-ANGLE',
     50       'Build-Win-MSVC-x86-Debug-Exceptions',
     51       'Build-Win-MSVC-x86-Release-GDI',
     52       'Build-Win-MSVC-x86-Release-GN',
     53       'Build-Win-MSVC-x86_64-Release-Vulkan',
     54     ],
     55   },
     56 }
     57 
     58 
     59 def RunSteps(api):
     60   api.compile.run()
     61 
     62 
     63 def GenTests(api):
     64   for mastername, slaves in TEST_BUILDERS.iteritems():
     65     for slavename, builders_by_slave in slaves.iteritems():
     66       for builder in builders_by_slave:
     67         test = (
     68           api.test(builder) +
     69           api.properties(buildername=builder,
     70                          mastername=mastername,
     71                          slavename=slavename,
     72                          buildnumber=5,
     73                          repository='https://skia.googlesource.com/skia.git',
     74                          revision='abc123',
     75                          path_config='kitchen',
     76                          swarm_out_dir='[SWARM_OUT_DIR]') +
     77           api.path.exists(
     78               api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
     79           )
     80         )
     81         if 'Win' in builder:
     82           test += api.platform('win', 64)
     83         elif 'Mac' in builder:
     84           test += api.platform('mac', 64)
     85         else:
     86           test += api.platform('linux', 64)
     87         if 'Trybot' in builder:
     88           test += api.properties(issue=500,
     89                                  patchset=1,
     90                                  rietveld='https://codereview.chromium.org')
     91 
     92         yield test
     93 
     94   mastername = 'client.skia.compile'
     95   slavename = 'skiabot-win-compile-000'
     96   buildername = 'Build-Win-MSVC-x86-Debug'
     97   yield (
     98       api.test('big_issue_number') +
     99       api.properties(buildername=buildername,
    100                      mastername=mastername,
    101                      slavename=slavename,
    102                      buildnumber=5,
    103                      repository='https://skia.googlesource.com/skia.git',
    104                      revision='abc123',
    105                      path_config='kitchen',
    106                      swarm_out_dir='[SWARM_OUT_DIR]',
    107                      rietveld='https://codereview.chromium.org',
    108                      patchset=1,
    109                      issue=2147533002L) +
    110       api.path.exists(
    111           api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
    112       ) +
    113       api.platform('win', 64)
    114   )
    115 
    116   yield (
    117       api.test('recipe_with_gerrit_patch') +
    118       api.properties(
    119           buildername=buildername + '-Trybot',
    120           mastername=mastername,
    121           slavename=slavename,
    122           buildnumber=5,
    123           path_config='kitchen',
    124           swarm_out_dir='[SWARM_OUT_DIR]',
    125           repository='https://skia.googlesource.com/skia.git',
    126           revision='abc123',
    127           patch_storage='gerrit') +
    128       api.properties.tryserver(
    129           buildername=buildername + '-Trybot',
    130           gerrit_project='skia',
    131           gerrit_url='https://skia-review.googlesource.com/',
    132       ) +
    133       api.platform('win', 64)
    134   )
    135 
    136   yield (
    137       api.test('buildbotless_trybot_rietveld') +
    138       api.properties(
    139           buildername=buildername,
    140           mastername=mastername,
    141           slavename=slavename,
    142           buildnumber=5,
    143           path_config='kitchen',
    144           swarm_out_dir='[SWARM_OUT_DIR]',
    145           repository='https://skia.googlesource.com/skia.git',
    146           revision='abc123',
    147           nobuildbot='True',
    148           issue=500,
    149           patchset=1,
    150           patch_storage='rietveld',
    151           rietveld='https://codereview.chromium.org') +
    152       api.platform('win', 64)
    153   )
    154 
    155   yield (
    156       api.test('buildbotless_trybot_gerrit') +
    157       api.properties(
    158           repository='https://skia.googlesource.com/skia.git',
    159           buildername=buildername,
    160           mastername=mastername,
    161           slavename=slavename,
    162           buildnumber=5,
    163           path_config='kitchen',
    164           swarm_out_dir='[SWARM_OUT_DIR]',
    165           revision='abc123',
    166           nobuildbot='True',
    167           patch_issue=500,
    168           patch_set=1,
    169           patch_storage='gerrit') +
    170       api.properties.tryserver(
    171           buildername=buildername,
    172           gerrit_project='skia',
    173           gerrit_url='https://skia-review.googlesource.com/',
    174       ) +
    175       api.platform('win', 64)
    176   )
    177 
    178   buildername = 'Build-Win-MSVC-x86_64-Release-Vulkan'
    179   yield (
    180       api.test('alternate_repo') +
    181       api.properties(buildername=buildername,
    182                      mastername=mastername,
    183                      slavename=slavename,
    184                      buildnumber=5,
    185                      repository='https://skia.googlesource.com/other_repo.git',
    186                      revision='abc123',
    187                      path_config='kitchen',
    188                      swarm_out_dir='[SWARM_OUT_DIR]') +
    189       api.path.exists(
    190           api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
    191       )
    192     )
    193 
    194   buildername = 'Build-Ubuntu-GCC-x86_64-Release-PDFium'
    195   yield (
    196       api.test('pdfium_trybot') +
    197       api.properties(
    198           repository='https://skia.googlesource.com/skia.git',
    199           buildername=buildername,
    200           mastername=mastername,
    201           slavename=slavename,
    202           buildnumber=5,
    203           path_config='kitchen',
    204           swarm_out_dir='[SWARM_OUT_DIR]',
    205           revision='abc123',
    206           nobuildbot='True',
    207           patch_issue=500,
    208           patch_set=1,
    209           patch_storage='gerrit') +
    210       api.properties.tryserver(
    211           buildername=buildername,
    212           gerrit_project='skia',
    213           gerrit_url='https://skia-review.googlesource.com/',
    214       ) +
    215       api.path.exists(
    216           api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
    217       )
    218   )
    219 
    220   buildername = 'Build-Ubuntu-GCC-x86_64-Release-Flutter_Android'
    221   yield (
    222       api.test('flutter_trybot') +
    223       api.properties(
    224           repository='https://skia.googlesource.com/skia.git',
    225           buildername=buildername,
    226           mastername=mastername,
    227           slavename=slavename,
    228           buildnumber=5,
    229           path_config='kitchen',
    230           swarm_out_dir='[SWARM_OUT_DIR]',
    231           revision='abc123',
    232           nobuildbot='True',
    233           patch_issue=500,
    234           patch_set=1,
    235           patch_storage='gerrit') +
    236       api.properties.tryserver(
    237           buildername=buildername,
    238           gerrit_project='skia',
    239           gerrit_url='https://skia-review.googlesource.com/',
    240       ) +
    241       api.path.exists(
    242           api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
    243       )
    244   )
    245