Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1163)

Unified Diff: scripts/slave/recipes/chromium_codesearch.py

Issue 2332283002: Use [CACHE]/cipd/goma for goma_dir in recipes/chromium_codesearch.py (Closed)
Patch Set: use goma_dir Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_codesearch.expected/full_ChromiumOS_Codesearch.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipes/chromium_codesearch.py
diff --git a/scripts/slave/recipes/chromium_codesearch.py b/scripts/slave/recipes/chromium_codesearch.py
index 6fcb3e29366914cf39e78312408945b4802c5782..3256372aea6374bcde40b42bc3d0e5a938c101d9 100644
--- a/scripts/slave/recipes/chromium_codesearch.py
+++ b/scripts/slave/recipes/chromium_codesearch.py
@@ -5,11 +5,12 @@
from recipe_engine.types import freeze
DEPS = [
- 'depot_tools/bot_update',
'chromium',
'commit_position',
- 'file',
+ 'depot_tools/bot_update',
'depot_tools/gclient',
+ 'file',
+ 'goma',
'gsutil',
'recipe_engine/json',
'recipe_engine/path',
@@ -45,10 +46,8 @@ LINUX_GN_ARGS = [
'is_clang=true',
'is_component_build=true',
'is_debug=true',
- 'goma_dir="/b/build/goma"',
'symbol_level=1',
'target_cpu="x64"',
- 'use_goma=true',
]
CHROMEOS_GN_ARGS = LINUX_GN_ARGS + [
@@ -103,15 +102,24 @@ def GenerateCompilationDatabase(api, debug_path, targets, platform):
# adjusted.
gn_path = api.path['checkout'].join('buildtools', 'linux64', 'gn')
args = LINUX_GN_ARGS if platform == 'linux' else CHROMEOS_GN_ARGS
+ args.extend(['use_goma=true',
+ 'goma_dir=%s' % api.goma.goma_dir])
ukai 2016/09/21 07:12:49 hmm. https://build.chromium.org/p/chromium.infra.c
command = [gn_path, 'gen', debug_path, '--args=%s' % ' '.join(args)]
api.step('generate build files for %s' % platform, command,
cwd=api.path['checkout'])
command = ['ninja', '-C', debug_path] + list(targets)
# Add the parameters for creating the compilation database.
command += ['-t', 'compdb', 'cc', 'cxx', 'objc', 'objcxx']
- return api.step('generate compilation database for %s' % platform,
- command,
- stdout=api.raw_io.output())
+
+ command += ['-j', api.goma.recommended_goma_jobs]
+
+ with api.goma.build_with_goma(
+ ninja_log_outdir=debug_path,
+ ninja_log_command=command,
+ ninja_log_compiler='goma'):
+ return api.step('generate compilation database for %s' % platform,
+ command,
+ stdout=api.raw_io.output())
def RunSteps(api):
@@ -140,6 +148,7 @@ def RunSteps(api):
debug_path = api.path['checkout'].join('out', 'Debug')
targets = bot_config.get('compile_targets', [])
api.chromium.set_config('codesearch', BUILD_CONFIG='Debug')
+ api.chromium.ensure_goma()
api.chromium.runhooks()
result = GenerateCompilationDatabase(api, debug_path, targets, platform)
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium_codesearch.expected/full_ChromiumOS_Codesearch.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698