test.yml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. on:
  2. push:
  3. branches: [staging, trying]
  4. pull_request:
  5. name: Test
  6. jobs:
  7. tests:
  8. runs-on: ubuntu-22.04
  9. needs: [test, check]
  10. steps:
  11. - name: Done
  12. run: exit 0
  13. test:
  14. runs-on: ubuntu-22.04
  15. continue-on-error: ${{ matrix.rust == 'nightly' }}
  16. strategy:
  17. matrix:
  18. # Test on stable, MSRV, and nightly.
  19. # Failure is permitted on nightly.
  20. rust:
  21. #- stable # TODO: enable again when "stable" is 1.66 or higher.
  22. - 1.65.0
  23. - nightly
  24. features:
  25. # Test default features.
  26. - default
  27. # Test minimal featureset
  28. - std proto-ipv4
  29. # Test features chosen to be as orthogonal as possible.
  30. - std medium-ethernet phy-raw_socket proto-ipv6 socket-udp socket-dns
  31. - std medium-ethernet phy-tuntap_interface proto-ipv6 socket-udp
  32. - std medium-ethernet proto-ipv4 proto-ipv4-fragmentation socket-raw socket-dns
  33. - std medium-ethernet proto-ipv4 proto-igmp socket-raw socket-dns
  34. - std medium-ethernet proto-ipv4 socket-udp socket-tcp socket-dns
  35. - std medium-ethernet proto-ipv4 proto-dhcpv4 socket-udp
  36. - std medium-ethernet medium-ip medium-ieee802154 proto-ipv6 socket-udp socket-dns
  37. - std medium-ethernet proto-ipv6 socket-tcp
  38. - std medium-ethernet medium-ip proto-ipv4 socket-icmp socket-tcp
  39. - std medium-ip proto-ipv6 socket-icmp socket-tcp
  40. - std medium-ieee802154 proto-sixlowpan socket-udp
  41. - std medium-ieee802154 proto-sixlowpan proto-sixlowpan-fragmentation socket-udp
  42. - std medium-ip proto-ipv4 proto-ipv6 socket-tcp socket-udp
  43. # Test features chosen to be as aggressive as possible.
  44. - std medium-ethernet medium-ip medium-ieee802154 proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  45. include:
  46. # Test alloc feature which requires nightly.
  47. - rust: nightly
  48. features: alloc medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
  49. env:
  50. RUSTUP_TOOLCHAIN: "${{ matrix.rust }}"
  51. steps:
  52. - uses: actions/checkout@v2
  53. - name: Run Tests
  54. run: cargo test --no-default-features --features "${{ matrix.features }}"
  55. check:
  56. runs-on: ubuntu-22.04
  57. continue-on-error: ${{ matrix.rust == 'nightly' }}
  58. strategy:
  59. matrix:
  60. # Test on stable, MSRV, and nightly.
  61. # Failure is permitted on nightly.
  62. rust:
  63. #- stable # TODO: enable again when "stable" is 1.66 or higher.
  64. - 1.65.0
  65. - nightly
  66. features:
  67. # These feature sets cannot run tests, so we only check they build.
  68. - medium-ip medium-ethernet medium-ieee802154 proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  69. - defmt medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  70. - defmt alloc medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  71. env:
  72. # Set DEFMT_LOG to trace so that all net_{error, .., trace} messages
  73. # are actually compiled and verified
  74. DEFMT_LOG: "trace"
  75. RUSTUP_TOOLCHAIN: "${{ matrix.rust }}"
  76. steps:
  77. - uses: actions/checkout@v2
  78. - name: Check
  79. run: cargo check --no-default-features --features "${{ matrix.features }}"