Ohadn/remove program segment from proof #13105
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: Cairo workflow | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| merge_group: | |
| types: | |
| - checks_requested | |
| env: | |
| NIGHTLY_VERSION: "nightly-2025-06-23" | |
| STABLE_VERSION: "1.89.0" | |
| jobs: | |
| scarb-fmt: | |
| runs-on: stwo-cairo-avx-l | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_verifier | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: software-mansion/setup-scarb@v1 | |
| with: | |
| scarb-version: "2.15.0" | |
| - run: scarb fmt --check | |
| scarb-lint: | |
| runs-on: stwo-cairo-avx-l | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_verifier | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: software-mansion/setup-scarb@v1 | |
| with: | |
| scarb-version: "2.15.0" | |
| - run: scarb lint --features=qm31_opcode --deny-warnings | |
| scarb-test: | |
| runs-on: stwo-cairo-avx-l | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_verifier | |
| strategy: | |
| matrix: | |
| feature: [poseidon252_verifier, "poseidon252_verifier,poseidon_outputs_packing", qm31_opcode, "qm31_opcode,blake_outputs_packing", "qm31_opcode,poseidon_outputs_packing"] | |
| package: | |
| - stwo_verifier_core | |
| - stwo_cairo_air | |
| - stwo_cairo_verifier | |
| - stwo_verifier_utils | |
| include: | |
| - feature: poseidon252_verifier | |
| proof_file: ../stwo_cairo_prover/test_data/test_prove_verify_ret_opcode/proof.json | |
| - feature: "poseidon252_verifier,poseidon_outputs_packing" | |
| proof_file: ../stwo_cairo_prover/test_data/test_prove_verify_ret_opcode/proof.json | |
| - feature: qm31_opcode | |
| proof_file: ../stwo_cairo_prover/test_data/test_prove_verify_all_opcode_components/proof.json | |
| - feature: "qm31_opcode,blake_outputs_packing" | |
| proof_file: ../stwo_cairo_prover/test_data/test_prove_verify_all_opcode_components/proof.json | |
| - feature: "qm31_opcode,poseidon_outputs_packing" | |
| proof_file: ../stwo_cairo_prover/test_data/test_prove_verify_all_opcode_components/proof.json | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: software-mansion/setup-scarb@v1 | |
| with: | |
| scarb-version: "2.15.0" | |
| - run: scarb test --features=${{ matrix.feature }} --package ${{ matrix.package }} | |
| - if: matrix.package == 'stwo_cairo_verifier' | |
| run: scarb --profile proving execute --package stwo_cairo_verifier --features ${{ matrix.feature }} --print-resource-usage --output none --arguments-file ${{ matrix.proof_file }} | |
| run-tests: | |
| runs-on: stwo-cairo-avx-l | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_prover | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install build dependencies | |
| run: sudo apt-get update && sudo apt-get install -y build-essential | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - uses: software-mansion/setup-scarb@v1 | |
| with: | |
| scarb-version: "2.15.0" | |
| - name: Install latest nextest release | |
| uses: taiki-e/install-action@nextest | |
| - name: Fetch cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: stwo_cairo_prover | |
| - run: cargo nextest run --cargo-profile witness-opt-1 --features=slow-tests -j 1 -P ci | |
| env: | |
| RUST_MIN_STACK: 4194304 | |
| RUSTFLAGS: -C target-cpu=native | |
| RUST_LOG_SPAN_EVENTS: enter,close | |
| RUST_LOG: info | |
| - run: cargo nextest run --cargo-profile witness-opt-1 --features=extract-mem-trace test_serialize_deserialize_mem_trace -j 1 -P ci | |
| env: | |
| RUST_MIN_STACK: 4194304 | |
| RUSTFLAGS: -C target-cpu=native | |
| RUST_LOG_SPAN_EVENTS: enter,close | |
| RUST_LOG: info | |
| cairo-prover-wasm: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_prover | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.NIGHTLY_VERSION }} | |
| targets: x86_64-unknown-linux-gnu | |
| components: rust-src | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build stwo_cairo_prover for wasm64 | |
| run: RUSTFLAGS='--cfg getrandom_backend="custom"' cargo check --target wasm64-unknown-unknown -Z build-std=std,panic_abort --package stwo-cairo-prover --release | |
| cairo-air-wasm: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_prover | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.NIGHTLY_VERSION }} | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build cairo-air for wasm32 | |
| run: cargo check --package cairo-air --no-default-features --target wasm32-unknown-unknown --release | |
| crates-stable: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_prover | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.STABLE_VERSION }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check workspace crates (except prover and dev-utils) compile on stable | |
| env: | |
| RUSTUP_TOOLCHAIN: ${{ env.STABLE_VERSION }} | |
| run: cargo check --workspace --exclude stwo-cairo-prover --exclude stwo-cairo-dev-utils | |
| format: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_prover | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| components: rustfmt | |
| toolchain: ${{ env.NIGHTLY_VERSION }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: scripts/rust_fmt.sh --check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./stwo_cairo_prover | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| components: clippy | |
| toolchain: ${{ env.NIGHTLY_VERSION }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: scripts/clippy.sh | |
| typos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: crate-ci/typos@v1.30.1 | |
| merge-gatekeeper: | |
| runs-on: ubuntu-latest | |
| # Restrict permissions of the GITHUB_TOKEN. | |
| # Docs: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
| permissions: | |
| checks: read | |
| statuses: read | |
| steps: | |
| - name: Run Merge Gatekeeper on pull request | |
| if: github.event_name == 'pull_request' | |
| uses: upsidr/merge-gatekeeper@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| timeout: 2500 | |
| interval: 30 | |
| ignored: "code-review/reviewable" | |
| - name: Run Merge Gatekeeper on Merge Queue || push | |
| if: github.event_name == 'merge_group' || github.event_name == 'push' | |
| uses: upsidr/merge-gatekeeper@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{github.ref}} | |
| timeout: 2500 | |
| interval: 30 | |
| ignored: "code-review/reviewable" |