Fix unused field warnings, 0.12 backport #3120
Workflow file for this run
This file contains 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-build | |
on: | |
push: | |
branches: [ main, release/** ] | |
pull_request: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Docs | |
run: cargo doc --all-features | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
build-binaries: | |
strategy: | |
matrix: | |
rust-toolchain: [ | |
# MSRV from Cargo.toml | |
"1.71", | |
"stable", | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: clippy | |
- name: Build | |
run: cargo build --verbose --package prio-binaries | |
- name: Clippy | |
run: cargo clippy --package prio-binaries | |
build-crate: | |
strategy: | |
matrix: | |
features: [ | |
"--no-default-features", | |
"--all-features", | |
"--features=default", | |
"--features=test-util", | |
"--features=multithreaded", | |
"--features=test-util,multithreaded", | |
"--features=prio2", | |
"--features=prio2,test-util", | |
"--features=prio2,multithreaded", | |
"--features=prio2,test-util,multithreaded", | |
"--features=experimental", | |
"--features=experimental,multithreaded", | |
] | |
rust-toolchain: [ | |
# MSRV from Cargo.toml | |
"1.71", | |
"stable", | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust-toolchain }} | |
components: clippy, rustfmt | |
- name: Lint | |
run: | | |
cargo fmt --message-format human -- --check | |
bash -c '! git grep "[I][P][D][F]"' | |
- name: Clippy | |
run: cargo clippy --workspace --all-targets ${{ matrix.features }} | |
- name: Build crate | |
run: cargo build --verbose --package prio ${{ matrix.features }} | |
- name: Run tests | |
run: cargo test --verbose ${{ matrix.features }} | |
- name: Build benchmarks | |
run: cargo bench --no-run ${{ matrix.features }} --profile=dev |