forked from smoltcp-rs/smoltcp
-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (77 loc) · 2.91 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
on:
push:
branches: [ staging, trying, master ]
pull_request:
name: Test
jobs:
tests:
runs-on: ubuntu-20.04
needs: [test, check]
steps:
- name: Done
run: exit 0
test:
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
# Test on stable, MSRV 1.46, and nightly.
# Failure is permitted on nightly.
rust:
- stable
- 1.53.0
- nightly
features:
# Test default features.
- default
# Test minimal featureset
- std proto-ipv4
# Test features chosen to be as orthogonal as possible.
- std medium-ethernet phy-raw_socket proto-ipv6 socket-udp
- std medium-ethernet phy-tuntap_interface proto-ipv6 socket-udp
- 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
# Test features chosen to be as aggressive as possible.
- std medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp async
include:
# Test alloc feature which requires nightly.
- rust: nightly
features: alloc rand-custom-impl medium-ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
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:
# Test on stable, MSRV 1.46, and nightly.
# Failure is permitted on nightly.
rust:
- stable
- 1.53.0
- nightly
features:
# These feature sets cannot run tests, so we only check they build.
- rand-custom-impl medium-ip medium-ethernet medium-ieee802154 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
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 }}"