feat: enable recursion #4109
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: Integration Tests | |
| on: | |
| push: | |
| branches: ["main"] | |
| merge_group: | |
| pull_request: | |
| branches: ["**"] | |
| paths-ignore: ["spec/**"] | |
| permissions: | |
| contents: read | |
| actions: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| # "Lint" is a required check, don't change the name | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'push' || github.actor != 'github-merge-queue[bot]' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust Environment | |
| uses: ./.github/actions/setup-rust | |
| - name: Cache cargo build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lambda-vm-lint" | |
| cache-all-crates: "true" | |
| - name: Run lint checks | |
| run: make lint | |
| - name: Check ethrex fixture checksums | |
| run: make check-ethrex-fixture-checksums | |
| test-executor: | |
| name: Executor tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'push' || github.actor != 'github-merge-queue[bot]' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust Environment | |
| uses: ./.github/actions/setup-rust | |
| - name: Cache cargo build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lambda-vm-test" | |
| cache-all-crates: "true" | |
| - name: Cache compiled ASM ELF artifacts | |
| id: cache-asm-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: executor/program_artifacts/asm | |
| key: asm-elf-artifacts-${{ hashFiles('executor/programs/asm/**') }} | |
| - name: Compile ASM programs to ELF | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-asm | |
| - name: Cache compiled Rust ELF artifacts and build cache | |
| id: cache-rust-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| executor/program_artifacts/rust | |
| executor/shared_target | |
| key: rust-elf-artifacts-${{ hashFiles('executor/programs/rust/**', 'executor/programs/riscv64im-lambda-vm-elf.json', 'syscalls/**', 'Makefile') }} | |
| restore-keys: | | |
| rust-elf-artifacts- | |
| - name: Compile Rust programs to ELF | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-rust | |
| - name: Run asm tests (no compile) | |
| run: | | |
| cargo test --release -p executor --test asm | |
| - name: Run rust tests (no compile) | |
| run: | | |
| cargo test --release -p executor --test rust | |
| - name: Run flamegraph tests | |
| run: | | |
| cargo test --release -p executor --test flamegraph | |
| - name: Run ignored executor tests | |
| run: | | |
| cargo test --release -p executor test_ethrex -- --ignored | |
| cargo test --release -p executor test_ckzg -- --ignored | |
| test-cli: | |
| name: CLI tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'push' || github.actor != 'github-merge-queue[bot]' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust Environment | |
| uses: ./.github/actions/setup-rust | |
| - name: Cache cargo build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lambda-vm-cli-test" | |
| cache-all-crates: "true" | |
| - name: Run CLI tests | |
| run: cargo test -p cli | |
| # "Test" is a required check — keep this name to avoid branch protection changes. | |
| # This gate job passes only when CLI, executor, disk-spill, and prover tests succeed. | |
| test: | |
| name: Test | |
| if: always() | |
| needs: [test-executor, test-cli, test-prover, test-disk-spill] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check results | |
| run: | | |
| executor="${{ needs.test-executor.result }}" | |
| cli="${{ needs.test-cli.result }}" | |
| prover="${{ needs.test-prover.result }}" | |
| disk_spill="${{ needs.test-disk-spill.result }}" | |
| echo "test-executor: $executor" | |
| echo "test-cli: $cli" | |
| echo "test-prover: $prover" | |
| echo "test-disk-spill: $disk_spill" | |
| # Allow "success" or "skipped" (skipped on merge queue pushes) | |
| if [[ "$executor" != "success" && "$executor" != "skipped" ]]; then | |
| exit 1 | |
| fi | |
| if [[ "$cli" != "success" && "$cli" != "skipped" ]]; then | |
| exit 1 | |
| fi | |
| if [[ "$prover" != "success" && "$prover" != "skipped" ]]; then | |
| exit 1 | |
| fi | |
| if [[ "$disk_spill" != "success" && "$disk_spill" != "skipped" ]]; then | |
| exit 1 | |
| fi | |
| test-disk-spill: | |
| name: Disk-spill tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'push' || github.actor != 'github-merge-queue[bot]' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust Environment | |
| uses: ./.github/actions/setup-rust | |
| - name: Cache cargo build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lambda-vm-disk-spill" | |
| cache-all-crates: "true" | |
| - name: Cache compiled ASM ELF artifacts | |
| id: cache-asm-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: executor/program_artifacts/asm | |
| key: asm-elf-artifacts-${{ hashFiles('executor/programs/asm/**') }} | |
| - name: Install clang and lld | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: sudo apt-get update && sudo apt-get install -y clang lld | |
| - name: Compile ASM programs to ELF | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-asm | |
| - name: Cache compiled Rust ELF artifacts and build cache | |
| id: cache-rust-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| executor/program_artifacts/rust | |
| executor/shared_target | |
| key: rust-elf-artifacts-${{ hashFiles('executor/programs/rust/**', 'executor/programs/riscv64im-lambda-vm-elf.json', 'syscalls/**', 'Makefile') }} | |
| restore-keys: | | |
| rust-elf-artifacts- | |
| - name: Compile Rust programs to ELF | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-rust | |
| - name: Run stark disk-spill tests | |
| run: | | |
| cargo test --release -p stark --features disk-spill disk_spill | |
| - name: Run prover disk-spill tests | |
| env: | |
| FORCE_DISK_SPILL: "1" | |
| run: | | |
| cargo test --release -p lambda-vm-prover --features disk-spill -- disk_spill count_table_lengths | |
| build-prover-tests: | |
| name: Build prover tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'push' || github.actor != 'github-merge-queue[bot]' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust Environment | |
| uses: ./.github/actions/setup-rust | |
| - name: Cache cargo build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "lambda-vm-prover-test" | |
| cache-all-crates: "true" | |
| - name: Install nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Build and archive prover + crypto tests | |
| run: | | |
| cargo nextest archive --release \ | |
| -p lambda-vm-prover -p stark -p crypto -p ecsm \ | |
| --archive-file prover-tests.tar.zst | |
| - name: Upload test archive | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: prover-tests | |
| path: prover-tests.tar.zst | |
| retention-days: 1 | |
| test-prover: | |
| name: Prover tests (${{ matrix.partition }}/4) | |
| needs: build-prover-tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| partition: [1, 2, 3, 4] | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Cache compiled ASM ELF artifacts | |
| id: cache-asm-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: executor/program_artifacts/asm | |
| key: asm-elf-artifacts-${{ hashFiles('executor/programs/asm/**') }} | |
| - name: Install clang and lld | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: sudo apt-get update && sudo apt-get install -y clang lld | |
| - name: Compile ASM programs to ELF | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-asm | |
| - name: Cache compiled Rust ELF artifacts and build cache | |
| id: cache-rust-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| executor/program_artifacts/rust | |
| executor/shared_target | |
| key: rust-elf-artifacts-${{ hashFiles('executor/programs/rust/**', 'executor/programs/riscv64im-lambda-vm-elf.json', 'syscalls/**', 'Makefile') }} | |
| restore-keys: | | |
| rust-elf-artifacts- | |
| - name: Setup Rust Environment | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| uses: ./.github/actions/setup-rust | |
| - name: Compile Rust programs to ELF | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-rust | |
| - name: Install nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Download test archive | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: prover-tests | |
| - name: Run prover tests (shard ${{ matrix.partition }}/4) | |
| run: | | |
| cargo nextest run \ | |
| --archive-file prover-tests.tar.zst \ | |
| --partition hash:${{ matrix.partition }}/4 \ | |
| --test-threads=1 | |
| test-prover-comprehensive: | |
| name: Prover comprehensive tests | |
| needs: build-prover-tests | |
| if: github.event_name == 'merge_group' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Cache compiled ASM ELF artifacts | |
| id: cache-asm-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: executor/program_artifacts/asm | |
| key: asm-elf-artifacts-${{ hashFiles('executor/programs/asm/**') }} | |
| - name: Install clang and lld | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: sudo apt-get update && sudo apt-get install -y clang lld | |
| - name: Compile ASM programs to ELF | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-asm | |
| - name: Cache compiled Rust ELF artifacts and build cache | |
| id: cache-rust-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| executor/program_artifacts/rust | |
| executor/shared_target | |
| key: rust-elf-artifacts-${{ hashFiles('executor/programs/rust/**', 'executor/programs/riscv64im-lambda-vm-elf.json', 'syscalls/**', 'Makefile') }} | |
| restore-keys: | | |
| rust-elf-artifacts- | |
| - name: Setup Rust Environment | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| uses: ./.github/actions/setup-rust | |
| - name: Compile Rust programs to ELF | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| run: | | |
| make compile-programs-rust | |
| - name: Install nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Download test archive | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: prover-tests | |
| - name: Run comprehensive prover tests | |
| run: | | |
| cargo nextest run \ | |
| --archive-file prover-tests.tar.zst \ | |
| --test-threads=1 \ | |
| -E 'test(test_prove_elfs_all_instructions_64_full)' \ | |
| --run-ignored ignored-only | |
| # Seed ELF caches on refs/heads/main so merge-queue runs can restore them. | |
| # GitHub Actions caches are branch-scoped: merge_group branches can only read | |
| # caches from their base branch (main). The test jobs above are skipped on | |
| # push-to-main (already validated by the merge queue), so without this job | |
| # no ELF cache is ever saved on main and every merge-queue entry recompiles. | |
| seed-elf-cache: | |
| name: Seed ELF cache | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Cache compiled ASM ELF artifacts | |
| id: cache-asm-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: executor/program_artifacts/asm | |
| key: asm-elf-artifacts-${{ hashFiles('executor/programs/asm/**') }} | |
| - name: Install clang and lld | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: sudo apt-get update && sudo apt-get install -y clang lld | |
| - name: Compile ASM programs to ELF | |
| if: steps.cache-asm-elfs.outputs.cache-hit != 'true' | |
| run: make compile-programs-asm | |
| - name: Cache compiled Rust ELF artifacts and build cache | |
| id: cache-rust-elfs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| executor/program_artifacts/rust | |
| executor/shared_target | |
| key: rust-elf-artifacts-${{ hashFiles('executor/programs/rust/**', 'executor/programs/riscv64im-lambda-vm-elf.json', 'syscalls/**', 'Makefile') }} | |
| restore-keys: | | |
| rust-elf-artifacts- | |
| - name: Setup Rust Environment | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| uses: ./.github/actions/setup-rust | |
| - name: Compile Rust programs to ELF | |
| if: steps.cache-rust-elfs.outputs.cache-hit != 'true' | |
| run: make compile-programs-rust |