mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-10 05:22:59 +03:00
trying out this tool, fbcodeBuilder
Summary: this diff provides ci builds for our two open source projects, openr and fbzmq, by leveraging snarkmaster 's awesome tool, fbcode builder. this will run our external cmake build process on lego-linux sandcastle boxes and also generates scripts for building on travis with docker externally. this diff is modeled on D4441467. it also includes some changes to fbcode builder itself and some minor changes in our cmake files. snarkmaster , please take a look at my fbcode builder changes. I needed to make some modifications in order to build some of our dependencies which have slightly non-standard build steps and to run tests. I split up the configure step, and I addressed an issue around workdir with cmake. the last workdir was just a relative path, `build`, so it was hard to get back to it in a future step to run tests. Reviewed By: saifhhasan Differential Revision: D5141184 fbshipit-source-id: 94cacab807a3a0da4d0d81016d7f36f37656145d
This commit is contained in:
committed by
Facebook Github Bot
parent
ee7928625c
commit
d613fed62f
@@ -232,10 +232,10 @@ class FBCodeBuilder(object):
|
||||
self.workdir(path_join(base_dir, os.path.basename(project), path)),
|
||||
] + maybe_change_branch)
|
||||
|
||||
def fb_github_project_workdir(self, project_and_path):
|
||||
def fb_github_project_workdir(self, project_and_path, github_org='facebook'):
|
||||
'This helper lets Facebook-internal CI special-cases FB projects'
|
||||
project, path = project_and_path.split('/', 1)
|
||||
return self.github_project_workdir('facebook/' + project, path)
|
||||
return self.github_project_workdir(github_org + '/' + project, path)
|
||||
|
||||
def _make_vars(self, make_vars):
|
||||
return shell_join(' ', (
|
||||
@@ -257,9 +257,8 @@ class FBCodeBuilder(object):
|
||||
)),
|
||||
]
|
||||
|
||||
def autoconf_install(self, name):
|
||||
return self.step('Build and install {0}'.format(name), [
|
||||
self.run(ShellQuoted('autoreconf -ivf')),
|
||||
def configure(self):
|
||||
return [
|
||||
self.run(ShellQuoted(
|
||||
'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
|
||||
'CFLAGS="$CFLAGS -I"{p}"/include" '
|
||||
@@ -267,9 +266,14 @@ class FBCodeBuilder(object):
|
||||
'PY_PREFIX={p} '
|
||||
'./configure --prefix={p}'
|
||||
).format(p=self.option('prefix'))),
|
||||
] + self.make_and_install())
|
||||
]
|
||||
|
||||
def cmake_install(self, name):
|
||||
def autoconf_install(self, name):
|
||||
return self.step('Build and install {0}'.format(name), [
|
||||
self.run(ShellQuoted('autoreconf -ivf')),
|
||||
] + self.configure() + self.make_and_install())
|
||||
|
||||
def cmake_configure(self, name):
|
||||
cmake_defines = {
|
||||
'BUILD_SHARED_LIBS': 'ON',
|
||||
'CMAKE_INSTALL_PREFIX': self.option('prefix'),
|
||||
@@ -277,15 +281,22 @@ class FBCodeBuilder(object):
|
||||
cmake_defines.update(
|
||||
self.option('{0}:cmake_defines'.format(name), {})
|
||||
)
|
||||
return self.step('Build and install {0}'.format(name), [
|
||||
self.workdir('build'),
|
||||
self.run(ShellQuoted('cmake {args} ..').format(
|
||||
return [
|
||||
self.run(ShellQuoted(
|
||||
'CXXFLAGS="$CXXFLAGS -isystem "{p}"/include" '
|
||||
'CFLAGS="$CFLAGS -isystem "{p}"/include" '
|
||||
'cmake {args} ..').format(
|
||||
p=self.option('prefix'),
|
||||
args=shell_join(' ', (
|
||||
ShellQuoted('-D{k}={v}').format(k=k, v=v)
|
||||
for k, v in cmake_defines.items()
|
||||
))
|
||||
)),
|
||||
] + self.make_and_install())
|
||||
]
|
||||
|
||||
def cmake_install(self, name):
|
||||
return self.step('Build and install {0}'.format(name),
|
||||
self.cmake_configure(name) + self.make_and_install())
|
||||
|
||||
def fb_github_autoconf_install(self, project_and_path):
|
||||
return [
|
||||
|
Reference in New Issue
Block a user