chore(do not merge): aggregate API #1421
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: Rust | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: rust-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| build-test-matrix: | |
| name: Build & Test (${{ matrix.name }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: x64-avx2 | |
| os: ubuntu-latest | |
| rustflags: -C target-cpu=haswell | |
| run_tests: true | |
| # TODO make arm64-neon work | |
| # - name: arm64-neon | |
| # os: ubuntu-24.04-arm64 | |
| # rustflags: -C target-feature=+neon | |
| # run_tests: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install nightly toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| - name: Cache cargo build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Cache benchmark signers | |
| uses: actions/cache@v4 | |
| with: | |
| path: .signers-cache | |
| key: benchmark-signers-${{ hashFiles('crates/xmss/**', 'crates/utils/**', 'crates/backend/**') }} | |
| restore-keys: benchmark-signers- | |
| - name: Build | |
| run: cargo build --release --all --verbose | |
| env: | |
| RUSTFLAGS: ${{ matrix.rustflags }} | |
| - name: Test | |
| if: ${{ matrix.run_tests == true }} | |
| run: cargo test --release --all --verbose | |
| env: | |
| RUSTFLAGS: ${{ matrix.rustflags }} | |
| SIGNERS_CACHE_DIR: ${{ github.workspace }}/.signers-cache | |
| # `lean_multisig_api`'s two `#[ignore]`d tests prove real 1500- and 1501-signature batches, | |
| # which is the only check that `plan::LEAF_TARGET` is a leaf size the prover accepts. Without | |
| # them a bad constant means every aggregation past 1500 signers fails in production while the | |
| # default suite stays green — its largest single node holds three signatures. | |
| # | |
| # Scoped to one test binary rather than `--include-ignored` across the workspace, which would | |
| # also drag in six unrelated ignored tests, several of them benchmarks. | |
| # | |
| # ~12s here: the step above already generates or loads the 10,000-signer cache (non-ignored | |
| # tests in `tests/test_multisignatures.rs` call `get_benchmark_signatures`), so the marginal | |
| # cost is the proving alone. | |
| - name: Ignored slow tests | |
| if: ${{ matrix.run_tests == true }} | |
| run: cargo test --release -p lean_multisig_api --test round_trip --verbose -- --ignored | |
| env: | |
| RUSTFLAGS: ${{ matrix.rustflags }} | |
| SIGNERS_CACHE_DIR: ${{ github.workspace }}/.signers-cache | |
| cargo-clippy: | |
| runs-on: ubuntu-latest | |
| name: Clippy | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install nightly toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| components: clippy | |
| - name: Cache cargo build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Clippy Check | |
| run: cargo clippy --workspace --all-targets -- -Dwarnings | |
| # The workspace build always enables xmss's 'test-utils' feature (rec_aggregation turns | |
| # it on); this checks the default-features configuration downstream users get. | |
| - name: Clippy Check (xmss standalone, default features) | |
| run: cargo clippy -p xmss --all-targets -- -Dwarnings | |
| cargo-fmt: | |
| runs-on: ubuntu-latest | |
| name: Rustfmt Check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install nightly toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - name: Cache cargo build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check |