Skip to content

feat: make chain id to be U256 #147

feat: make chain id to be U256

feat: make chain id to be U256 #147

name: Compare VM perfomance to base branch
on:
pull_request:
jobs:
vm-benchmarks:
name: Run VM benchmarks
runs-on: [matterlabs-ci-runner]
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
fetch-depth: 0
ref: ${{ github.base_ref }}
- name: checkout divergence point
run: git checkout $(git merge-base ${{ github.event.pull_request.head.sha }} HEAD)
- name: setup-env
run: |
touch .env
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
- name: init
run: |
docker-compose -f docker-compose-runner.yml up -d zk
- name: run benchmarks on base branch
shell: bash
run: |
ci_run zk
ci_run zk compiler system-contracts
ci_run cargo bench --package vm-benchmark --bench iai | tee base-iai
- name: checkout pull request
run: git checkout --force ${{ github.event.pull_request.head.sha }}
- name: run benchmarks on PR
shell: bash
run: |
ci_run zk
ci_run zk compiler system-contracts
ci_run cargo bench --package vm-benchmark --bench iai | tee pr-iai
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "speedup<<$EOF" >> $GITHUB_OUTPUT
ci_run cargo run --package vm-benchmark --release --bin compare_iai_results base-iai pr-iai >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
id: comparison
- name: Comment on PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
${{ steps.comparison.outputs.speedup == '' && '## No performance difference detected (anymore)' || '## Detected VM performance changes' }}
${{ steps.comparison.outputs.speedup }}
comment_tag: vm-performance-changes
mode: recreate
create_if_not_exists: ${{ steps.comparison.outputs.speedup != '' }}