Skip to content

ci: optimize and unify scripts and build process 0.4.12 #24

ci: optimize and unify scripts and build process 0.4.12

ci: optimize and unify scripts and build process 0.4.12 #24

Workflow file for this run

name: Tests and benchmarks
on:
pull_request:
workflow_dispatch:
inputs:
compiler_tester_reference_branch:
description: "compiler-tester branch to use as a benchmark reference"
required: false
default: "era-solidity-test"
compiler_tester_candidate_branch:
description: "compiler-tester branch to use as a benchmark candidate"
required: false
default: "era-solidity-test"
concurrency:
group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- type: "reference"
ref: ${{ github.base_ref }}
- type: "candidate"
ref: ''
runs-on: ci-runner-compiler
name: build-${{ matrix.type }}
container:
image: matterlabs/llvm_runner:ubuntu20-llvm17-latest
outputs:
solc-version: ${{ steps.project_version.outputs.solc-version }}
steps:
- name: Checking out the Solidity repository
uses: actions/checkout@v4
with:
ref: ${{ matrix.ref }}
submodules: recursive
- name: Define project version
id: project_version
shell: bash
run: |
SOLC_VERSION=$(grep 'PROJECT_VERSION' CMakeLists.txt | grep -oP '(\d+\.\d+\.\d+)')
echo "solc-version=${SOLC_VERSION}" | tee -a "${GITHUB_OUTPUT}"
- name: Building the Solidity compiler
uses: ./.github/actions/solc-build
with:
solc-version: ${{ steps.project_version.outputs.solc-version }}-${{ matrix.type }}
zksync-version: 1.0.${{ github.run_id }}
# 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: build
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@aba-custom-solc-version-fix
secrets: inherit
with:
compiler-tester-ref: ${{ inputs.compiler_tester_candidate_branch || 'era-solidity-test' }}
path: 'tests/solidity/'
custom-solc-run-id: ${{ github.run_id }}
custom-solc-version: ${{ needs.build.outputs.solc-version }}
extra-args: --mode "${{ github.base_ref }}"
# Benchmarks workflow call from the era-compiler-ci repository
# 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: build
uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@aba-custom-solc-version-fix
secrets: inherit
with:
compiler_tester_reference_branch: ${{ inputs.compiler_tester_reference_branch || 'era-solidity-test' }}
compiler_tester_candidate_branch: ${{ inputs.compiler_tester_candidate_branch || 'era-solidity-test' }}
compiler_llvm_reference_branch: 'main'
compiler_llvm_candidate_branch: 'main'
compiler_llvm_benchmark_mode: '+M^B3 ${{ github.base_ref}}'
compiler_llvm_benchmark_path: 'tests/solidity/'
custom-solc-run-id: ${{ github.run_id }}
custom-solc-version: ${{ needs.build.outputs.solc-version }}