def _fetch(parameters, src_path): if src_path.exists(): LOG.info('skip: fetch v8') return LOG.info('fetch v8') scripts.mkdir(src_path.parent) with scripts.using_cwd(src_path.parent): scripts.run(['fetch', 'v8']) branch = 'branch-heads/%s' % parameters['branch-head'] with scripts.using_cwd(src_path): scripts.run(['git', 'checkout', branch]) scripts.run(['git', 'pull', 'origin', branch]) scripts.run(['gclient', 'sync'])
def _git_get_source(source): with scripts.using_cwd(source), scripts.doing_capture_stdout(): return ReleaseMetadata.Source( url=_git_get_url(source), revision=_git_get_revision(), dirty=_git_get_dirty(), )
def _remove_file_and_maybe_parents(path, parent_path): scripts.rm(path, recursive=path.is_dir()) with scripts.using_cwd(parent_path): scripts.rmdir( path.parent.relative_to(parent_path), parents=True, ignore_fail_on_non_empty=True, )
def build(parameters): config_data = json.loads( ASSERT.predicate(_get_config_path(parameters), Path.is_file)\ .read_text() ) src_path = _get_src_path(parameters) with scripts.using_cwd(src_path): _build(parameters, src_path, config_data) _install()
def build(parameters): if parameters['//bases:build-xar-image']: LOG.info('do nothing in xar builds') return src_path = _get_src_path(parameters) with scripts.using_cwd(src_path): _configure(parameters, src_path) _build(parameters, src_path) _install(parameters, src_path) _fixup(parameters, src_path)
def build(parameters): src_path = find_package( parameters, foreman.get_relpath(), sub_directory_path, ) LOG.info('build first-party package: %s', src_path) with scripts.using_cwd(src_path): scripts.run(['npm', 'install']) scripts.run(['npm', 'run', 'build'])
def setup(parameters): src_path = ASSERT.predicate( _find_project(parameters, foreman.get_relpath()), _is_root_project, ) if (src_path / 'gradlew').exists(): LOG.info('skip: generate gradle wrapper') return LOG.info('generate gradle wrapper') with scripts.using_cwd(src_path): scripts.run(['gradle', 'wrapper'])
def build(parameters): src_path = parameters['//bases:drydock'] / foreman.get_relpath() src_path /= src_path.name if (src_path / 'capnpc-java').exists(): LOG.info('skip: build capnproto-java') return LOG.info('build capnproto-java') bin_path = _get_var_path('exec_prefix') / 'bin' header_path = _get_var_path('includedir') / 'capnp' with scripts.using_cwd(src_path): scripts.make() with scripts.using_sudo(): scripts.cp('capnpc-java', bin_path) scripts.cp('compiler/src/main/schema/capnp/java.capnp', header_path)
def build(parameters): src_path = parameters['//bases:drydock'] / foreman.get_relpath() src_path /= src_path.name if (src_path / 'c++/.libs/libcapnp.so').exists(): LOG.info('skip: build capnproto') return LOG.info('build capnproto') with scripts.using_cwd(src_path / 'c++'): scripts.run(['autoreconf', '-i']) scripts.run(['./configure']) # Skip `make check` for now. scripts.make() with scripts.using_sudo(): scripts.make(['install']) scripts.run(['ldconfig'])
def _build(src_path): if (src_path / 'out.gn/x64.release/obj/libv8_monolith.a').exists(): LOG.info('skip: build v8') return LOG.info('build v8') with scripts.using_cwd(src_path): _fixup() scripts.run([ './tools/dev/v8gen.py', 'gen', # x64.release.sample sets v8_monolithic=true. *('-b', 'x64.release.sample'), # Remove ".sample" from output directory. 'x64.release', ]) scripts.run(['ninja', '-C', 'out.gn/x64.release', 'v8_monolith'])
def build(parameters): src_path = _find_project(parameters, foreman.get_relpath()) root_path = _find_root_project(src_path) ASSERT.false(src_path.samefile(root_path)) output_path = src_path / ('build/libs/%s-all.jar' % src_path.name) task = ':'.join(src_path.relative_to(root_path).parts) task = ':%s:shadowJar' % task target_dir_path = parameters[root_project + ':packages'] if (target_dir_path / output_path.name).exists(): LOG.info('skip: run task %s', task) return LOG.info('run task %s', task) with scripts.using_cwd(root_path): scripts.run(['./gradlew', task]) with scripts.using_sudo(): scripts.mkdir(target_dir_path) scripts.cp(output_path, target_dir_path)
def build(parameters): src_path = parameters['//bases:drydock'] / foreman.get_relpath() src_path /= src_path.name build_dir_path = src_path / 'build' if build_dir_path.exists(): LOG.info('skip: build nng') return LOG.info('build nng') scripts.mkdir(build_dir_path) with scripts.using_cwd(build_dir_path): scripts.run([ 'cmake', *('-D', 'BUILD_SHARED_LIBS:BOOL=ON'), *('-G', 'Ninja'), '..', ]) scripts.run(['ninja']) # Skip `ninja test` for now. with scripts.using_sudo(): scripts.run(['ninja', 'install']) scripts.run(['ldconfig'])
def build(parameters): src_path = find_package(parameters, foreman.get_relpath()) LOG.info('build first-party package: %s', src_path) with scripts.using_cwd(src_path): _build(parameters, make_global_options)
def build(parameters): src_path = parameters['//bases:drydock'] / foreman.get_relpath() src_path /= src_path.name scripts.export_path('PATH', src_path) with scripts.using_cwd(src_path): scripts.run(['gclient']) # This updates depot_tools.