feat(EVM-1173): [AI] adapt fuzzer mutator to current tx schema #3313
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: "Rust CI" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: read-all | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| ZKSYNC_RISC_V_RUN: true | |
| CI: true | |
| # Cancel previous runs that might be caused by appbin update | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| name: tests | |
| runs-on: [matterlabs-ci-runner-high-performance] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| run: | | |
| rustup set profile minimal | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| - name: Compile for RISC-V | |
| working-directory: ./zksync_os | |
| run: | | |
| rustup target add riscv32i-unknown-none-elf | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| ./dump_bin.sh --type for-tests | |
| ./dump_bin.sh --type multiblock-batch | |
| - name: Compile | |
| run: cargo test --release --no-run | |
| - name: Run rust tests | |
| run: cargo test --release -j 3 | |
| crypto_test: | |
| name: crypto crate tests | |
| runs-on: [matterlabs-ci-runner-high-performance] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| run: | | |
| rustup set profile minimal | |
| - name: Run crypto tests 10 times with overflow checks | |
| run: | | |
| for i in {1..10}; do | |
| RUSTFLAGS="-C overflow-checks=on -C debug-assertions=on" cargo test -p crypto --quiet || exit 1 | |
| done | |
| evm_state_tests: | |
| name: EF EVM state tests | |
| runs-on: [matterlabs-ci-runner-high-performance] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| run: | | |
| rustup toolchain install | |
| rustup set profile minimal | |
| cargo install cargo-binutils | |
| - name: Download ethereum execution spec tests fixtures | |
| working-directory: ./tests/evm_tester | |
| run: | | |
| ./download_ethereum_fixtures.sh | |
| - name: Run EVM state tests | |
| working-directory: ./tests/evm_tester | |
| run: cargo run --bin evm-tester --release --features zksync_os_forward_system/no_print | |
| verify_binary: | |
| name: Verify binary | |
| runs-on: [matterlabs-ci-runner] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| working-directory: ./zksync_os | |
| run: | | |
| rustup set profile minimal | |
| rustup target add riscv32i-unknown-none-elf | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| - name: Compile for RISC-V | |
| working-directory: ./zksync_os | |
| run: | | |
| ./dump_bin.sh --type singleblock-batch | |
| ./dump_bin.sh --type multiblock-batch | |
| - name: Run binary checker | |
| run: cargo test -p binary_checker -- --nocapture --ignored | |
| e2e_prove: | |
| name: e2e_prove | |
| runs-on: [matterlabs-ci-runner-highmem] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| run: | | |
| rustup set profile minimal | |
| - name: Compile for RISC-V | |
| working-directory: ./zksync_os | |
| run: | | |
| rustup target add riscv32i-unknown-none-elf | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| ./dump_bin.sh --type for-tests | |
| - name: Run proving test | |
| # Runs with e2e_proving feature | |
| run: cargo test --release -p transactions --features e2e_proving run_base_system -- --nocapture | |
| eth_stf_run: | |
| name: eth_stf_run | |
| runs-on: [matterlabs-ci-runner-highmem] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| run: | | |
| rustup set profile minimal | |
| - name: Compile for RISC-V | |
| working-directory: ./zksync_os | |
| run: | | |
| rustup target add riscv32i-unknown-none-elf | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| ./dump_bin.sh --type eth-stf | |
| - name: Run ethereum block | |
| working-directory: ./tests/instances/eth_runner | |
| run: cargo run --release --features rig/eth_stf -- eth-run --block-dir 23846054 | |
| blake_tests: | |
| name: blake_tests | |
| runs-on: [matterlabs-ci-runner-highmem] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Setup | |
| run: | | |
| rustup set profile minimal | |
| rustup target add riscv32i-unknown-none-elf | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| - name: Compile for RISC-V | |
| working-directory: ./crypto/src/blake2s/test_program | |
| run: ./dump_bin.sh --type for-tests | |
| - name: Run proving test | |
| working-directory: ./crypto/src/blake2s | |
| run: | | |
| cargo test --release run_naive_test | |
| cargo test --release run_extended_delegation_test | |
| formatting: | |
| name: cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: rustfmt | |
| - name: Rustfmt Check | |
| uses: actions-rust-lang/rustfmt@v1 | |
| clippy: | |
| name: Clippy Lint Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| - name: Run Clippy | |
| run: | | |
| cargo clippy --all -- -D warnings | |
| typos: | |
| name: typos check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: crate-ci/typos@master | |
| with: | |
| config: ./.github/typos.toml | |
| run_fuzzer_regressions: | |
| name: Run fuzzer regressions | |
| runs-on: [matterlabs-ci-runner] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: "20" | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Compile for RISC-V | |
| working-directory: ./zksync_os | |
| run: | | |
| rustup target add riscv32i-unknown-none-elf | |
| cargo install cargo-binutils | |
| rustup component add llvm-tools-preview | |
| rustup component add rust-src | |
| ./dump_bin.sh --type for-tests | |
| - name: Run regression tests | |
| working-directory: ./tests/fuzzer | |
| run: | | |
| ./fuzz.sh install | |
| ./fuzz.sh regression | |
| check_app_bin: | |
| name: Check that binaries can be built | |
| runs-on: [matterlabs-ci-runner] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build fresh app bin | |
| run: | | |
| zksync_os/reproduce/reproduce.sh |