rust.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: Build
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. rust:
  15. - stable
  16. - nightly
  17. - 1.52.1 # MSVR
  18. steps:
  19. - uses: actions/checkout@v2
  20. - name: Build
  21. run: cargo build --verbose
  22. - name: Run tests
  23. run: cargo test --verbose
  24. build_no_std:
  25. runs-on: ubuntu-latest
  26. strategy:
  27. matrix:
  28. rust:
  29. - stable
  30. - nightly
  31. - 1.52.1 # MSVR
  32. steps:
  33. - uses: actions/checkout@v2
  34. - name: "Rustup: install some no_std target"
  35. run: rustup target add thumbv7em-none-eabihf
  36. - name: Build (no_std)
  37. run: cargo build --target thumbv7em-none-eabihf
  38. # As discussed, these tasks are optional for PRs.
  39. style_checks:
  40. runs-on: ubuntu-latest
  41. strategy:
  42. matrix:
  43. rust:
  44. - stable
  45. steps:
  46. - uses: actions/checkout@v2
  47. - name: Rustfmt
  48. run: cargo fmt -- --check
  49. - name: Clippy
  50. run: cargo clippy
  51. - name: Rustdoc
  52. run: cargo doc