-
Notifications
You must be signed in to change notification settings - Fork 16
Automatic website gen for integration test cases executions #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fc2c2a1
997ea55
9d1f51a
6e2bf46
7e1a08d
ddfb580
66a97cf
cef644f
e220471
ead96c7
d77604e
ee966ca
9573938
6cb4998
882c6e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,12 +10,15 @@ concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| ERE_TAG: 0.0.12-7ef4598 | ||
| OPENVM_RUST_TOOLCHAIN: nightly-2025-08-07 | ||
|
|
||
| jobs: | ||
| jobs: | ||
| witness-generator: | ||
| name: Generate EEST benchmark fixtures | ||
| runs-on: ubuntu-latest | ||
|
|
@@ -43,8 +46,7 @@ jobs: | |
| fi | ||
|
|
||
| stateless-validator: | ||
| name: "${{ format('{0} / {1} / {2}', matrix.el, matrix.test, matrix.zkvm) }}" | ||
| runs-on: [self-hosted-ghr, size-xl-x64] | ||
| name: "${{ format('{0} / {1} / {2}', matrix.el, matrix.zkvm, matrix.test) }}" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
|
|
@@ -55,13 +57,17 @@ jobs: | |
| - prove_empty_block | ||
| zkvm: [sp1, risc0, pico, zisk, openvm] | ||
| el: [reth, ethrex] | ||
| include: | ||
| - zkvm: openvm | ||
| threads: 2 | ||
|
Comment on lines
+61
to
+62
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an old setup since OpenVM uses quite a lot of RAM per case, so going very far in parallelization makes the CI machine struggle. But since OpenVM emulation is very fast, doesn't hurt much CI duration. For the rest, I configured 12 threads to avoid going with 16 which is the default for the CI machine. Mainly to give some stability to wall-clock time runs. |
||
| - threads: 12 | ||
| exclude: | ||
| # Pico | ||
| - zkvm: pico | ||
| test: prove_empty_block # See https://github.com/eth-act/ere/issues/173 | ||
| # ZisK | ||
| - zkvm: zisk | ||
| test: prove_empty_block # ere image intentionally doesn't bake big proving key for CI | ||
| test: prove_empty_block # ere image intentionally doesn't bake big proving key for CI | ||
| # Ethrex | ||
| - el: ethrex | ||
| test: execute_mainnet_blocks # Still quite heavy to run in CI | ||
|
|
@@ -74,37 +80,17 @@ jobs: | |
| - el: ethrex | ||
| zkvm: pico # See https://github.com/eth-act/ere/issues/174 | ||
| - el: ethrex | ||
| zkvm: zisk # See https://github.com/eth-act/ere/issues/XXX | ||
|
|
||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@nightly | ||
|
|
||
| - name: Install C toolchain dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential clang libclang-dev | ||
|
|
||
| - name: Pull ere images | ||
| run: | | ||
| for variant in "base" "base-${{ matrix.zkvm }}" "cli-${{ matrix.zkvm }}"; do | ||
| src="ghcr.io/eth-act/ere/ere-${variant}:${ERE_TAG}" | ||
| dst="ere-${variant}:${ERE_TAG}" | ||
| docker pull "$src" | ||
| docker tag "$src" "$dst" | ||
| done | ||
|
|
||
| - name: Run benchmark | ||
| run: | | ||
| ${{ matrix.zkvm == 'openvm' && 'RAYON_NUM_THREADS=1' || '' }} RUST_LOG=warn,benchmark_runner=info ZKVM=${{ matrix.zkvm }} EL=${{ matrix.el }} cargo test --release -p integration-tests -- --test-threads=1 ${{ matrix.test }} | ||
| zkvm: zisk # See https://github.com/eth-act/ere/issues/186 | ||
| uses: ./.github/workflows/run-benchmark.yml | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of deleted code in this file was extracted to this separate component for better modularity and avoid repetition. |
||
| with: | ||
| test: ${{ matrix.test }} | ||
| zkvm: ${{ matrix.zkvm }} | ||
| el: ${{ matrix.el }} | ||
| upload_results: ${{ startsWith(matrix.test, 'execute_') }} | ||
| threads: ${{ matrix.threads }} | ||
|
|
||
| custom-guest: | ||
| name: "${{ format('{0} / {1}', matrix.test, matrix.zkvm) }}" | ||
| runs-on: [self-hosted-ghr, size-xl-x64] | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
|
|
@@ -120,27 +106,96 @@ jobs: | |
| zkvm: zisk | ||
| - test: prove_panic_guest | ||
| zkvm: zisk | ||
| uses: ./.github/workflows/run-benchmark.yml | ||
| with: | ||
| test: ${{ matrix.test }} | ||
| zkvm: ${{ matrix.zkvm }} | ||
| el: 'none' | ||
| threads: 12 | ||
|
|
||
| generate-benchmark-website: | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This and next jobs are new ones pulling uploaded artifacts, merging, generating website and publishing. Pending to only run this on |
||
| name: Generate Benchmark Website | ||
| needs: [stateless-validator] | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@nightly | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' | ||
|
|
||
| - name: Install C toolchain dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential clang libclang-dev | ||
|
|
||
| - name: Pull ere images | ||
| - name: Download all benchmark artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: benchmark-results-* | ||
| path: ./downloaded-artifacts | ||
|
|
||
| - name: Merge results and generate website | ||
| run: | | ||
| for variant in "base" "base-${{ matrix.zkvm }}" "cli-${{ matrix.zkvm }}"; do | ||
| src="ghcr.io/eth-act/ere/ere-${variant}:${ERE_TAG}" | ||
| dst="ere-${variant}:${ERE_TAG}" | ||
| docker pull "$src" | ||
| docker tag "$src" "$dst" | ||
| mkdir -p ./merged-results | ||
| echo "Downloaded artifacts:" | ||
| ls -la ./downloaded-artifacts/ || echo "No artifacts found" | ||
|
|
||
| # Extract all tar.gz files and merge them | ||
| for artifact_dir in ./downloaded-artifacts/*/; do | ||
| if [ -d "$artifact_dir" ]; then | ||
| echo "Processing $artifact_dir" | ||
| for tarfile in "$artifact_dir"/*.tar.gz; do | ||
| if [ -f "$tarfile" ]; then | ||
| echo "Extracting $tarfile" | ||
| tar -xzf "$tarfile" -C ./merged-results --skip-old-files 2>/dev/null | ||
| fi | ||
| done | ||
| fi | ||
| done | ||
|
|
||
| - name: Run benchmark | ||
| run: CI=1 RUST_LOG=warn,benchmark_runner=info ZKVM=${{ matrix.zkvm }} cargo test --release -p integration-tests -- --test-threads=1 ${{ matrix.test }} | ||
|
|
||
| echo "Merged results structure:" | ||
| ls -la ./merged-results/ | ||
| if [ -d ./merged-results/zkevm-metrics ]; then | ||
| echo "Contents of zkevm-metrics:" | ||
| ls -la ./merged-results/zkevm-metrics/ | ||
| fi | ||
|
|
||
| echo "Generating website..." | ||
| python3 scripts/generate-website.py -i ./merged-results -o index.html | ||
|
|
||
| - name: Upload website artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: benchmark-website | ||
| path: index.html | ||
| retention-days: 90 | ||
|
|
||
| deploy-pages: | ||
| name: Deploy Benchmark Website | ||
| needs: generate-benchmark-website | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' }} | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - name: Configure GitHub Pages | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Download website artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: benchmark-website | ||
| path: ./website | ||
|
|
||
| - name: Upload Pages artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: ./website | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: Run Benchmark | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| test: | ||
| required: true | ||
| type: string | ||
| description: Test to run | ||
| upload_results: | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| description: Whether to create and upload benchmark results | ||
| zkvm: | ||
| required: true | ||
| type: string | ||
| description: ZKVM to use | ||
| el: | ||
| required: false | ||
| type: string | ||
| default: '' | ||
| description: Execution layer client | ||
| threads: | ||
| required: true | ||
| type: number | ||
| description: Number of threads for RAYON_NUM_THREADS | ||
|
|
||
| jobs: | ||
| run-benchmark: | ||
| name: ${{ inputs.zkvm }} - ${{ inputs.test }} | ||
| runs-on: [self-hosted-ghr, size-xl-x64] | ||
| env: | ||
| ERE_TAG: 0.0.12-7ef4598 | ||
| OPENVM_RUST_TOOLCHAIN: nightly-2025-08-07 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@nightly | ||
|
|
||
| - name: Install C toolchain dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y build-essential clang libclang-dev | ||
|
|
||
| - name: Pull ere images | ||
| run: | | ||
| for variant in "base" "base-${{ inputs.zkvm }}" "cli-${{ inputs.zkvm }}"; do | ||
| src="ghcr.io/eth-act/ere/ere-${variant}:${ERE_TAG}" | ||
| dst="ere-${variant}:${ERE_TAG}" | ||
| docker pull "$src" | ||
| docker tag "$src" "$dst" | ||
| done | ||
|
|
||
| - name: Run benchmark | ||
| run: | | ||
| RAYON_NUM_THREADS=${{ inputs.threads }} \ | ||
| RUST_LOG=warn,benchmark_runner=info \ | ||
| ZKVM=${{ inputs.zkvm }} \ | ||
| EL=${{ inputs.el }} \ | ||
| WORKLOAD_OUTPUT_DIR=./zkevm-metrics \ | ||
| cargo test --release -p integration-tests -- --test-threads=1 ${{ inputs.test }} | ||
|
|
||
| - name: Create results archive | ||
| if: ${{ inputs.upload_results }} | ||
| run: | | ||
| cd tests && tar -czvf benchmark-results.tar.gz ./zkevm-metrics | ||
|
|
||
| - name: Upload benchmark results | ||
| if: ${{ inputs.upload_results }} | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: benchmark-results-${{ inputs.el }}-${{ inputs.zkvm }}-${{ inputs.test }} | ||
| path: tests/benchmark-results.tar.gz | ||
| retention-days: 90 |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the integration test refactoring, as a side effect, the CI runs are a bit better organized in the UI:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pipeline:
