test.yml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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
  22. - 1.61.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-igmp socket-raw socket-dns
  33. - std medium-ethernet proto-ipv4 socket-udp socket-tcp socket-dns
  34. - std medium-ethernet proto-ipv4 proto-dhcpv4 socket-udp
  35. - std medium-ethernet medium-ip medium-ieee802154 proto-ipv6 socket-udp socket-dns
  36. - std medium-ethernet proto-ipv6 socket-tcp
  37. - std medium-ethernet medium-ip proto-ipv4 socket-icmp socket-tcp
  38. - std medium-ip proto-ipv6 socket-icmp socket-tcp
  39. # Test features chosen to be as aggressive as possible.
  40. - std medium-ethernet medium-ip medium-ieee802154 proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  41. include:
  42. # Test alloc feature which requires nightly.
  43. - rust: nightly
  44. features: alloc medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
  45. env:
  46. RUSTUP_TOOLCHAIN: "${{ matrix.rust }}"
  47. steps:
  48. - uses: actions/checkout@v2
  49. - name: Run Tests
  50. run: cargo test --no-default-features --features "${{ matrix.features }}"
  51. check:
  52. runs-on: ubuntu-22.04
  53. continue-on-error: ${{ matrix.rust == 'nightly' }}
  54. strategy:
  55. matrix:
  56. # Test on stable, MSRV, and nightly.
  57. # Failure is permitted on nightly.
  58. rust:
  59. - stable
  60. - 1.61.0
  61. - nightly
  62. features:
  63. # These feature sets cannot run tests, so we only check they build.
  64. - 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
  65. - defmt medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  66. - 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
  67. env:
  68. # Set DEFMT_LOG to trace so that all net_{error, .., trace} messages
  69. # are actually compiled and verified
  70. DEFMT_LOG: "trace"
  71. RUSTUP_TOOLCHAIN: "${{ matrix.rust }}"
  72. steps:
  73. - uses: actions/checkout@v2
  74. - name: Check
  75. run: cargo check --no-default-features --features "${{ matrix.features }}"