-
Notifications
You must be signed in to change notification settings - Fork 44
Remove rust-toolchain before running builds #60
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
Conversation
Thanks! Could you also add a changelog line? |
This avoids running with the wrong version of the toolchain. .cargo/config.toml was recently added and omitted before.
Sure thing, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing I missed during review, other than this it's fine to merge the PR. Thanks!
runner::run("cargo-config", |run| { | ||
run.build(SandboxBuilder::new().enable_networking(false), |build| { | ||
let storage = rustwide::logging::LogStorage::new(LevelFilter::Info); | ||
rustwide::logging::capture(&storage, || -> Result<_, Error> { | ||
build.cargo().args(&["run"]).run()?; | ||
build.cargo().args(&["--version"]).run()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you run both cargo run
and cargo version
? You can do that in two different log captures if that makes the test easier to write. Otherwise here you're not testing the .cargo/config
with the invalid target in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tested below: https://github.com/rust-lang/rustwide/pull/60/files/ebb89f4c06a93999434e389b4e38b55b86aebaf7#diff-fb017238a25c2e8d919e32fe773c81046e9773a09a1be46b8bfa752f0cd6593aR97. It's just that the logging isn't captured (because it doesn't need to be).
The windows-latest failure doesn't seem to have logs :/ |
That seems like a bug in GHA, also because another windows-latest build was executed successfully. Merging this! |
This avoids running with the wrong version of the toolchain.
I had the same experience as in rust-lang/docs.rs#555 (comment) - the test succeeds even if I don't change rustwide, so it's not actually testing anything.