Skip to content

docs: replacing the name and link of the social network #403

docs: replacing the name and link of the social network

docs: replacing the name and link of the social network #403

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: "main"
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:
compiler-tester-ref:
runs-on: ubuntu-latest
name: Compiler tester ref
outputs:
reference-ref: ${{ steps.compiler_tester_ref.outputs.reference-ref }}
candidate-ref: ${{ steps.compiler_tester_ref.outputs.candidate-ref }}
env:
ERA_SOLIDITY_TEST_TAG: era-solidity-test
ERA_SOLIDITY_REF_DEFAULT: main
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: matter-labs/era-compiler-tester
- name: Define compiler tester ref
id: compiler_tester_ref
shell: bash
run: |
REFERENCE_REF=${{ inputs.compiler_tester_reference_branch || env.ERA_SOLIDITY_REF_DEFAULT }}
if [ -n "$(git ls-remote --tags --heads --refs origin ${REFERENCE_REF})" ]; then
echo "reference-ref=${REFERENCE_REF}" | tee -a "${GITHUB_OUTPUT}"
else
echo "reference-ref=${{ env.ERA_SOLIDITY_REF_DEFAULT }}" | tee -a "${GITHUB_OUTPUT}"
fi
CANDIDATE_REF=${{ inputs.compiler_tester_candidate_branch || env.ERA_SOLIDITY_TEST_TAG }}
if [ -n "$(git ls-remote --tags --heads --refs origin ${CANDIDATE_REF})" ]; then
echo "candidate-ref=${CANDIDATE_REF}" | tee -a "${GITHUB_OUTPUT}"
else
echo "candidate-ref=${{ env.ERA_SOLIDITY_REF_DEFAULT }}" | tee -a "${GITHUB_OUTPUT}"
fi
build:
strategy:
fail-fast: false
matrix:
include:
- type: "reference"
ref: ${{ github.base_ref }}
- type: "candidate"
ref: ''
runs-on: [ci-runner-compiler, Linux]
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
if: matrix.type == 'candidate'
uses: matter-labs/era-compiler-ci/.github/actions/build-solc@v1
with:
solc-version: ${{ steps.project_version.outputs.solc-version }}
zksync-version: 1.0.${{ github.run_id }}
build-type: ${{ matrix.type }}
boost-version: 1.83.0
- name: Building the Solidity compiler
if: matrix.type == 'reference'
uses: matter-labs/era-compiler-ci/.github/actions/build-solc@v1
with:
solc-version: ${{ steps.project_version.outputs.solc-version }}
zksync-version: 1.0.${{ github.run_id }}
build-type: ${{ matrix.type }}
boost-version: 1.83.0
# 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, build ]
uses: matter-labs/era-compiler-ci/.github/workflows/integration-tests.yaml@main
secrets: inherit
with:
compiler-tester-ref: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
path: 'tests/solidity/'
custom-solc-run-id: ${{ github.run_id }}
custom-solc-version: ${{ needs.build.outputs.solc-version }}
extra-args: --mode "${{ github.base_ref }}"
save-ccache: 'true'
ccache-key-type: 'static'
# 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: [ compiler-tester-ref, build ]
uses: matter-labs/era-compiler-ci/.github/workflows/benchmarks.yml@main
secrets: inherit
with:
compiler_tester_reference_branch: ${{ needs.compiler-tester-ref.outputs.reference-ref }}
compiler_tester_candidate_branch: ${{ needs.compiler-tester-ref.outputs.candidate-ref }}
compiler_llvm_benchmark_mode: '+M^B3 ${{ needs.build.outputs.solc-version }}'
compiler_llvm_benchmark_path: 'tests/solidity/'
custom-solc-run-id: ${{ github.run_id }}
custom-solc-version: ${{ needs.build.outputs.solc-version }}