mirror of
https://github.com/openai/codex.git
synced 2026-05-16 09:12:54 +00:00
fix(v8): materialize staged Bazel outputs
This commit is contained in:
11
.github/scripts/rusty_v8_bazel.py
vendored
11
.github/scripts/rusty_v8_bazel.py
vendored
@@ -97,8 +97,10 @@ def bazel_build(
|
||||
labels: list[str],
|
||||
compilation_mode: str = "fastbuild",
|
||||
bazel_configs: list[str] | None = None,
|
||||
download_toplevel: bool = False,
|
||||
) -> None:
|
||||
bazel_configs = bazel_configs or []
|
||||
download_args = ["--remote_download_toplevel"] if download_toplevel else []
|
||||
subprocess.run(
|
||||
[
|
||||
"bazel",
|
||||
@@ -108,6 +110,7 @@ def bazel_build(
|
||||
f"--platforms=@llvm//platforms:{platform}",
|
||||
*[f"--config={config}" for config in bazel_configs],
|
||||
*bazel_remote_args(),
|
||||
*download_args,
|
||||
*labels,
|
||||
],
|
||||
cwd=ROOT,
|
||||
@@ -123,7 +126,13 @@ def ensure_bazel_output_files(
|
||||
) -> list[Path]:
|
||||
# Bazel output paths can be reused across config flips, so existence alone
|
||||
# does not prove the files match the requested flags.
|
||||
bazel_build(platform, labels, compilation_mode, bazel_configs)
|
||||
bazel_build(
|
||||
platform,
|
||||
labels,
|
||||
compilation_mode,
|
||||
bazel_configs,
|
||||
download_toplevel=True,
|
||||
)
|
||||
outputs = bazel_output_files(platform, labels, compilation_mode, bazel_configs)
|
||||
missing = [str(path) for path in outputs if not path.exists()]
|
||||
if missing:
|
||||
|
||||
1
.github/scripts/test_rusty_v8_bazel.py
vendored
1
.github/scripts/test_rusty_v8_bazel.py
vendored
@@ -255,6 +255,7 @@ class RustyV8BazelTest(unittest.TestCase):
|
||||
["//third_party/v8:pair"],
|
||||
"opt",
|
||||
["rusty-v8-upstream-libcxx"],
|
||||
download_toplevel=True,
|
||||
)
|
||||
bazel_output_files.assert_called_once_with(
|
||||
"macos_arm64",
|
||||
|
||||
Reference in New Issue
Block a user