Improve aeronet_transport::FragmentPayload ergonomics (#87)
#72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| pull_request: | |
| paths: | |
| - "crates/**" | |
| - "examples/**" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "crates/**" | |
| - "examples/**" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cargo +nightly fmt --check | |
| shear: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: cargo-bins/cargo-binstall@main | |
| - run: cargo binstall --no-confirm cargo-shear | |
| - run: cargo shear | |
| clippy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: ./.github/actions/install-bevy-deps | |
| - run: cargo clippy --target '${{ matrix.target }}' --workspace --all-features --all-targets -- -Dwarnings | |
| doc: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] | |
| include: | |
| - target: "wasm32-unknown-unknown" | |
| docflags: '--cfg=getrandom_backend="wasm_js"' | |
| env: | |
| RUSTDOCFLAGS: "-Dwarnings --cfg=docsrs_aeronet --cfg=web_sys_unstable_apis ${{ matrix.docflags }}" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: "wasm32-unknown-unknown" | |
| - uses: ./.github/actions/install-bevy-deps | |
| - run: cargo +nightly doc --target '${{ matrix.target }}' --workspace --all-features | |
| check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: ./.github/actions/install-bevy-deps | |
| - run: cargo check --target '${{ matrix.target }}' --workspace --all-features --all-targets | |
| check-fuzz: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: ./.github/actions/install-bevy-deps | |
| - run: cargo install cargo-fuzz | |
| - run: cd crates/aeronet_transport && cargo +nightly fuzz check | |
| check-minimal: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: ["aeronet_io", "aeronet_transport", "aeronet_replicon"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: thumbv6m-none-eabi | |
| - uses: ./.github/actions/install-bevy-deps | |
| - run: cargo check --target thumbv6m-none-eabi --package '${{ matrix.package }}' --no-default-features --features bevy_ecs/critical-section | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # nextest always seems to run out of space when compiling with `--workspace`: | |
| # <https://github.com/aecsocket/aeronet/actions/runs/20119199477/job/57735517314> | |
| # so we'll run tests for individual crates | |
| # hopefully then we won't run out of space | |
| package: | |
| - "aeronet_io" | |
| - "aeronet_transport" | |
| - "aeronet_channel" | |
| # - "aeronet_steam" # has no tests | |
| - "aeronet_websocket" | |
| - "aeronet_webtransport" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: ./.github/actions/install-bevy-deps | |
| - uses: cargo-bins/cargo-binstall@main | |
| - run: cargo binstall --no-confirm cargo-nextest | |
| - run: cargo nextest run --package '${{ matrix.package }}' --all-features | |
| # `cargo nextest` currently doesn't support doctests: <https://nexte.st/#quick-start> | |
| test-doc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: ./.github/actions/install-bevy-deps | |
| - run: cargo test --doc --workspace --all-features |