rust-toolchain icon indicating copy to clipboard operation
rust-toolchain copied to clipboard

Add concrete example for cross-compilation check

Open robamu opened this issue 1 year ago • 0 comments

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.

robamu avatar May 02 '24 12:05 robamu