aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipes
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2018-05-30 14:36:03 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-30 19:02:18 +0000
commit418460834420cd254cf2f8ed327ff3e6fd78da01 (patch)
tree1f6ad138f7e3210b9782c1c2e885d437517f570d /infra/bots/recipes
parent5d1adbfae9ee59051f564c004b1097f845fad324 (diff)
[recipes] Add parameters to checkout module
Pass in the behavioral switches, rather than deriving them from the builder name inside the module. Bug: skia:6473 Change-Id: I2cbf67d5c450ae7e0fa319d983431d26505f0b67 Reviewed-on: https://skia-review.googlesource.com/130846 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipes')
-rw-r--r--infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json234
-rw-r--r--infra/bots/recipes/compile.py34
-rw-r--r--infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json1
-rw-r--r--infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json1
-rw-r--r--infra/bots/recipes/recreate_skps.expected/failed_upload.json1
-rw-r--r--infra/bots/recipes/recreate_skps.py9
6 files changed, 274 insertions, 6 deletions
diff --git a/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json b/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json
new file mode 100644
index 0000000000..7061a2e781
--- /dev/null
+++ b/infra/bots/recipes/compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json
@@ -0,0 +1,234 @@
+[
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "ensure-directory",
+ "--mode",
+ "0777",
+ "[START_DIR]/cache/work"
+ ],
+ "infra_step": true,
+ "name": "makedirs checkout_path"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "remove",
+ "[START_DIR]/cache/work/.gclient_entries"
+ ],
+ "infra_step": true,
+ "name": "remove [START_DIR]/cache/work/.gclient_entries"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
+ "--spec-path",
+ "cache_dir = '[START_DIR]/cache/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}, {'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
+ "--patch_root",
+ "skia",
+ "--revision_mapping_file",
+ "{\"got_revision\": \"skia\"}",
+ "--git-cache-dir",
+ "[START_DIR]/cache/git",
+ "--cleanup-dir",
+ "[CLEANUP]/bot_update",
+ "--output_json",
+ "/path/to/tmp/json",
+ "--revision",
+ "skia@abc123",
+ "--revision",
+ "src@origin/master"
+ ],
+ "cwd": "[START_DIR]/cache/work",
+ "env_prefixes": {
+ "PATH": [
+ "RECIPE_PACKAGE_REPO[depot_tools]"
+ ]
+ },
+ "infra_step": true,
+ "name": "bot_update",
+ "~followup_annotations": [
+ "@@@STEP_TEXT@Some step text@@@",
+ "@@@STEP_LOG_LINE@json.output@{@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"did_run\": true, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"fixed_revisions\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"skia\": \"abc123\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"src\": \"origin/master\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"manifest\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"repository\": \"https://fake.org/skia.git\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"patch_root\": \"skia\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"properties\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"root\": \"src\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"source_manifest\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"directories\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"skia\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"git_checkout\": {@@@",
+ "@@@STEP_LOG_LINE@json.output@ \"repo_url\": \"https://fake.org/skia.git\", @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ }@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"version\": 0@@@",
+ "@@@STEP_LOG_LINE@json.output@ }, @@@",
+ "@@@STEP_LOG_LINE@json.output@ \"step_text\": \"Some step text\"@@@",
+ "@@@STEP_LOG_LINE@json.output@}@@@",
+ "@@@STEP_LOG_END@json.output@@@",
+ "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
+ "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_PACKAGE_REPO[depot_tools]/gclient.py",
+ "runhooks"
+ ],
+ "cwd": "[START_DIR]/cache/work",
+ "env": {
+ "DEPOT_TOOLS_UPDATE": "0",
+ "GYP_CHROMIUM_NO_ACTION": "0",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "name": "gclient runhooks"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+ "--json-output",
+ "/path/to/tmp/json",
+ "ensure-directory",
+ "--mode",
+ "0777",
+ "[START_DIR]/tmp"
+ ],
+ "infra_step": true,
+ "name": "makedirs tmp_dir"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "[START_DIR]/cache/work/skia/tools/build_command_buffer.py",
+ "--chrome-dir",
+ "[START_DIR]/cache/work",
+ "--output-dir",
+ "[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
+ "--no-sync",
+ "--no-hooks",
+ "--make-output-dir"
+ ],
+ "env": {
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "name": "build command_buffer"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "[START_DIR]/cache/work/skia/bin/fetch-gn"
+ ],
+ "cwd": "[START_DIR]/cache/work/skia",
+ "env": {
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "infra_step": true,
+ "name": "fetch-gn"
+ },
+ {
+ "cmd": [
+ "[START_DIR]/cache/work/skia/bin/gn",
+ "gen",
+ "[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
+ "--args=cc=\"clang\" cxx=\"clang++\" extra_cflags=[\"-O1\"] target_cpu=\"x86_64\""
+ ],
+ "cwd": "[START_DIR]/cache/work/skia",
+ "env": {
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "name": "gn gen"
+ },
+ {
+ "cmd": [
+ "ninja",
+ "-k",
+ "0",
+ "-C",
+ "[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug"
+ ],
+ "cwd": "[START_DIR]/cache/work/skia",
+ "env": {
+ "CHROME_HEADLESS": "1",
+ "PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
+ },
+ "name": "ninja"
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "import errno\nimport glob\nimport os\nimport shutil\nimport sys\n\nsrc = sys.argv[1]\ndst = sys.argv[2]\nbuild_products_whitelist = ['bookmaker', 'dm', 'dm.exe', 'dm.app', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skiaserve', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk', 'whitelist_devices.json']\n\ntry:\n os.makedirs(dst)\nexcept OSError as e:\n if e.errno != errno.EEXIST:\n raise\n\nfor pattern in build_products_whitelist:\n path = os.path.join(src, pattern)\n for f in glob.glob(path):\n dst_path = os.path.join(dst, os.path.relpath(f, src))\n if not os.path.isdir(os.path.dirname(dst_path)):\n os.makedirs(os.path.dirname(dst_path))\n print 'Copying build product %s to %s' % (f, dst_path)\n shutil.move(f, dst_path)\n",
+ "[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
+ "[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
+ ],
+ "infra_step": true,
+ "name": "copy build products",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@import errno@@@",
+ "@@@STEP_LOG_LINE@python.inline@import glob@@@",
+ "@@@STEP_LOG_LINE@python.inline@import os@@@",
+ "@@@STEP_LOG_LINE@python.inline@import shutil@@@",
+ "@@@STEP_LOG_LINE@python.inline@import sys@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@src = sys.argv[1]@@@",
+ "@@@STEP_LOG_LINE@python.inline@dst = sys.argv[2]@@@",
+ "@@@STEP_LOG_LINE@python.inline@build_products_whitelist = ['bookmaker', 'dm', 'dm.exe', 'dm.app', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', 'nanobench', 'nanobench.exe', 'skpbench', 'skpbench.exe', '*.so', '*.dll', '*.dylib', 'skia_launcher', 'skiaserve', 'lib/*.so', 'run_testlab', 'skqp-universal-debug.apk', 'whitelist_devices.json']@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@try:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ os.makedirs(dst)@@@",
+ "@@@STEP_LOG_LINE@python.inline@except OSError as e:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if e.errno != errno.EEXIST:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ raise@@@",
+ "@@@STEP_LOG_LINE@python.inline@@@@",
+ "@@@STEP_LOG_LINE@python.inline@for pattern in build_products_whitelist:@@@",
+ "@@@STEP_LOG_LINE@python.inline@ path = os.path.join(src, pattern)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ for f in glob.glob(path):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ dst_path = os.path.join(dst, os.path.relpath(f, src))@@@",
+ "@@@STEP_LOG_LINE@python.inline@ if not os.path.isdir(os.path.dirname(dst_path)):@@@",
+ "@@@STEP_LOG_LINE@python.inline@ os.makedirs(os.path.dirname(dst_path))@@@",
+ "@@@STEP_LOG_LINE@python.inline@ print 'Copying build product %s to %s' % (f, dst_path)@@@",
+ "@@@STEP_LOG_LINE@python.inline@ shutil.move(f, dst_path)@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "name": "$result",
+ "recipe_result": null,
+ "status_code": 0
+ }
+] \ No newline at end of file
diff --git a/infra/bots/recipes/compile.py b/infra/bots/recipes/compile.py
index e5e553cd16..9a2e0f6b23 100644
--- a/infra/bots/recipes/compile.py
+++ b/infra/bots/recipes/compile.py
@@ -26,14 +26,37 @@ def RunSteps(api):
api.vars.setup()
# Check out code.
+ bot_update = True
+ checkout_root = api.checkout.default_checkout_root
+ checkout_chromium = False
+ checkout_flutter = False
+ extra_gclient_env = {}
+ flutter_android = False
+ parent_rev = False
+
if 'NoDEPS' in api.properties['buildername']:
+ bot_update = False
checkout_root = api.path['start_dir']
- api.checkout.git(checkout_root=checkout_root)
+ if 'CommandBuffer' in api.vars.builder_name:
+ checkout_chromium = True
+ if 'Flutter' in api.vars.builder_name:
+ checkout_root = checkout_root.join('flutter')
+ checkout_flutter = True
+ if 'Android' in api.vars.builder_name:
+ flutter_android = True
+ if 'ParentRevision' in api.vars.builder_name:
+ parent_rev = True
+
+ if bot_update:
+ api.checkout.bot_update(
+ checkout_root=checkout_root,
+ checkout_chromium=checkout_chromium,
+ checkout_flutter=checkout_flutter,
+ extra_gclient_env=extra_gclient_env,
+ flutter_android=flutter_android,
+ parent_rev=parent_rev)
else:
- checkout_root = api.checkout.default_checkout_root
- if 'Flutter' in api.vars.builder_name:
- checkout_root = checkout_root.join('flutter')
- api.checkout.bot_update(checkout_root=checkout_root)
+ api.checkout.git(checkout_root=checkout_root)
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
@@ -78,6 +101,7 @@ TEST_BUILDERS = [
'Build-Debian9-Clang-x86_64-Release-NoDEPS',
'Build-Debian9-Clang-x86_64-Release-ParentRevision',
'Build-Debian9-GCC-x86_64-Release-Flutter_Android',
+ 'Build-Mac-Clang-x86_64-Debug-CommandBuffer',
'Build-Win-Clang-x86-Debug',
]
diff --git a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json
index 949cd9386c..19635682e5 100644
--- a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json
+++ b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Nightly-RecreateSKPs_Canary.json
@@ -107,6 +107,7 @@
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"DEPOT_TOOLS_UPDATE": "0",
+ "GYP_CHROMIUM_NO_ACTION": "0",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
},
"name": "gclient runhooks"
diff --git a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json
index 35bd377ce6..b915c976ac 100644
--- a/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json
+++ b/infra/bots/recipes/recreate_skps.expected/Housekeeper-Weekly-RecreateSKPs.json
@@ -107,6 +107,7 @@
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"DEPOT_TOOLS_UPDATE": "0",
+ "GYP_CHROMIUM_NO_ACTION": "0",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
},
"name": "gclient runhooks"
diff --git a/infra/bots/recipes/recreate_skps.expected/failed_upload.json b/infra/bots/recipes/recreate_skps.expected/failed_upload.json
index 2078155fa6..2168c432f2 100644
--- a/infra/bots/recipes/recreate_skps.expected/failed_upload.json
+++ b/infra/bots/recipes/recreate_skps.expected/failed_upload.json
@@ -107,6 +107,7 @@
"env": {
"CPPFLAGS": "-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1",
"DEPOT_TOOLS_UPDATE": "0",
+ "GYP_CHROMIUM_NO_ACTION": "0",
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
},
"name": "gclient runhooks"
diff --git a/infra/bots/recipes/recreate_skps.py b/infra/bots/recipes/recreate_skps.py
index 80f4dcf0df..053cfba60f 100644
--- a/infra/bots/recipes/recreate_skps.py
+++ b/infra/bots/recipes/recreate_skps.py
@@ -36,8 +36,15 @@ TEST_BUILDERS = {
def RunSteps(api):
# Check out Chrome.
api.vars.setup()
+
checkout_root = api.checkout.default_checkout_root
- api.checkout.bot_update(checkout_root=checkout_root)
+ extra_gclient_env = {
+ 'CPPFLAGS': '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1'}
+ api.checkout.bot_update(
+ checkout_root=checkout_root,
+ checkout_chromium=True,
+ extra_gclient_env=extra_gclient_env)
+
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
api.flavor.setup()