Native Sumcheck Layer Evaluation (#8) #37
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: OpenVM SDK Tests | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["**"] | |
| paths: | |
| - "crates/circuits/primitives/**" | |
| - "crates/vm/**" | |
| - "crates/toolchain/**" | |
| - "crates/sdk/**" | |
| - "Cargo.toml" | |
| - ".github/workflows/sdk.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| OPENVM_FAST_TEST: "1" | |
| jobs: | |
| tests: | |
| runs-on: | |
| - runs-on=${{ github.run_id }} | |
| - family=m7a.24xlarge | |
| - disk=large | |
| - extras=s3-cache | |
| steps: | |
| - uses: runs-on/action@v1 | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - uses: taiki-e/install-action@nextest | |
| - name: Install solc # svm should support arm64 linux | |
| run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.19 && solc --version | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Install architecture specific tools | |
| run: | | |
| arch=$(uname -m) | |
| case $arch in | |
| arm64|aarch64) | |
| S5CMD_BIN="s5cmd_2.2.2_linux_arm64.deb" | |
| rustup component add rust-src --toolchain nightly-2025-02-14-aarch64-unknown-linux-gnu | |
| ;; | |
| x86_64|amd64) | |
| S5CMD_BIN="s5cmd_2.2.2_linux_amd64.deb" | |
| rustup component add rust-src --toolchain nightly-2025-02-14-x86_64-unknown-linux-gnu | |
| ;; | |
| *) | |
| echo "Unsupported architecture: $arch" | |
| exit 1 | |
| ;; | |
| esac | |
| echo "Checking s5cmd" | |
| if type s5cmd &>/dev/null; then | |
| echo "s5cmd was installed." | |
| else | |
| TMP_DIR=/tmp/s5cmd | |
| rm -rf $TMP_DIR | |
| mkdir $TMP_DIR | |
| echo "s5cmd was not installed. Installing.." | |
| wget "https://github.com/peak/s5cmd/releases/download/v2.2.2/${S5CMD_BIN}" -P $TMP_DIR | |
| sudo dpkg -i "${TMP_DIR}/${S5CMD_BIN}" | |
| fi | |
| - name: Setup halo2 | |
| working-directory: crates/sdk | |
| run: | | |
| bash ../../extensions/native/recursion/trusted_setup_s3.sh | |
| - name: Run openvm-sdk contracts/ tests | |
| working-directory: crates/sdk/contracts | |
| run: | | |
| forge fmt --check | |
| forge build --sizes | |
| forge test | |
| - name: Check IOpenVmHalo2Verifier.sol abi correctness | |
| working-directory: crates/sdk/contracts | |
| run: | | |
| forge build | |
| jq -S '.abi' ./out/IOpenVmHalo2Verifier.sol/IOpenVmHalo2Verifier.json > compiled_abi.json | |
| jq -S . ./abi/IOpenVmHalo2Verifier.json > expected_abi_sorted.json | |
| diff -u expected_abi_sorted.json compiled_abi.json | |
| - name: Run openvm-sdk crate tests | |
| working-directory: crates/sdk | |
| run: | | |
| export RUST_BACKTRACE=1 | |
| cargo nextest run --cargo-profile=fast --test-threads=2 --features parallel,evm-verify |