test.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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.40, and nightly.
  13. # Failure is permitted on nightly.
  14. rust:
  15. - stable
  16. - 1.40.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. - rust: nightly
  40. features: alloc proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
  41. steps:
  42. - uses: actions/checkout@v2
  43. - uses: actions-rs/toolchain@v1
  44. with:
  45. profile: minimal
  46. toolchain: ${{ matrix.rust }}
  47. override: true
  48. - name: Run Tests
  49. run: cargo test --no-default-features --features "${{ matrix.features }}"
  50. check:
  51. runs-on: ubuntu-20.04
  52. continue-on-error: ${{ matrix.rust == 'nightly' }}
  53. strategy:
  54. matrix:
  55. # Test on stable, MSRV 1.40, and nightly.
  56. # Failure is permitted on nightly.
  57. rust:
  58. - stable
  59. - 1.40.0
  60. - nightly
  61. features:
  62. # These feature sets cannot run tests, so we only check they build.
  63. - medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
  64. - defmt medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
  65. steps:
  66. - uses: actions/checkout@v2
  67. - uses: actions-rs/toolchain@v1
  68. with:
  69. profile: minimal
  70. toolchain: ${{ matrix.rust }}
  71. override: true
  72. - name: Check
  73. run: cargo check --no-default-features --features "${{ matrix.features }}"