test.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. on:
  2. push:
  3. branches: [staging, trying]
  4. pull_request:
  5. name: Test
  6. jobs:
  7. tests:
  8. runs-on: ubuntu-20.04
  9. needs: [test, check]
  10. steps:
  11. - name: Done
  12. run: exit 0
  13. test:
  14. runs-on: ubuntu-20.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.56.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. steps:
  46. - uses: actions/checkout@v2
  47. - uses: actions-rs/toolchain@v1
  48. with:
  49. profile: minimal
  50. toolchain: ${{ matrix.rust }}
  51. override: true
  52. - name: Run Tests
  53. run: cargo test --no-default-features --features "${{ matrix.features }}"
  54. check:
  55. runs-on: ubuntu-20.04
  56. continue-on-error: ${{ matrix.rust == 'nightly' }}
  57. strategy:
  58. matrix:
  59. # Test on stable, MSRV, and nightly.
  60. # Failure is permitted on nightly.
  61. rust:
  62. - stable
  63. - 1.56.0
  64. - nightly
  65. features:
  66. # These feature sets cannot run tests, so we only check they build.
  67. - 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
  68. - defmt medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp socket-dns async
  69. steps:
  70. - uses: actions/checkout@v2
  71. - uses: actions-rs/toolchain@v1
  72. with:
  73. profile: minimal
  74. toolchain: ${{ matrix.rust }}
  75. override: true
  76. - name: Check
  77. run: cargo check --no-default-features --features "${{ matrix.features }}"