rust-toolchain
rust-toolchain copied to clipboard
Add concrete example for cross-compilation check
Hello,
Thanks for providing these github actions! I am migrating my repositories and I have some repositories where I check the repository for embedded toolchains. I think a concrete example might help here.
For example, I made the CI checks work with this:
cross-check:
name: Check Cross-Compilation
runs-on: ubuntu-latest
strategy:
matrix:
target:
- armv7-unknown-linux-gnueabihf
- thumbv7em-none-eabihf
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "armv7-unknown-linux-gnueabihf, thumbv7em-none-eabihf"
- run: cargo check --release --target=${{matrix.target}} --no-default-features
Maybe there is a better way, but I think something like a More Examples section in the README might help here. If you think this is a useful addition, I can prepare a PR.