-
Notifications
You must be signed in to change notification settings - Fork 901
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
Support nightly CI #4498
Comments
A workaround obtained from #4230:
It works but increases the nightly CI runtime by 10 minutes!
|
You can use rustup-components-history, like: toolchain=nightly-$(curl -sSf https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt)
rustup set profile minimal
rustup default "$toolchain"
rustup component add rustfmt |
@mleonhard - nightly by its very nature means that things can be broken, so if you've configured your CI to always use the latest bleeding edge nightly then you are inevitably going to encounter breakages. If you want to use rustfmt in CI via rustup then a common strategy is to use a toolchain file. That's typically pinned to a known nightly that has the desired components available and periodically updated, although @taiki-e's solution sounds like a pretty elegant approach as well. Broken toolstates for rustfmt are almost exclusively caused by breaking upstream rustc changes that are incompatible with version of the private rustc mods that rustfmt consumes, so in cases where rustfmt is unavailable from rustup it's also not going to be possible to install rustfmt from crates.io nor build rustfmt from source; the same underlying issue surfaces in all cases. The only reason you were able to build from source successfully is because we'd happened to have already updated the versions of the rustc mods in source locally. Please also note that the version of rustfmt on the master branch of this repository is very different (a 2.0 RC version) than what's been officially released and distributed. We are in the process of extending our release process to additionally include pre-compiled binaries for all the tier 1 platforms and attach them as assets to our GitHub Releases. This should be in place (barring any final config bugs) with the next v1.4.23 release, and could potentially be an option for you to get rustfmt binaries for CI as well. Hope that helps, but going to close this as there's no action to be taken |
https://github.com/rust-lang/rustfmt/releases/tag/v1.4.23, binaries attached to release |
I use Gitlab CI to build and test with rust latest, beta, and nightly. See the gitlab-ci.yml. The nightly script often fails to download rustfmt or clippy.
How about providing a way to reliably use rustfmt in nightly CI executions?
Related: include rustfmt and clippy in the rustlang/nightly docker image
The text was updated successfully, but these errors were encountered: