Sanitizers tests #107
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sanitizers tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| # For more information about the supported sanitizers in Rust, see: | |
| # https://rustc-dev-guide.rust-lang.org/sanitizers.html | |
| rust-sanitizer: | |
| required: false | |
| default: 'address' | |
| type: string | |
| description: 'A sanitizer to build Rust code with. Possible values are: address, cfi, hwaddress, kcfi, leak, memory or thread' | |
| # For more information about the supported sanitizers in LLVM, see `LLVM_USE_SANITIZER` option in: | |
| # https://www.llvm.org/docs/CMake.html | |
| llvm-sanitizer: | |
| required: false | |
| default: 'Address' | |
| type: string | |
| description: 'A sanitizer to build LLVM with. Possible values are Address, Memory, MemoryWithOrigins, Undefined, Thread, DataFlow, and Address;Undefined' | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| run-with-sanitizers: | |
| runs-on: matterlabs-ci-runner-high-performance | |
| container: | |
| image: ghcr.io/matter-labs/zksync-llvm-runner:latest | |
| options: -m 110g | |
| env: | |
| TARGET: x86_64-unknown-linux-gnu | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| # This step is required to checkout submodules | |
| # that are disabled in .gitmodules config | |
| - name: Checkout submodules | |
| run: | | |
| git config --global --add safe.directory '*' | |
| git submodule update --force --depth=1 --recursive --checkout | |
| - name: Build LLVM | |
| uses: matter-labs/era-compiler-ci/.github/actions/build-llvm@v1 | |
| with: | |
| clone-llvm: 'false' | |
| target-env: 'gnu' | |
| enable-assertions: 'true' | |
| build-type: RelWithDebInfo | |
| sanitizer: ${{ inputs.llvm-sanitizer || 'Address' }} | |
| ccache-key: ${{ format('llvm-{0}-{1}-gnu', runner.os, runner.arch) }} | |
| save-ccache: 'false' | |
| - name: Run tests | |
| uses: matter-labs/era-compiler-ci/.github/actions/rust-unit-tests@v1 | |
| with: | |
| target: ${{ env.TARGET }} | |
| sanitizer: ${{ inputs.rust-sanitizer || 'address' }} | |
| - name: Send Slack notification | |
| uses: 8398a7/action-slack@v3 | |
| if: failure() && github.event_name == 'schedule' | |
| with: | |
| status: ${{ job.status }} | |
| fields: repo,commit,author,action,eventName,ref,workflow,job,took | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |