google / comprehensive-rust

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
https://google.github.io/comprehensive-rust/
Apache License 2.0
27.98k stars 1.67k forks source link

Update Rust before setting up the cache #2460

Closed mgeisler closed 1 week ago

mgeisler commented 3 weeks ago

The cache is keyed on the Rust version used, so we should update Rust before setting up the cache.

This is a small update to #2449.

mgeisler commented 3 weeks ago

Looking a bit more at rustup, I wonder if we should start using a toolchain file: https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file.

I've never had to do this before, but it seems like it could simplify our setup in a few places? It could perhaps make

https://github.com/google/comprehensive-rust/blob/f8882190f332061d0dc71d68019f8bd5485db553/.github/workflows/build.yml#L70-L81

unnecessary (by moving this into separate toolchain files).