Skip to content

Commit

Permalink
ci: add support for evm benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbaliasnikov committed Jan 27, 2025
1 parent a83a0fd commit 590b4d8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 24 deletions.
File renamed without changes.
48 changes: 24 additions & 24 deletions .github/workflows/benchmarks-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: Integration tests and benchmarks
name: Tests

on:
pull_request:
workflow_dispatch:
inputs:
llvm_build_type:
description: "LLVM build type: debug | release"
required: true
default: "release"
compiler_tester_reference_rev:
description: "compiler-tester revision to use as a benchmark reference"
required: true
Expand Down Expand Up @@ -106,39 +102,43 @@ jobs:
# This is a common part of the benchmarks workflow for all repositories
# If you would like to make a change to the benchmarks workflow, please do it in the era-compiler-ci repository
benchmarks:
needs: [compiler-tester-ref, target-machine]
uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@v1
needs: [compiler-tester-ref]
uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@aba-support-evm-benchmarks
secrets: inherit
strategy:
fail-fast: false
matrix:
target: ${{ needs.target-machine.outputs.* }}
target: ['eravm', 'evm']
toolchain: ['ir-llvm', 'solc']
exclude:
- target: 'eravm'
toolchain: 'solc'
with:
llvm_build_type: ${{ github.event.inputs.llvm_build_type }}
compiler_tester_reference_branch: ${{ needs.compiler-tester-ref.outputs.reference-ref }}
compiler_tester_candidate_branch: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
compiler_llvm_reference_branch: ${{ github.event.inputs.compiler_llvm_reference_branch || github.event.repository.default_branch }}
compiler_llvm_candidate_branch: ${{ github.event.inputs.compiler_llvm_candidate_branch || github.head_ref }}
compiler_llvm_benchmark_mode: ${{ github.event.inputs.compiler_llvm_benchmark_mode || '^M^B3' }}
compiler_llvm_benchmark_path: ${{ github.event.inputs.compiler_llvm_benchmark_path || '' }}
ccache-key-type: 'static' # rotate ccache key every month
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
target-machine: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
ccache-key: 'llvm-Linux-X64-gnu'

# Integration tests workflow call from the era-compiler-ci repository
# This is a common part of the integration tests workflow for all repositories
# If you would like to make a change to the integration tests workflow, please do it in the era-compiler-ci repository
integration-tests:
needs: [compiler-tester-ref, target-machine]
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@v1
secrets: inherit
strategy:
fail-fast: false
matrix:
target: ${{ needs.target-machine.outputs.* }}
with:
compiler-tester-ref: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
llvm-ref: ${{ github.event.inputs.compiler_llvm_candidate_branch || github.head_ref || github.event.repository.default_branch }}
ccache-key-type: 'static' # rotate ccache key every month
compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
target-machine: ${{ matrix.target }}
# integration-tests:
# needs: [compiler-tester-ref, target-machine]
# uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@v1
# secrets: inherit
# strategy:
# fail-fast: false
# matrix:
# target: ${{ needs.target-machine.outputs.* }}
# with:
# compiler-tester-ref: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
# llvm-ref: ${{ github.event.inputs.compiler_llvm_candidate_branch || github.head_ref || github.event.repository.default_branch }}
# compiler-llvm-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
# target-machine: ${{ matrix.target }}
# ccache-key: 'llvm-Linux-X64-gnu'
6 changes: 6 additions & 0 deletions .github/workflows/cache-regen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
name: ${{ matrix.name }}
steps:

- name: Checkout
uses: actions/checkout@v4
with:
path: "llvm"

- name: Build LLVM for tests
uses: matter-labs/era-compiler-ci/.github/actions/build-llvm@v1
with:
Expand All @@ -49,6 +54,7 @@ jobs:
save-ccache: 'false'
enable-tests: 'true'
enable-assertions: 'true'
clone-llvm: 'false'
ccache-key: ${{ format('llvm-{0}-{1}-{2}', runner.os, runner.arch, 'gnu') }}

- name: Build LLVM for benchmarks
Expand Down

0 comments on commit 590b4d8

Please sign in to comment.