Skip to content

Commit 0ebb204

Browse files
committed
ci: For no-dist targets, do a check rather than a full build
(backport <#4780>) (cherry picked from commit a53f4bc)
1 parent 8948e7a commit 0ebb204

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ci/verify-build.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,15 @@ def test_target(cfg: Cfg, target: Target):
248248
assert target_bits in ["32", "64"]
249249
eprint(f"env {target_env}, os {target_os}, bits {target_bits}")
250250

251-
cmd = ["cargo", f"+{cfg.toolchain_name}", "build", "--target", tname]
251+
# Usually we do a full build to make sure we don't run into any crashes or link
252+
# problems. If we need to use build-std, though, only do a check to speed
253+
# things up.
254+
if target.dist:
255+
action = "build"
256+
else:
257+
action = "check"
258+
259+
cmd = ["cargo", f"+{cfg.toolchain_name}", action, "--target", tname]
252260

253261
if not target.dist:
254262
# If we can't download a `core`, we need to build it

0 commit comments

Comments
 (0)