Skip to content

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

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 18, 2021

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.

@pietroalbini
Copy link
Member

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.
@jyn514
Copy link
Member Author

jyn514 commented Apr 20, 2021

Sure thing, done.

Copy link
Member

@pietroalbini pietroalbini left a 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()?;
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jyn514
Copy link
Member Author

jyn514 commented Apr 20, 2021

The windows-latest failure doesn't seem to have logs :/

@pietroalbini
Copy link
Member

That seems like a bug in GHA, also because another windows-latest build was executed successfully. Merging this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants