fix(libmsg): benchers #606
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| cargo-tests: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| # Installs the toolchain specified in rust-toolchain.toml | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| # Install nextest | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Run tests (all features, excluding linkem) | |
| run: cargo nextest run --all --all-features --no-fail-fast --exclude linkem | |
| - name: Run doc tests (excluding linkem) | |
| run: cargo test --doc --all --all-features | |
| # linkem tests require root privileges to create network namespaces | |
| cargo-tests-linkem: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| # Installs the toolchain specified in rust-toolchain.toml | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| # Install nextest | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@nextest | |
| - name: Run linkem tests (requires root for network namespaces) | |
| run: sudo env "PATH=$PATH" "HOME=$HOME" cargo nextest run -p linkem --all-features --no-fail-fast --test-threads=1 | |
| cargo-lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install Rust nightly toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Check formatting | |
| run: cargo +nightly fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo +nightly clippy --all --all-features --all-targets -- -D warnings | |
| cargo-build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| # Installs the toolchain specified in rust-toolchain.toml | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Build all crates | |
| run: cargo build --all --all-features --examples | |
| - name: Build release | |
| run: cargo build --all --all-features --examples --release | |
| cargo-doc: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install Rust nightly toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Check documentation | |
| run: cargo +nightly doc --all --no-deps --all-features --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "-D warnings --cfg docsrs" | |
| # Find unused dependencies, this will fail if any are found. | |
| cargo-shear: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v6 | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install cargo-shear | |
| run: cargo binstall --no-confirm cargo-shear | |
| - name: Run cargo shear | |
| run: cargo shear |