Native Extension For Ceno zkVM #109
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: Guest Library Tests | |
| on: | |
| workflow_call: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["**"] | |
| paths: | |
| - "crates/circuits/**" | |
| - "crates/vm/**" | |
| - "crates/toolchain/**" | |
| - "extensions/**" | |
| - "guest-libs/**" | |
| - "Cargo.toml" | |
| - ".github/workflows/guest-lib-tests.yml" | |
| - "crates/sdk/guest/fib/**" | |
| concurrency: | |
| group: ${{ github.workflow_ref }}-guest-lib-tests-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| OPENVM_FAST_TEST: "1" | |
| OPENVM_SKIP_DEBUG: "1" | |
| jobs: | |
| integration-tests: | |
| strategy: | |
| matrix: | |
| crate: | |
| - { name: "sha2", path: "sha2" } | |
| - { name: "keccak256", path: "keccak256" } | |
| - { name: "ff_derive", path: "ff_derive" } | |
| - { name: "k256", path: "k256" } | |
| - { name: "p256", path: "p256" } | |
| - { name: "ruint", path: "ruint" } | |
| - { name: "pairing", path: "pairing" } | |
| - { name: "verify_stark", path: "verify_stark" } | |
| platform: | |
| - { runner: "64cpu-linux-arm64", image: "ubuntu24-full-arm64" } | |
| # Ensure tests run in parallel even if one fails | |
| fail-fast: false | |
| runs-on: | |
| - runs-on=${{ github.run_id }}-guest-lib-tests-${{ github.run_attempt }}-${{ strategy.job-index }}/runner=${{ matrix.platform.runner }}/image=${{ matrix.platform.image }}/extras=s3-cache | |
| steps: | |
| - uses: runs-on/action@v2 | |
| - uses: actions/checkout@v5 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| - "crates/circuits/**" | |
| - "crates/vm/**" | |
| - "crates/toolchain/**" | |
| - "extensions/**" | |
| - "guest-libs/${{ matrix.crate.path }}/**" | |
| - ".github/workflows/guest-lib-tests.yml" | |
| - name: Skip if no changes | |
| if: steps.filter.outputs.matched == 'false' | |
| run: | | |
| echo "No relevant changes, skipping tests." | |
| exit 0 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: taiki-e/install-action@nextest | |
| - name: Run ${{ matrix.crate.name }} guest library tests | |
| working-directory: guest-libs/${{ matrix.crate.path }} | |
| run: | | |
| rustup component add rust-src --toolchain nightly-2025-08-02 | |
| PAIRING_FEATURE_ARGS="" | |
| if [[ "${{ matrix.crate.name }}" == "pairing" ]]; then | |
| PAIRING_FEATURE_ARGS="--features=bn254,bls12_381" | |
| fi | |
| cargo nextest run --cargo-profile=fast $PAIRING_FEATURE_ARGS --no-tests=pass --test-threads=1 |