ci.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. name: CI
  2. on:
  3. push:
  4. branches:
  5. - staging
  6. - trying
  7. jobs:
  8. test:
  9. name: Test
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. rust: [
  14. 1.31.0, # MSRV
  15. 1.35.0, # has_copysign
  16. 1.37.0, # has_reverse_bits
  17. 1.38.0, # has_div_euclid
  18. 1.44.0, # has_to_int_unchecked
  19. 1.46.0, # has_leading_trailing_ones
  20. stable,
  21. beta,
  22. nightly,
  23. ]
  24. steps:
  25. - uses: actions/checkout@v3
  26. - uses: dtolnay/rust-toolchain@master
  27. with:
  28. toolchain: ${{ matrix.rust }}
  29. - run: cargo build
  30. env:
  31. # https://github.com/rust-lang/cargo/issues/10303
  32. CARGO_NET_GIT_FETCH_WITH_CLI: true
  33. - run: ./ci/test_full.sh
  34. # i586 presents floating point challenges for lack of SSE/SSE2
  35. i586:
  36. name: Test (i586)
  37. runs-on: ubuntu-latest
  38. steps:
  39. - run: |
  40. sudo apt-get update
  41. sudo apt-get install gcc-multilib
  42. - uses: actions/checkout@v3
  43. - uses: dtolnay/rust-toolchain@stable
  44. with:
  45. target: i586-unknown-linux-gnu
  46. - run: cargo test --target i586-unknown-linux-gnu --all-features
  47. # try a target that doesn't have std at all
  48. no_std:
  49. name: No Std
  50. runs-on: ubuntu-latest
  51. steps:
  52. - uses: actions/checkout@v3
  53. - uses: dtolnay/rust-toolchain@stable
  54. with:
  55. target: thumbv6m-none-eabi
  56. - run: cargo build --target thumbv6m-none-eabi --no-default-features
  57. - run: cargo build --target thumbv6m-none-eabi --no-default-features --features libm
  58. fmt:
  59. name: Format
  60. runs-on: ubuntu-latest
  61. steps:
  62. - uses: actions/checkout@v3
  63. - uses: dtolnay/[email protected]
  64. with:
  65. components: rustfmt
  66. - run: cargo fmt --all --check