Skip to content

[DO_NOT_MERGE_YET] A way to propose to TaikoL1 #11

[DO_NOT_MERGE_YET] A way to propose to TaikoL1

[DO_NOT_MERGE_YET] A way to propose to TaikoL1 #11

Workflow file for this run

name: Benchmarks
on:
pull_request:
push:
branches: [develop]
jobs:
bench:
name: Benchmark the code
runs-on: warp-ubuntu-latest-x64-16x
strategy:
matrix:
toolchain:
- stable
env:
PR_NUMBER: ${{ github.event.number }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0 # Used to get hash of base branch
# https://github.com/dtolnay/rust-toolchain
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
# https://github.com/swatinem/rust-cache
- name: Run Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Set (and display) useful variables
id: vars
run: |
source scripts/ci/env-vars.sh
# Keep important variables around for the upload workflow that comes afterwards
fn_vars="vars.txt"
echo "PR_NUMBER=${PR_NUMBER}" >> $fn_vars
echo "HEAD_SHA=${HEAD_SHA}" >> $fn_vars
echo "HEAD_SHA_SHORT=${HEAD_SHA_SHORT}" >> $fn_vars
echo "BASE_SHA=${BASE_SHA}" >> $fn_vars
echo "BASE_SHA_SHORT=${BASE_SHA_SHORT}" >> $fn_vars
cat $fn_vars
- name: Install Foundry toolchain
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
# RUN BENCHMARKS
- run: make bench-in-ci
- name: Zip the report
run: |
cp vars.txt target/benchmark-in-ci/benchmark-report/
cd target/benchmark-in-ci
zip -r benchmark-report.zip benchmark-report
mv benchmark-report.zip ../../
- name: Upload report as artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-report.zip
path: benchmark-report.zip
- name: Add details to CI job summary
run: |
cat target/benchmark-in-ci/benchmark-report/benchmark-summary.md >> $GITHUB_STEP_SUMMARY