Closed ok-nick closed 1 year ago
Thanks!
Additional improvement: I can see that with checlout@v3 (or anything newer than v2.4.0, see https://github.com/actions/checkout/commit/ec3a7ce113134d7a93b817d10a8272cb61118579) we do not need that custom git checkout for submodules. We should be able to remove both by specifying recursive submodule checkout with the checkout action
git -c "url.https://github.com/.insteadOf=git@github.com:" submodule update
And git submodule recursive
EDIT: Answering myself: it seems that the ubuntu-latest "virtual environment" contains certain version of cargo and other tools (eg cmake): https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
I can see you opted for raw cargo command (instead of cargo action, https://github.com/actions-rs/cargo). Was that intentional? Please see "Why would you want to use this Action instead" I'm actions-rs/cargo docs
The new template uses caching, https://github.com/Swatinem/rust-cache. Would it bring some advantages here as well?
I'm not sure, GitHub Action hosted runners are always updated with the latest. Maybe I'll leave an issue on their repo?
The cargo action has a section in the readme for "use cases." It's not necessary unless you need something like cross.
It would also be a good idea to add the cargo cache action and I removed the -D warnings
flag from clippy
accidentally.
Re point 1: I am good utilizing the cargo clippy and other default versions for linting. With build I would prefer more explicit choice of tools, as to communicate tested/supported rustc.
Regarding cargo action (point 2), you are correct that is not really required. However, it might bring some QoL improvements: they are saying that "Warnings and errors issued by cargo will be displayed in GitHub UI". Is this useful?
Closing this one in favor of #34 - same as this one but rebased
Thanks @ok-nick !
Removes redundancies and updates actions.
cargo fmt
is extremely fast, if it fails,clippy
fails. It makes sense to combine them into one job.