prio 0.17.0

Implementation of the Prio aggregation system core: https://crypto.stanford.edu/prio/
Documentation
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:
    name: build-binaries (${{ matrix.rust-toolchain.label }})
    strategy:
      matrix:
        rust-toolchain: [
          {
            # MSRV from Cargo.toml
            version: "1.80",
            label: "MSRV",
          },
          {
            version: "stable",
            label: "stable"
          },
        ]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Install Rust toolchain
      uses: dtolnay/rust-toolchain@master
      with:
        toolchain: ${{ matrix.rust-toolchain.version }}
        components: clippy
    - name: Build
      run: cargo build --verbose --package prio-binaries
    - name: Clippy
      run: cargo clippy --package prio-binaries

  build-crate:
    name: build-crate (${{ matrix.rust-toolchain.label }})
    strategy:
      matrix:
        rust-toolchain: [
          {
            # MSRV from Cargo.toml
            version: "1.80",
            label: "MSRV",
          },
          {
            version: "stable",
            label: "stable"
          },
        ]
    runs-on: ubuntu-latest
    env:
      CARGO_ALL_FEATURES_VERSION: 1.9.0
    steps:
    - uses: actions/checkout@v4
    - name: Install Rust toolchain
      uses: dtolnay/rust-toolchain@master
      with:
        toolchain: ${{ matrix.rust-toolchain.version }}
        components: clippy, rustfmt
    - name: Cache cargo-all-features
      uses: actions/cache@v4
      with:
        key: cargo-all-features-bins-${{ env.CARGO_ALL_FEATURES_VERSION }}-rust-${{ matrix.rust-toolchain.version }}
        path: |
          ${{ runner.tool_cache }}/cargo-build-all-features
          ${{ runner.tool_cache }}/cargo-check-all-features
          ${{ runner.tool_cache }}/cargo-test-all-features
    - name: Add the tool cache directory to the search path
      run: echo "${{ runner.tool_cache }}/cargo-all-features/bin/" >> $GITHUB_PATH
    - name: Ensure that the tool cache is populated with the cargo-all-features binaries
      run: cargo install --root ${{ runner.tool_cache }}/cargo-all-features --version ${{ env.CARGO_ALL_FEATURES_VERSION }} cargo-all-features

    - name: Lint
      run: |
        cargo fmt --message-format human -- --check
        bash -c '! git grep "[I][P][D][F]"'
    - name: Check
      run: cargo check-all-features --workspace --all-targets
    - name: Clippy
      run: cargo clippy --workspace --all-targets
    - name: Clippy (all features)
      run: cargo clippy --workspace --all-targets --all-features
    - name: Build crate
      run: cargo build-all-features --verbose --package prio
    - name: Run tests
      run: cargo test-all-features --verbose
    - name: Build benchmarks
      run: cargo bench --no-run --profile=dev
    - name: Build benchmarks (all features)
      run: cargo bench --no-run --profile=dev --all-features