1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-08 18:02:05 +03:00

edenscm/hg: add GitHub Actions with CI for HG plus add fixes for getdeps (#25)

Summary:
Fixes include:
1. Passing "GETDEPS_BUILD_DIR" and "GETDEPS_INSTALL_DIR" env variable and using them in eden/scm/Makefile rather than assuming the source code is always in the same place regardless getdeps arguments (it isn't).
2. Added "fbthrift-source" and "fb303-source" to avoid unnecessary compilation (at least of fb303) and to put fbthrift and fb303 source code in an easy to locate place inside getdeps' "installed" folder.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/25

Test Plan: sandcastle, check oss-eden_scm-darwin-getdeps

Reviewed By: farnz

Differential Revision: D22431872

Pulled By: lukaspiatkowski

fbshipit-source-id: 8ccbb090713ec085a5dd56df509eb58ab6fb9e34
This commit is contained in:
Lukasz Piatkowski
2020-07-10 12:04:28 -07:00
committed by Facebook GitHub Bot
parent 579b5a2225
commit 17391dd9f5
7 changed files with 41 additions and 21 deletions

View File

@@ -24,13 +24,13 @@ class RunCommandError(Exception):
pass
def _print_env_diff(env):
def _print_env_diff(env, log_fn):
current_keys = set(os.environ.keys())
wanted_env = set(env.keys())
unset_keys = current_keys.difference(wanted_env)
for k in sorted(unset_keys):
print("+ unset %s" % k)
log_fn("+ unset %s\n" % k)
added_keys = wanted_env.difference(current_keys)
for k in wanted_env.intersection(current_keys):
@@ -39,11 +39,11 @@ def _print_env_diff(env):
for k in sorted(added_keys):
if ("PATH" in k) and (os.pathsep in env[k]):
print("+ %s=\\" % k)
log_fn("+ %s=\\\n" % k)
for elem in env[k].split(os.pathsep):
print("+ %s%s\\" % (shellquote(elem), os.pathsep))
log_fn("+ %s%s\\\n" % (shellquote(elem), os.pathsep))
else:
print("+ %s=%s \\" % (k, shellquote(env[k])))
log_fn("+ %s=%s \\\n" % (k, shellquote(env[k])))
def run_cmd(cmd, env=None, cwd=None, allow_fail=False, log_file=None):
@@ -76,7 +76,7 @@ def _run_cmd(cmd, env, cwd, allow_fail, log_fn):
if env:
assert isinstance(env, Env)
_print_env_diff(env)
_print_env_diff(env, log_fn)
# Convert from our Env type to a regular dict.
# This is needed because python3 looks up b'PATH' and 'PATH'