ci: Use codex produced v8 artifacts for release builds (#23934)

Updates our build script to pull down the artifacts like we do in CI for
building v8 into our targets.

This changes the flow so that we now pre-install rusty v8 assets for all
of our release targets from pre-built in workflow.
Secondarily if running it locally we now optionally pull the assets down
on python run assuming the user hasn't set the proper values, it then
provides them.

Sorry for the miss here.
This commit is contained in:
Channing Conger
2026-05-22 09:42:08 -07:00
committed by GitHub
Unverified
parent 932f72c225
commit 014f19af5f
7 changed files with 212 additions and 26 deletions
+13 -1
View File
@@ -8,6 +8,7 @@ from pathlib import Path
from .targets import REPO_ROOT
from .targets import PackageVariant
from .targets import TargetSpec
from .v8 import resolve_codex_v8_cargo_env
CODEX_RS_ROOT = REPO_ROOT / "codex-rs"
@@ -60,8 +61,19 @@ def build_source_binaries(
for binary in binaries:
cmd.extend(["--bin", binary])
cargo_env = None
if entrypoint_bin is None:
codex_v8_env = resolve_codex_v8_cargo_env(spec)
if codex_v8_env:
cargo_env = {**os.environ, **codex_v8_env}
print("+", " ".join(cmd))
subprocess.run(cmd, cwd=CODEX_RS_ROOT, check=True)
subprocess.run(
cmd,
cwd=CODEX_RS_ROOT,
check=True,
env=cargo_env,
)
output_dir = cargo_profile_output_dir(spec, profile)
outputs = SourceBuildOutputs(