Add prover-interface #6341
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| pre-commit: | |
| name: pre-commit-${{ matrix.expand.name }} | |
| runs-on: ${{ matrix.expand.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| expand: | |
| - runner: "ubuntu-arm64-2core-8gb" | |
| name: "arm64" | |
| - runner: "ubuntu-24.04" | |
| name: "x86_64" | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt | |
| - name: Install nightly toolchain for rustfmt | |
| run: rustup toolchain install nightly-2025-08-11 --component rustfmt | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Run pre-commit | |
| uses: pre-commit/action@v3.0.1 | |
| env: | |
| SKIP: "clippy" | |
| rust-checks: | |
| name: rust-checks-${{ matrix.expand.name }} | |
| runs-on: ${{ matrix.expand.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| expand: | |
| - runner: "ubuntu-arm64-2core-8gb" | |
| name: "arm64" | |
| - runner: "ubuntu-24.04" | |
| name: "x86_64" | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| - name: Run clippy (all-features) | |
| run: cargo clippy --all --all-features --tests --benches --examples -- -D warnings | |
| env: | |
| RUSTFLAGS: "-C target-cpu=native" | |
| rust-tests: | |
| name: rust-${{ matrix.test.name }}-${{ matrix.machine.name }} | |
| runs-on: ${{ matrix.machine.runner }} | |
| # Skip draft PRs to save costs, except for Graphite merge queue PRs (branch prefix: gtmq_) | |
| # Graphite MQ docs: https://graphite.dev/docs/graphite-merge-queue | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || startsWith(github.head_ref, 'gtmq_') | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| machine: | |
| - runner: "m8g-2xlarge" | |
| name: "arm64" | |
| - runner: "m7i-2xlarge" | |
| name: "x86_64" | |
| test: | |
| - name: "test" | |
| command: "cargo nextest run --workspace --release --no-fail-fast" | |
| rustflags: "-C debug-assertions" | |
| - name: "test-all-features" | |
| command: | | |
| ALL_FEATURES_WO_BAIL_PANIC=$(.github/scripts/get-features-without-bail-panic.sh | tail -1) | |
| echo "ALL_FEATURES_WO_BAIL_PANIC: $ALL_FEATURES_WO_BAIL_PANIC" | |
| cargo nextest run --workspace --release --features "$ALL_FEATURES_WO_BAIL_PANIC" --no-fail-fast | |
| rustflags: "-C debug-assertions" | |
| - name: "wasm-build" | |
| command: | | |
| cargo build -p binius-math -p binius-field -p binius-prover -p binius-verifier --target wasm32-wasip1 --tests --benches | |
| rust-target: "wasm32-wasip1" | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install deps | |
| run: sudo yum -y install gcc openssl-devel curl jq z3-devel clang pkg-config | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.test.rust-target || '' }} | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.machine.name }}-${{ matrix.test.name }} | |
| cache-on-failure: true | |
| - name: Run platform diagnostics | |
| run: cargo test -p binius-utils --features platform-diagnostics test_platform_diagnostics -- --nocapture | |
| - name: Run platform diagnostics (target-cpu=native) | |
| run: cargo test -p binius-utils --features platform-diagnostics test_platform_diagnostics -- --nocapture | |
| env: | |
| RUSTFLAGS: "-C target-cpu=native" | |
| - name: Run command | |
| run: ${{ matrix.test.command }} | |
| env: | |
| RUSTFLAGS: ${{ matrix.test.rustflags || '' }} | |
| # Seems like z3-devel pkg-config config is broken and has wrong path to include files. | |
| # This was fixed upstream but the fix seems to be not available in the present CI | |
| # environment. Therefore, we workaround this by overriding the env flags manually. | |
| Z3_SYS_Z3_HEADER: /usr/include/z3/z3.h | |
| CFLAGS: -I/usr/include/z3 | |
| LDFLAGS: -L/usr/lib64 -lz3 | |
| rust-doc: | |
| name: rust-doc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Build documentation (including private items for CI checks) | |
| run: cargo doc --document-private-items --no-deps | |
| circuits-snapshot: | |
| name: circuits-snapshot (${{ matrix.example }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| example: [ethsign, zklogin, sha256, sha512, keccak, hash_based_sig] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Check ${{ matrix.example }} circuit statistics snapshot | |
| run: cargo run --example ${{ matrix.example }} --release -- check-snapshot |