2020-12-22 20:11:10 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ staging, trying, master ]
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
name: Test
|
|
|
|
|
|
|
|
jobs:
|
2021-10-06 03:50:50 +08:00
|
|
|
tests:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
needs: [test, check]
|
|
|
|
steps:
|
|
|
|
- name: Done
|
|
|
|
run: exit 0
|
2020-12-22 20:11:10 +08:00
|
|
|
test:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-18 21:17:13 +08:00
|
|
|
# Test on stable, MSRV 1.46, and nightly.
|
2020-12-22 20:11:10 +08:00
|
|
|
# Failure is permitted on nightly.
|
|
|
|
rust:
|
|
|
|
- stable
|
2021-09-10 20:39:46 +08:00
|
|
|
- 1.53.0
|
2020-12-22 20:11:10 +08:00
|
|
|
- nightly
|
|
|
|
|
|
|
|
features:
|
|
|
|
# Test default features.
|
|
|
|
- default
|
|
|
|
|
2021-02-01 23:45:32 +08:00
|
|
|
# Test minimal featureset
|
|
|
|
- std proto-ipv4
|
|
|
|
|
2020-12-22 20:11:10 +08:00
|
|
|
# Test features chosen to be as orthogonal as possible.
|
2020-12-28 06:52:37 +08:00
|
|
|
- std medium-ethernet phy-raw_socket proto-ipv6 socket-udp
|
2021-03-25 01:04:42 +08:00
|
|
|
- std medium-ethernet phy-tuntap_interface proto-ipv6 socket-udp
|
2020-12-28 06:52:37 +08:00
|
|
|
- std medium-ethernet proto-ipv4 proto-igmp socket-raw
|
|
|
|
- std medium-ethernet proto-ipv4 socket-udp socket-tcp
|
|
|
|
- std medium-ethernet proto-ipv4 proto-dhcpv4 socket-udp
|
|
|
|
- std medium-ethernet proto-ipv6 socket-udp
|
|
|
|
- std medium-ethernet proto-ipv6 socket-tcp
|
|
|
|
- std medium-ethernet proto-ipv4 socket-icmp socket-tcp
|
|
|
|
- std medium-ethernet proto-ipv6 socket-icmp socket-tcp
|
2020-12-22 20:11:10 +08:00
|
|
|
|
|
|
|
# Test features chosen to be as aggressive as possible.
|
2020-12-28 06:52:37 +08:00
|
|
|
- std medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp async
|
2020-12-22 20:11:10 +08:00
|
|
|
|
|
|
|
include:
|
|
|
|
# Test alloc feature which requires nightly.
|
|
|
|
- rust: nightly
|
2021-10-12 02:19:23 +08:00
|
|
|
features: alloc rand-custom-impl medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
|
2020-12-22 20:11:10 +08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
- name: Run Tests
|
|
|
|
run: cargo test --no-default-features --features "${{ matrix.features }}"
|
|
|
|
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-18 21:17:13 +08:00
|
|
|
# Test on stable, MSRV 1.46, and nightly.
|
2020-12-22 20:11:10 +08:00
|
|
|
# Failure is permitted on nightly.
|
|
|
|
rust:
|
|
|
|
- stable
|
2021-09-10 20:39:46 +08:00
|
|
|
- 1.53.0
|
2020-12-22 20:11:10 +08:00
|
|
|
- nightly
|
|
|
|
|
|
|
|
features:
|
|
|
|
# These feature sets cannot run tests, so we only check they build.
|
2021-10-12 02:19:23 +08:00
|
|
|
- rand-custom-impl medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
|
|
|
|
- rand-custom-impl defmt defmt-trace medium-ip medium-ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp async
|
2020-12-22 20:11:10 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
- name: Check
|
|
|
|
run: cargo check --no-default-features --features "${{ matrix.features }}"
|