test.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. on:
  2. push:
  3. branches: [ staging, trying, master, v0.* ]
  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 ethernet phy-raw_socket proto-ipv6 socket-udp
  25. - std ethernet phy-tap_interface proto-ipv6 socket-udp
  26. - std ethernet proto-ipv4 proto-igmp socket-raw
  27. - std ethernet proto-ipv4 socket-udp socket-tcp
  28. - std ethernet proto-ipv4 proto-dhcpv4 socket-udp
  29. - std ethernet proto-ipv6 socket-udp
  30. - std ethernet proto-ipv6 socket-tcp
  31. - std ethernet proto-ipv4 socket-icmp socket-tcp
  32. - std ethernet proto-ipv6 socket-icmp socket-tcp
  33. # Test features chosen to be as aggressive as possible.
  34. - std 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 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. - ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
  64. steps:
  65. - uses: actions/checkout@v2
  66. - uses: actions-rs/toolchain@v1
  67. with:
  68. profile: minimal
  69. toolchain: ${{ matrix.rust }}
  70. override: true
  71. - name: Check
  72. run: cargo check --no-default-features --features "${{ matrix.features }}"