test.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. on:
  2. push:
  3. branches: [ staging, trying, master ]
  4. pull_request:
  5. name: Test
  6. jobs:
  7. test:
  8. runs-on: ubuntu-20.04
  9. continue-on-error: ${{ matrix.rust == 'nightly' }}
  10. strategy:
  11. matrix:
  12. # Test on stable, MSRV 1.46, and nightly.
  13. # Failure is permitted on nightly.
  14. rust:
  15. - stable
  16. - 1.53.0
  17. - nightly
  18. features:
  19. # Test default features.
  20. - default
  21. # Test minimal featureset
  22. - std proto-ipv4
  23. # Test features chosen to be as orthogonal as possible.
  24. - std medium-ethernet phy-raw_socket proto-ipv6 socket-udp
  25. - std medium-ethernet phy-tuntap_interface proto-ipv6 socket-udp
  26. - std medium-ethernet proto-ipv4 proto-igmp socket-raw
  27. - std medium-ethernet proto-ipv4 socket-udp socket-tcp
  28. - std medium-ethernet proto-ipv4 proto-dhcpv4 socket-udp
  29. - std medium-ethernet proto-ipv6 socket-udp
  30. - std medium-ethernet proto-ipv6 socket-tcp
  31. - std medium-ethernet proto-ipv4 socket-icmp socket-tcp
  32. - std medium-ethernet proto-ipv6 socket-icmp socket-tcp
  33. # Test features chosen to be as aggressive as possible.
  34. - std medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp async
  35. include:
  36. # Test alloc feature which requires nightly.
  37. - rust: nightly
  38. features: alloc medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
  39. steps:
  40. - uses: actions/checkout@v2
  41. - uses: actions-rs/toolchain@v1
  42. with:
  43. profile: minimal
  44. toolchain: ${{ matrix.rust }}
  45. override: true
  46. - name: Run Tests
  47. run: cargo test --no-default-features --features "${{ matrix.features }}"
  48. check:
  49. runs-on: ubuntu-20.04
  50. continue-on-error: ${{ matrix.rust == 'nightly' }}
  51. strategy:
  52. matrix:
  53. # Test on stable, MSRV 1.46, and nightly.
  54. # Failure is permitted on nightly.
  55. rust:
  56. - stable
  57. - 1.53.0
  58. - nightly
  59. features:
  60. # These feature sets cannot run tests, so we only check they build.
  61. - medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
  62. - defmt defmt-trace medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
  63. steps:
  64. - uses: actions/checkout@v2
  65. - uses: actions-rs/toolchain@v1
  66. with:
  67. profile: minimal
  68. toolchain: ${{ matrix.rust }}
  69. override: true
  70. - name: Check
  71. run: cargo check --no-default-features --features "${{ matrix.features }}"