Implemented connection limiting on the incomming connections. #49
Workflow file for this run
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
| name: checks | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - 'release/**' | |
| pull_request: | |
| branches-ignore: | |
| - 'release/**' | |
| schedule: | |
| - cron: '0 4 * * *' | |
| merge_group: | |
| types: [checks_requested] | |
| workflow_call: {} | |
| jobs: | |
| build: | |
| name: Build and test | |
| runs-on: "${{ matrix.os }}" | |
| strategy: | |
| matrix: | |
| include: | |
| - rust: stable | |
| os: ubuntu-latest | |
| target: "x86_64-unknown-linux-gnu" | |
| - rust: beta | |
| os: ubuntu-latest | |
| target: "x86_64-unknown-linux-gnu" | |
| - rust: "msrv" | |
| os: ubuntu-latest | |
| target: "x86_64-unknown-linux-gnu" | |
| - rust: "stable" | |
| os: ubuntu-latest | |
| target: "x86_64-unknown-linux-musl" | |
| - rust: "stable" | |
| os: macos-latest | |
| target: "aarch64-apple-darwin" | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| persist-credentials: false | |
| - name: Set target rust version | |
| run: echo "TARGET_RUST_VERSION=$(if [ "${{matrix.rust}}" = "msrv" ]; then grep rust-version Cargo.toml | grep MSRV | cut -d'"' -f2; else echo "${{matrix.rust}}"; fi)" >> $GITHUB_ENV | |
| - name: Install nightly toolchain for direct-minimal-versions | |
| uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: nightly | |
| targets: "${{ matrix.target }}" | |
| if: ${{ matrix.rust == 'msrv' }} | |
| - name: Install toolchain | |
| uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: "${TARGET_RUST_VERSION}" | |
| targets: "${{ matrix.target }}" | |
| - name: Downgrade direct dependencies to minimal versions | |
| run: cargo +nightly update -Z direct-minimal-versions | |
| if: ${{ matrix.rust == 'msrv' }} | |
| - name: Install cross-compilation tools | |
| uses: taiki-e/setup-cross-toolchain-action@0123528f956f923e7a476f4cc04882bc005e7c89 | |
| with: | |
| target: ${{ matrix.target }} | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@92f69c195229fe62d58b4d697ab4bc75def98e76 | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 | |
| with: | |
| shared-key: "${{matrix.rust}}-${{matrix.target}}" | |
| - name: cargo build | |
| run: cargo build | |
| - name: cargo test | |
| run: cargo llvm-cov --target ${{matrix.target}} --lcov --output-path lcov.info | |
| env: | |
| RUST_BACKTRACE: 1 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 | |
| with: | |
| files: lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| unused: | |
| name: Check unused dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| persist-credentials: false | |
| - name: Install nightly toolchain | |
| uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: nightly | |
| - name: Install udeps | |
| uses: taiki-e/install-action@92f69c195229fe62d58b4d697ab4bc75def98e76 | |
| with: | |
| tool: cargo-udeps | |
| - name: cargo udeps | |
| run: cargo udeps --workspace --all-targets | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| persist-credentials: false | |
| - name: Install rust toolchain | |
| uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| clippy: | |
| name: Clippy | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| runs_on: ubuntu-latest | |
| - target: armv7-unknown-linux-gnueabihf | |
| runs_on: ubuntu-latest | |
| - target: x86_64-unknown-linux-musl | |
| runs_on: ubuntu-latest | |
| - target: aarch64-apple-darwin | |
| runs_on: macos-latest | |
| runs-on: ${{matrix.runs_on}} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| persist-credentials: false | |
| - name: Install rust toolchain | |
| uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| targets: ${{matrix.target}} | |
| - name: Setup tools for cross compilation | |
| uses: awalsh128/cache-apt-pkgs-action@7ca5f46d061ad9aa95863cd9b214dd48edef361d # v1.5.0 | |
| with: | |
| packages: musl-tools qemu-user-static crossbuild-essential-armhf crossbuild-essential-arm64 crossbuild-essential-i386 | |
| version: 1 | |
| if: ${{matrix.runs_on == 'ubuntu-latest'}} | |
| - name: Install bindgen-cli | |
| uses: taiki-e/install-action@92f69c195229fe62d58b4d697ab4bc75def98e76 | |
| with: | |
| tool: bindgen-cli | |
| if: ${{matrix.runs_on == 'ubuntu-latest'}} | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 | |
| with: | |
| shared-key: "stable-${{matrix.target}}" | |
| - name: Run clippy | |
| run: cargo clippy --target ${{matrix.target}} --all-targets | |
| audit-dependencies: | |
| name: Audit dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 | |
| with: | |
| arguments: --workspace --all-features |