Skip to content

ci: support workflow with sanitizers #3

ci: support workflow with sanitizers

ci: support workflow with sanitizers #3

Workflow file for this run

name: Sanitizers tests
on:
workflow_call:
inputs:
sanitizer:
required: true
type: string
description: 'Sanitizer to run tests with'
path:
required: false
type: string
description: 'Path to tests'
mode:
required: false
type: string
description: 'Mode to run tests with'
pull_request:
jobs:
run-with-sanitizers:
runs-on: ci-runner-compiler
timeout-minutes: 720
container:
image: matterlabs/llvm_runner:ubuntu22-llvm17-latest
options: -m 110g
steps:
- name: Checkout compiler-tester
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build LLVM
uses: matter-labs/era-compiler-ci/.github/actions/build-llvm@abalias-cpr-1052-run-compiler-tester-with-address-sanitizer
with:
#builder-extra-args: "--sanitizer ${{ inputs.sanitizer }}"
builder-extra-args: "--sanitizer Address"
enable-assertions: true
- name: Build compiler-tester
run: |
rustup install nightly-x86_64-unknown-linux-gnu
RUSTFLAGS="-Z sanitizer=address" cargo +nightly build --target x86_64-unknown-linux-gnu -Zbuild-std --bin 'compiler-tester'
- name: Build compilers
env:
CARGO_CHECKOUT_DIR: /usr/local/cargo/git/checkouts
run: |
export RUSTFLAGS="-Z sanitizer=address"
cargo +nightly build --target x86_64-unknown-linux-gnu -Zbuild-std --manifest-path ${CARGO_CHECKOUT_DIR}/era-compiler-solidity-*/*/Cargo.toml --target-dir './target-zksolc/'
cargo +nightly build --target x86_64-unknown-linux-gnu -Zbuild-std --manifest-path ${CARGO_CHECKOUT_DIR}/era-compiler-vyper-*/*/Cargo.toml --target-dir './target-zkvyper/'
- name: Run tests with sanitizers
run: |
set -x
./target/x86_64-unknown-linux-gnu/debug/compiler-tester \
--zksolc './target-zksolc/x86_64-unknown-linux-gnu/debug/zksolc' \
--zkvyper './target-zkvyper/x86_64-unknown-linux-gnu/debug/zkvyper' \
--path='tests/solidity/simple/algorithm' --mode='Y+M3B3 0.8.26'
# --path '${{ inputs.path }}'
# --mode '${{ inputs.mode }}'