Skip to content
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

Update Rust action in CI and simplify caching #249

Merged
merged 2 commits into from
Apr 9, 2023

Conversation

TimJentzsch
Copy link
Collaborator

Closes #124.

In this PR, the mostly unmaintained actions-rs/toolchain action is replaced by dtolnay/rust-toolchain which is also used in Bevy's CI now.

Additionally, the Leafwing-Studios/cargo-cache action is used to greatly simplify the build file caching in the workflows.

@janhohenheim
Copy link
Owner

janhohenheim commented Apr 9, 2023

I was eyeing the dtolnay action as well, but I'm a bit sad that it doesn't support the toolchain file at the root. Then again, the toolchain file would need to include both macOS targets to be useful in the CI, but we don't want that for non-CI builds...
Anyways, that's just rambling, thanks for the PR! I'll merge it when the CI checks pass :)
Maybe @NiklasEi would be glad to have this upstreamed in https://github.com/NiklasEi/bevy_game_template as well. What do you think, Niklas?

@TimJentzsch
Copy link
Collaborator Author

I'm a bit sad that it doesn't support the toolchain file at the root.

Doesn't the action just install Rust and Cargo?
In theory, the cargo commands should still use the toolchain file if I'm not mistaken.
Or do you mean that it should automatically install the correct version of rustc by parsing the toolchain file?

@janhohenheim
Copy link
Owner

Exactly. Currently, because of madsmtm/objc2#432, there is a specific nightly version duplicated in both the toolchain file and the workflow.

@janhohenheim janhohenheim merged commit 5606d14 into janhohenheim:main Apr 9, 2023
@TimJentzsch
Copy link
Collaborator Author

Exactly. Currently, because of madsmtm/objc2#432, there is a specific nightly version duplicated in both the toolchain file and the workflow.

Have you tried this patch already with cargo update? madsmtm/objc2#432 (comment)

@TimJentzsch TimJentzsch deleted the simplify-ci-caching branch April 9, 2023 10:59
@janhohenheim
Copy link
Owner

Not yet, been busy with the Jam ;D

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.

Use LeafWing caching
2 participants