add mobench support to ProveKit v1 #1396
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: End-to-end CI | |
| on: | |
| push: | |
| branches: [main, v1] | |
| pull_request: | |
| branches: [main, v1] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # When a new job is pushed on a PR, cancel the old one. | |
| concurrency: | |
| group: > | |
| e2e-${{ github.event_name == 'pull_request' | |
| && format('pr-{0}', github.event.pull_request.number) | |
| || format('push-{0}', github.ref) }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| end-to-end: | |
| name: End-to-end tests | |
| runs-on: [self-hosted, Linux, ARM64, provekit-build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain, cache and bins | |
| uses: moonrepo/setup-rust@v1 | |
| with: | |
| channel: nightly-2026-03-04 | |
| cache-base: main | |
| components: rustfmt, clippy | |
| - name: Build all Rust targets | |
| run: cargo build --all-targets --all-features --verbose | |
| - uses: noir-lang/[email protected] | |
| with: | |
| toolchain: v1.0.0-beta.11 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24 | |
| - name: Compile Nargo circuits | |
| working-directory: noir-examples/noir-passport/merkle_age_check | |
| run: | | |
| for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do | |
| echo "Compiling $circuit" | |
| nargo compile --force --print-acir --package "$circuit" | |
| echo "Compiled $circuit" | |
| done | |
| - name: Prepare circuits | |
| working-directory: noir-examples/noir-passport/merkle_age_check | |
| run: | | |
| for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do | |
| echo "Preparing $circuit" | |
| cargo run --release --bin provekit-cli prepare ./target/$circuit.json \ | |
| --pkp ./benchmark-inputs/$circuit-prover.pkp \ | |
| --pkv ./benchmark-inputs/$circuit-verifier.pkv | |
| echo "Prepared $circuit" | |
| done | |
| - name: Generate proofs for all circuits | |
| working-directory: noir-examples/noir-passport/merkle_age_check | |
| run: | | |
| for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do | |
| echo "Proving $circuit" | |
| cargo run --release --bin provekit-cli prove \ | |
| ./benchmark-inputs/$circuit-prover.pkp \ | |
| ./benchmark-inputs/tbs_720/$circuit.toml \ | |
| -o ./benchmark-inputs/$circuit-proof.np | |
| echo "Proved $circuit" | |
| done | |
| - name: Verify proofs for all circuits | |
| working-directory: noir-examples/noir-passport/merkle_age_check | |
| run: | | |
| for circuit in t_add_dsc_720 t_add_id_data_720 t_add_integrity_commit t_attest; do | |
| echo "Verifying $circuit" | |
| cargo run --release --bin provekit-cli verify \ | |
| ./benchmark-inputs/$circuit-verifier.pkv \ | |
| ./benchmark-inputs/$circuit-proof.np | |
| echo "Verified $circuit" | |
| done | |
| - name: Generate Gnark inputs | |
| working-directory: noir-examples/noir-passport/merkle_age_check | |
| run: | | |
| cargo run --release --bin provekit-cli generate-gnark-inputs \ | |
| ./benchmark-inputs/t_attest-prover.pkp \ | |
| ./benchmark-inputs/t_attest-proof.np | |
| - name: Run Gnark verifier | |
| working-directory: recursive-verifier | |
| run: | | |
| go build -o gnark-verifier cmd/cli/main.go | |
| # Set up cleanup trap | |
| cleanup() { | |
| if [ ! -z "$MONITOR_PID" ]; then | |
| kill $MONITOR_PID 2>/dev/null || true | |
| fi | |
| } | |
| trap cleanup EXIT | |
| # Start monitoring in background | |
| ( | |
| while true; do | |
| echo "=== $(date) ===" | |
| echo "Memory:" | |
| free -h | |
| echo "Disk:" | |
| df -h | |
| echo "Processes:" | |
| ps aux --sort=-%mem | head -5 | |
| echo "==================" | |
| sleep 10 # Check every 10 seconds | |
| done | |
| ) & | |
| MONITOR_PID=$! | |
| # Run the main process | |
| ./gnark-verifier --config "../noir-examples/noir-passport/merkle_age_check/params_for_recursive_verifier" --r1cs "../noir-examples/noir-passport/merkle_age_check/r1cs.json" | |
| # Stop monitoring | |
| kill $MONITOR_PID |