I spent some time playing with continuous integration with different services.
I run with following versions:
- Minimum Supported Rust Version (MSRV)
I run following commands:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
The rust compiler
cargo do the heavy lifting to make sure my code compile independently of the os/architecture.
However, is it necessary to run each version/commands on each OS ([linux, osx, windows]) and/or architectures (amd64/arm64) ?
For example, suppose I didn't write a piece of code hardly dependent to specific OS features or architecture.
cargo build and
cargo test steps passed on linux/amd64 should I build on other platforms or can I trust the rust compiler to work everywhere?
cargo clippy and
cargo fmt architecture/OS dependent ? If checks passed on linux/amd64 can I be confident clippy/rustfmt won't throw errors/warning on other platforms ?
Thanks for reading
The main goal is to not overstay on CI runners if running the specified commands will not raise any errors if they passed on one architecture/OS already.