bootstrap: add bootstrap step to run intrinsic-test in CI#156356
bootstrap: add bootstrap step to run intrinsic-test in CI#156356xonx4l wants to merge 17 commits into
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { | ||
| run.path("library/stdarch/crates/intrinsic-test") | ||
| } |
There was a problem hiding this comment.
the intrinsic tests should also run when any of the source in core_arch changes (unless I'm misinterpreting what this function does).
There was a problem hiding this comment.
No you are not misinterpreting :) . You're so right I have added the core_arch path so it triggers . Thanks for the review.
| RUN curl -L http://ci-mirrors.rust-lang.org/sde-external-10.8.0-2026-03-15-lin.tar.xz -o /tmp/sde.tar.xz \ | ||
| && mkdir -p /intel-sde \ | ||
| && tar -xJf /tmp/sde.tar.xz --strip-components=1 -C /intel-sde \ | ||
| && rm /tmp/sde.tar.xz |
There was a problem hiding this comment.
this doesn't need an instant fix, but we bump the version of this tool occasionally, so ideally we'd sync that version between the repositories.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Thank you!
I wonder what to do about the required dependencies. GCC/Clang is fine, but the SDE emulator seems problematic. We have a lot of CI jobs that will run the intrinsics test and I don't think it is great if we install it on all of them. Of course it is also not great if it is required when running tests locally.
I think that we should make this test be non-default for now, and run it explicitly on selected CI jobs.
|
|
||
| let crates_link = out_dir.join("crates"); | ||
| if !crates_link.exists() { | ||
| std::os::unix::fs::symlink(builder.src.join("library/stdarch/crates"), &crates_link) |
There was a problem hiding this comment.
This won't work on non-Linux OSes. Why do we need this symlink?
There are existing functions in bootstrap to create symlinks, see symlink_dir.
There was a problem hiding this comment.
we need symlink because the generated Cargo.toml files depend on core_arch via a relative path. We generate into the build directory to avoid writing into the submodule so that path doesn't exist there. The symlink points back at the real stdarch crates so it resolves.
Yes , non-default and run it explicitly on selected CI jobs is better way to handle instead on every CI jobs . |
This comment has been minimized.
This comment has been minimized.
9383a8f to
f10bf02
Compare
|
Let's run this test explicitly in the |
@Kobzol As I added the x86_64-gnu Dockerfile invocation you suggested and ran ./x test library/stdarch/crates/intrinsic-test locally . It failed giving this error. warning: hidden lifetime parameters in types are deprecated error: |
|
You can just fix the warning, the change will be later synced back to |
|
☔ The latest upstream changes (presumably #153957) made this pull request unmergeable. Please resolve the merge conflicts. |
View all comments
This PR ports
library/stdarch/crates/intrinsic-testcrate into the bootstrap test runner as a step, so that we can run the intrinsic-test suite via x.py test.Changes -:
Ports
intrinsic-testfrom the stdarch crate into the bootstrap system as a new test step so it runs inside the existingx86_64-gnuandaarch64-gnuCI jobs .Added
intrinsic-testinsrc/bootstrap/src/core/build_steps/test.rs.Registers
intrinsic-testas a bootstrap tool intool.rs.Installs
clang,lld, and Intel SDE in the respective Dockerfiles.r? @Kobzol