Rust is incredibly forgiving in attempts to access `std`, making it
rather difficult to test `no-std` properly. In practice, the only
decent way to do so is to actually build for a platform that does
not have `std`, which we do here by building the `no-std-check`
crate for `arm-thumbv7m-none-eabi`.
# check no-std compatibility across dependencies
cd no-std-check
cargo check --verbose --color always
- cd ..
+ - name: Build no-std-check on Rust ${{ matrix.toolchain }} for ARM Embedded
+ if: "matrix.build-no-std && matrix.platform == 'ubuntu-latest'"
+ run: |
+ cd no-std-check
+ rustup target add thumbv7m-none-eabi
+ sudo apt-get -y install gcc-arm-none-eabi
+ cargo build --target=thumbv7m-none-eabi
- name: Test on no-std builds Rust ${{ matrix.toolchain }} and full code-linking for coverage generation
if: "matrix.build-no-std && matrix.coverage"
run: |