Commit 63154657 authored by Niles Rogoff's avatar Niles Rogoff Committed by Facebook GitHub Bot

Migrate bistro to getdeps

Summary:
This took a lot of cmake fuckery. I am guessing it will break the current travis-ci.org based build, since it no longer downloads gflags.

As I put this diff up, mvfst (a dependency of quic (a dependency of proxygen)) is not building right now due to another diff - a fix is in progress but isn't landed yet. I applied the fix locally for the test plan, but didn't include it in the diff.

Reviewed By: snarkmaster

Differential Revision: D25651851

fbshipit-source-id: b4f15ac7fa5293123710fe367c20d355c0970c42
parent 3d7f331c
......@@ -263,6 +263,44 @@ class Iproute2Builder(BuilderBase):
self._run_cmd(install_cmd, env=env)
class BistroBuilder(BuilderBase):
def _build(self, install_dirs, reconfigure):
p = os.path.join(self.src_dir, "bistro", "bistro")
env = self._compute_env(install_dirs)
env["PATH"] = env["PATH"] + ":" + os.path.join(p, "bin")
env["TEMPLATES_PATH"] = os.path.join(p, "include", "thrift", "templates")
self._run_cmd(
[
os.path.join(".", "cmake", "run-cmake.sh"),
"Release",
"-DCMAKE_INSTALL_PREFIX=" + self.inst_dir,
],
cwd=p,
env=env,
)
self._run_cmd(
[
"make",
"install",
"-j",
str(self.build_opts.num_jobs),
],
cwd=os.path.join(p, "cmake", "Release"),
env=env,
)
def run_tests(
self, install_dirs, schedule_type, owner, test_filter, retry, no_testpilot
):
env = self._compute_env(install_dirs)
build_dir = os.path.join(self.src_dir, "bistro", "bistro", "cmake", "Release")
self._run_cmd(
["ctest", build_dir],
cwd=build_dir,
env=env,
)
class CMakeBuilder(BuilderBase):
MANUAL_BUILD_SCRIPT = """\
#!{sys.executable}
......
......@@ -13,6 +13,7 @@ from .builder import (
Boost,
CargoBuilder,
CMakeBuilder,
BistroBuilder,
Iproute2Builder,
MakeBuilder,
NinjaBootstrap,
......@@ -462,6 +463,16 @@ class ManifestParser(object):
args = self.get_section_as_args("b2.args", ctx)
return Boost(build_options, ctx, self, src_dir, build_dir, inst_dir, args)
if builder == "bistro":
return BistroBuilder(
build_options,
ctx,
self,
src_dir,
build_dir,
inst_dir,
)
if builder == "cmake":
defines = self.get_section_as_dict("cmake.defines", ctx)
return CMakeBuilder(
......
[manifest]
name = bistro
fbsource_path = fbcode/bistro
shipit_project = bistro
shipit_fbcode_builder = true
[git]
repo_url = https://github.com/facebook/bistro.git
[build]
builder = bistro
[dependencies]
fmt
folly
proxygen
fbthrift
libsodium
googletest_1_8
sqlite3
[shipit.pathmap]
fbcode/bistro/public_tld = .
fbcode/bistro = bistro
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment