-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR CI: check-build the library for more targets #121519
Comments
Sysroot builds are nearly serial, and our runners have 8 vCPUs each. While Cargo supports multi-target builds and parallelizes them effectively, other tools like cargo-miri and bootstrap do not. I've poked around the code in bootstrap for passing multiple targets down to the |
For anyone who wants a demo of how close-at-hand this is, you can just run this locally today:
|
I believe this is more related to the infra team. Bootstrap team don't have any access to CI environments. |
It's not about access to any environments, all files that need changing are in this repo. It's about adjusting our CI scripts to run these checks. No idea who's usually maintaining them... |
Right 🤦 my bad. |
@saethlin hm, this way of cross-checking does not seem to work for all hosts though...
|
I think we can bypass target sanity check with |
Yeah, I just thought that wouldn't be necessary any more. I guess I misunderstood. |
The target sanity checks were added so that you don't fail late when bootstrap does cc detection internally. We removed the cc detection and use of its results in check builds. So the sanity checks aren't doing anything useful for check builds. Maybe there's enough context available when they're done to skip them for check builds. |
Is this true even in build scripts? |
Aren't build scripts compiled for the host? |
We do this sanity check for host too and bootstrap should complain about it if they are missing. I guess we can optimize it by performing the sanity check only for the host if it's a check build. |
After testing some more,
I didn't test this properly but I did hack out the sanity check and linker configuration which seemed to work for all targets (albeit with check errors on some, which is not unexpected). |
…eck, r=albertlarsan68 skip sanity check for non-host targets in `check` builds For `check` builds, since we only need to perform a sanity check on the host target, this patch skips target sanity checks on non-host targets. For more context, see rust-lang#121519 (comment) cc `@saethlin`
…eck, r=albertlarsan68 skip sanity check for non-host targets in `check` builds For `check` builds, since we only need to perform a sanity check on the host target, this patch skips target sanity checks on non-host targets. For more context, see rust-lang#121519 (comment) cc ``@saethlin``
…eck, r=albertlarsan68 skip sanity check for non-host targets in `check` builds For `check` builds, since we only need to perform a sanity check on the host target, this patch skips target sanity checks on non-host targets. For more context, see rust-lang#121519 (comment) cc `@saethlin`
…eck, r=albertlarsan68 skip sanity check for non-host targets in `check` builds For `check` builds, since we only need to perform a sanity check on the host target, this patch skips target sanity checks on non-host targets. For more context, see rust-lang#121519 (comment) cc ``@saethlin``
Rollup merge of rust-lang#121907 - onur-ozkan:better-target-sanity-check, r=albertlarsan68 skip sanity check for non-host targets in `check` builds For `check` builds, since we only need to perform a sanity check on the host target, this patch skips target sanity checks on non-host targets. For more context, see rust-lang#121519 (comment) cc ``@saethlin``
…bertlarsan68 skip sanity check for non-host targets in `check` builds For `check` builds, since we only need to perform a sanity check on the host target, this patch skips target sanity checks on non-host targets. For more context, see rust-lang/rust#121519 (comment) cc ``@saethlin``
In https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/PSA.3A.20.2E.2Fx.20check.20can.20work.20for.20any.20target, running checks for T2 and T3 targets was discussed. Where would be the place to do this? #122401 used the main mingw-check, but it's probably not worth running T2/T3 on every PR. |
No strong opinion. We should aim to minimize impact on overall build times, but otherwise just picking shortest builders feels reasonable. There's probably also a discussion to be had about cost/benefit -- increasing checks to some extent is a shift in our target tiering. Tier 2 targets already largely get build-tested as part of the dist builders for them, so not sure there's sufficient value in additional checks in PR CI there. Tier 3 targets aren't, but that's sort of by intent; that tier specifically does not come with any CI costs. |
@saethlin and @onur-ozkan made it so that
./x.py check library --target=aarch64-pc-windows-msvc
now works on all hosts, without special magic Windows tooling being needed. We should use that in PR CI to catch some more standard library build issues. In particular we are currently not covering(Or, well, it turns out we run Miri tests for these targets so we cover them in x86_64-gnu-tools. But that seems to be a bit too accidental. And Miri doesn't complain if there are warnings, only if there are errors. And this sets
cfg(miri)
which changes some codepaths.)@rust-lang/infra which runner would be the best one to add this to? AFAIK the mingw-check runner exists mostly to give us some test coverage for library builds on a Windows target, so maybe that would be a good one?
The text was updated successfully, but these errors were encountered: