commit
675374d3ed
|
@ -0,0 +1,25 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ staging, trying, master ]
|
||||
pull_request_target:
|
||||
|
||||
name: Clippy check
|
||||
jobs:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
if: github.event_name == 'pull_request_target'
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.number }}/head
|
||||
- uses: actions/checkout@v2
|
||||
if: github.event_name != 'pull_request_target'
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: clippy
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,21 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ staging, trying, master ]
|
||||
pull_request:
|
||||
|
||||
name: Fuzz
|
||||
|
||||
jobs:
|
||||
fuzz:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
override: true
|
||||
- name: Install cargo-fuzz
|
||||
run: cargo install cargo-fuzz
|
||||
- name: Fuzz
|
||||
run: cargo fuzz run packet_parser -- -max_len=1536 -max_total_time=30
|
|
@ -0,0 +1,79 @@
|
|||
on:
|
||||
push:
|
||||
branches: [ staging, trying, master ]
|
||||
pull_request:
|
||||
|
||||
name: Test
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
strategy:
|
||||
matrix:
|
||||
# Test on stable, MSRV 1.36, and nightly.
|
||||
# Failure is permitted on nightly.
|
||||
rust:
|
||||
- stable
|
||||
- 1.36.0
|
||||
- nightly
|
||||
|
||||
features:
|
||||
# Test default features.
|
||||
- default
|
||||
|
||||
# Test features chosen to be as orthogonal as possible.
|
||||
- std ethernet phy-raw_socket proto-ipv6 socket-udp
|
||||
- std ethernet phy-tap_interface proto-ipv6 socket-udp
|
||||
- std ethernet proto-ipv4 proto-igmp socket-raw
|
||||
- std ethernet proto-ipv4 socket-udp socket-tcp
|
||||
- std ethernet proto-ipv4 proto-dhcpv4 socket-udp
|
||||
- std ethernet proto-ipv6 socket-udp
|
||||
- std ethernet proto-ipv6 socket-tcp
|
||||
- std ethernet proto-ipv4 socket-icmp socket-tcp
|
||||
- std ethernet proto-ipv6 socket-icmp socket-tcp
|
||||
|
||||
# Test features chosen to be as aggressive as possible.
|
||||
- std ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
|
||||
|
||||
include:
|
||||
# Test alloc feature which requires nightly.
|
||||
- rust: nightly
|
||||
features: alloc ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp
|
||||
- rust: nightly
|
||||
features: alloc 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.36, and nightly.
|
||||
# Failure is permitted on nightly.
|
||||
rust:
|
||||
- stable
|
||||
- 1.36.0
|
||||
- nightly
|
||||
|
||||
features:
|
||||
# These feature sets cannot run tests, so we only check they build.
|
||||
- ethernet proto-ipv6 proto-ipv6 proto-igmp proto-dhcpv4 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: Check
|
||||
run: cargo check --no-default-features --features "${{ matrix.features }}"
|
69
.travis.yml
69
.travis.yml
|
@ -1,69 +0,0 @@
|
|||
language: rust
|
||||
matrix:
|
||||
include:
|
||||
### Litmus check that we work on stable/beta
|
||||
# (we don't, not until slice_rotate lands)
|
||||
# - rust: stable
|
||||
# env: FEATURES='default' MODE='test'
|
||||
# - rust: beta
|
||||
# env: FEATURES='default' MODE='test'
|
||||
### Test default configurations
|
||||
- rust: nightly
|
||||
env: FEATURES='default' MODE='test'
|
||||
### Test select feature permutations, chosen to be as orthogonal as possible
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet phy-raw_socket proto-ipv6 socket-udp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet phy-tap_interface proto-ipv6 socket-udp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv4 proto-igmp socket-raw' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv4 socket-udp socket-tcp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv4 proto-dhcpv4 socket-udp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv6 socket-udp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv6 socket-tcp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv4 socket-icmp socket-tcp' MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='std ethernet proto-ipv6 socket-icmp socket-tcp' MODE='test'
|
||||
### Test select feature permutations, chosen to be as aggressive as possible
|
||||
- rust: nightly
|
||||
env: FEATURES='ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp std'
|
||||
MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='ethernet proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp alloc'
|
||||
MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='proto-ipv4 proto-ipv6 socket-raw socket-udp socket-tcp socket-icmp alloc'
|
||||
MODE='test'
|
||||
- rust: nightly
|
||||
env: FEATURES='ethernet proto-ipv4 proto-ipv6 proto-igmp proto-dhcpv4 socket-raw socket-udp socket-tcp socket-icmp'
|
||||
MODE='build'
|
||||
- rust: nightly
|
||||
env: MODE='fuzz run' ARGS='packet_parser -- -max_len=1536 -max_total_time=30'
|
||||
- rust: nightly
|
||||
env: FEATURES='default' MODE='clippy'
|
||||
- rust: nightly
|
||||
env: FEATURES='default' MODE='check --bench bench'
|
||||
- os: osx
|
||||
rust: nightly
|
||||
env: FEATURES='default' MODE='build'
|
||||
allow_failures:
|
||||
# something's screwy with Travis (as usual) and cargo-fuzz dies with a LeakSanitizer error
|
||||
# even when it's successful. Keep this in .travis.yml in case it starts working some day.
|
||||
- rust: nightly
|
||||
env: MODE='fuzz run' ARGS='packet_parser -- -max_len=1536 -max_total_time=30'
|
||||
# Clippy sometimes fails to compile and this shouldn't gate merges
|
||||
- rust: nightly
|
||||
env: FEATURES='default' MODE='clippy'
|
||||
# See if the bench actually breaks
|
||||
- rust: nightly
|
||||
env: FEATURES='default' MODE='check --bench bench'
|
||||
before_script:
|
||||
- if [ "$MODE" == "fuzz run" ]; then cargo install cargo-fuzz; fi
|
||||
- if [ "$MODE" == "clippy" ]; then cargo install clippy; fi
|
||||
script:
|
||||
- cargo $MODE --no-default-features --features "$FEATURES" $ARGS
|
|
@ -6,7 +6,7 @@ include complicated compile-time computations, such as macro or type tricks, eve
|
|||
at cost of performance degradation.
|
||||
|
||||
_smoltcp_ does not need heap allocation *at all*, is [extensively documented][docs],
|
||||
and compiles on stable Rust 1.28 and later.
|
||||
and compiles on stable Rust 1.36 and later.
|
||||
|
||||
_smoltcp_ achieves [~Gbps of throughput](#examplesbenchmarkrs) when tested against
|
||||
the Linux TCP stack in loopback mode.
|
||||
|
|
Loading…
Reference in New Issue