mirror of
https://github.com/floor-licker/polyfill-rs.git
synced 2026-07-28 04:57:46 +00:00
88 lines
2.2 KiB
YAML
88 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy --lib --bins --tests --benches --all-features -- -D warnings && cargo clippy --example benchmark_with_keepalive --example demo --example final_benchmark --example http2_tuning_benchmark --example performance_benchmark --example quick_demo --example snipe -- -D warnings
|
|
|
|
- name: Run tests (excluding no-alloc hot paths)
|
|
run: cargo test --all-features -- --skip no_alloc_
|
|
|
|
- name: Build examples
|
|
run: |
|
|
cargo build --example benchmark_with_keepalive
|
|
cargo build --example demo
|
|
cargo build --example final_benchmark
|
|
cargo build --example http2_tuning_benchmark
|
|
cargo build --example performance_benchmark
|
|
cargo build --example quick_demo
|
|
cargo build --example snipe
|
|
|
|
- name: Build documentation
|
|
run: cargo doc --no-deps --all-features
|
|
|
|
security:
|
|
name: Security audit
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install cargo-audit
|
|
run: cargo install cargo-audit
|
|
|
|
- name: Run security audit
|
|
run: cargo audit
|
|
|
|
no_alloc:
|
|
name: No-alloc hot paths
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Run no-alloc hot path tests
|
|
run: cargo test --all-features --test no_alloc_hot_paths
|