Run bazel build on mainline
This commit is contained in:
parent
307a6e71ee
commit
3329564f50
2 changed files with 13 additions and 11 deletions
|
@ -17,7 +17,7 @@
|
|||
|
||||
import os
|
||||
|
||||
from steps import generic_linux, generic_windows, from_shell_output, extend_steps_env
|
||||
from steps import generic_linux, generic_windows, from_shell_output, extend_steps_env, bazel
|
||||
from sync_fork import sync_fork
|
||||
import git
|
||||
import yaml
|
||||
|
@ -50,7 +50,7 @@ if __name__ == '__main__':
|
|||
# two placess).
|
||||
steps.extend(generic_windows(
|
||||
os.getenv('ph_projects', 'llvm;clang;clang-tools-extra;libc;libcxx;libcxxabi;lld;libunwind;mlir;polly;flang')))
|
||||
|
||||
steps.extend(bazel([], force=True))
|
||||
if os.getenv('ph_skip_generated') is None:
|
||||
e = os.environ.copy()
|
||||
# BUILDKITE_COMMIT might be an alias, e.g. "HEAD". Resolve it to make the build hermetic.
|
||||
|
|
|
@ -75,11 +75,12 @@ def generic_linux(projects: str, check_diff: bool) -> List:
|
|||
return [linux_buld_step]
|
||||
|
||||
|
||||
def bazel(modified_files: Set[str]) -> List:
|
||||
def bazel(modified_files: Set[str], force: bool = False) -> List:
|
||||
if os.getenv('ph_skip_bazel') is not None:
|
||||
logging.info('bazel build is skipped as "ph_skip_bazel" is set')
|
||||
return []
|
||||
updated_build = any(s.startswith('utils/bazel/') for s in modified_files)
|
||||
if not force:
|
||||
if updated_build:
|
||||
logging.info('files in utils/bazel/ modified, will trigger bazel build')
|
||||
else:
|
||||
|
@ -92,6 +93,7 @@ def bazel(modified_files: Set[str]) -> List:
|
|||
t = os.getenv('ph_bazel_agents')
|
||||
if t is not None:
|
||||
agents = json.loads(t)
|
||||
|
||||
return [{
|
||||
'label': ':bazel: bazel',
|
||||
'key': 'bazel',
|
||||
|
|
Loading…
Reference in a new issue