Skip to content

fix: test zksolc interface changes after unification #527

fix: test zksolc interface changes after unification

fix: test zksolc interface changes after unification #527

Workflow file for this run

name: Tests
on:
pull_request:
workflow_dispatch:
inputs:
compiler_tester_reference_branch:
description: "compiler-tester branch to use as a benchmark reference"
required: true
default: "main"
compiler_tester_candidate_branch:
description: "compiler-tester branch to use as a benchmark candidate"
required: true
default: "main"
compiler_llvm_reference_branch:
description: "compiler-llvm branch to use as a benchmark reference"
required: false
default: "main"
compiler_llvm_candidate_branch:
description: "compiler-llvm branch to use as a benchmark candidate"
required: false
default: ""
compiler_llvm_benchmark_mode:
description: "Mode filter for compiler-llvm benchmarks"
required: false
default: "^M^B3"
compiler_llvm_benchmark_path:
description: "Path filter for compiler-llvm benchmarks"
required: false
default: ""
concurrency:
group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# Check for secrets leak in the repository
secrets-scanner:
uses: matter-labs/era-compiler-ci/.github/workflows/secrets-scanner.yaml@v1
secrets: inherit
# Check for cargo issues
cargo-check:
runs-on: matterlabs-ci-runner-high-performance
container:
image: ghcr.io/matter-labs/zksync-llvm-runner:latest
steps:
- uses: actions/checkout@v4
- name: Build LLVM
uses: matter-labs/era-compiler-ci/.github/actions/build-llvm@v1
with:
enable-assertions: true
ccache-key-type: static
- name: Cargo checks
uses: matter-labs/era-compiler-ci/.github/actions/cargo-check@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Define target for integration tests and benchmarks
# based on PR title labels
target-machine:
runs-on: ubuntu-latest
outputs:
evm: ${{ steps.evm.outputs.machine || steps.default.outputs.evm }}
eravm: ${{ steps.eravm.outputs.machine || steps.default.outputs.eravm }}
steps:
- name: Check for EraVM target
id: eravm
if: contains(github.event.pull_request.title, '(eravm)') || contains(github.event.pull_request.title, '(EraVM)')
run: echo "machine=eravm" | tee -a "${GITHUB_OUTPUT}"
- name: Check for EVM target
id: evm
if: contains(github.event.pull_request.title, '(evm)') || contains(github.event.pull_request.title, '(EVM)')
run: echo "machine=evm" | tee -a "${GITHUB_OUTPUT}"
- name: Check for default target
id: default
shell: bash -ex {0}
run: |
if [[ "${{ join(steps.*.outputs.*) }}" == "" ]]; then
echo "eravm=eravm" | tee -a "${GITHUB_OUTPUT}"
echo "evm=evm" | tee -a "${GITHUB_OUTPUT}"
fi
# 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: 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-repo: ${{ github.event.pull_request.head.repo.full_name }} # required to properly test forks
ccache-key-type: static
target-machine: ${{ matrix.target }}
# 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: target-machine
uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@v1
secrets: inherit
strategy:
fail-fast: false
matrix:
target: ${{ needs.target-machine.outputs.* }}
with:
compiler_tester_reference_branch: ${{ github.event.inputs.compiler_tester_reference_branch || 'main' }}
compiler_tester_candidate_branch: ${{ github.event.inputs.compiler_tester_candidate_branch || '' }}
compiler_llvm_candidate_branch: ${{ github.event.inputs.compiler_llvm_candidate_branch || '' }}
compiler_llvm_reference_branch: ${{ github.event.inputs.compiler_llvm_reference_branch || 'main' }}
compiler_llvm_benchmark_mode: ${{ github.event.inputs.compiler_llvm_benchmark_mode || '^M^B3' }}
compiler_llvm_benchmark_path: ${{ github.event.inputs.compiler_llvm_benchmark_path || '' }}
compiler-tester-repo: ${{ github.event.pull_request.head.repo.full_name }}
ccache-key-type: static
target-machine: ${{ matrix.target }}
# Special job that allows some of the jobs to be skipped or failed
# requiring others to be successful
pr-checks:
runs-on: ubuntu-latest
if: always()
needs:
- secrets-scanner
- cargo-check
- integration-tests
- benchmarks
steps:
- name: Decide on PR checks
uses: re-actors/alls-green@release/v1
with:
allowed-failures: integration-tests, benchmarks
jobs: ${{ toJSON(needs) }}