neo-devpack-solidity 0.22.0

Production-focused Solidity-to-NeoVM compilation system
Documentation
name: Fuzz
on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1
  CARGO_INCREMENTAL: 0

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  proptest-deep:
    name: Proptest Deep Run
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Cache Cargo dependencies
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

      - name: Run deep fuzz suite
        run: |
          export PROPTEST_CASES=100
          cargo test --test fuzz_tests

  cargo-fuzz-smoke:
    name: Cargo Fuzz Smoke
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Rust nightly
        uses: dtolnay/rust-toolchain@nightly

      - name: Install cargo-fuzz
        run: cargo install cargo-fuzz

      - name: Cache Cargo dependencies
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
            fuzz/target
          key: ${{ runner.os }}-cargo-fuzz-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-fuzz-

      - name: Build fuzz targets
        run: cargo +nightly fuzz build

      - name: Run compile-pipeline fuzz target (fuzz_target_1, 60s)
        run: |
          cargo +nightly fuzz run fuzz_target_1 -- -max_total_time=60

      - name: Run NEF parser fuzz target (fuzz_target_2, 60s)
        run: |
          cargo +nightly fuzz run fuzz_target_2 -- -max_total_time=60

      - name: Run bytecode disassembler fuzz target (60s)
        run: |
          cargo +nightly fuzz run fuzz_target_disasm -- -max_total_time=60

      - name: Run NEF parse/serialize round-trip fuzz target (60s)
        run: |
          cargo +nightly fuzz run fuzz_target_nef_roundtrip -- -max_total_time=60

      - name: Run manifest JSON parser fuzz target (60s)
        run: |
          cargo +nightly fuzz run fuzz_target_manifest_json -- -max_total_time=60

      - name: Upload crash artifacts on failure
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: fuzz-crashes
          path: fuzz/artifacts/
          if-no-files-found: ignore
          retention-days: 30

  # ==========================================================================
  # Full Neo-Express on-chain suite (nightly) — all 28 compiler-behavior smoke
  # scripts plus the DeFi/Web3 showcase scripts. This is the only oracle that
  # compares compiler output against a real Neo N3 VM at full coverage; the
  # per-PR subset lives in ci.yml::neoxp-smoke. See AUDIT_REPORT_v0.21.md §5.
  # ==========================================================================
  neoxp-smoke-full:
    name: Neo-Express Full On-Chain Suite
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
      - name: Cache Cargo dependencies
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-smoke-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-smoke-
      - name: Build neo-solc (release)
        run: cargo build --release --bin neo-solc
      - name: Install .NET SDK (for Neo-Express)
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '10.0.x'
      - name: Install Neo-Express + jq
        run: |
          dotnet tool install Neo.Express --tool-path "$PWD/build/dotnet-tools"
          echo "$PWD/build/dotnet-tools" >> "$GITHUB_PATH"
          sudo apt-get update -qq
          sudo apt-get install -y -qq jq xxd
      - name: Pin neo-solc binary for the smoke scripts
        run: echo "NEO_SOLC=$PWD/target/release/neo-solc" >> "$GITHUB_ENV"
      - name: Run the full Neo-Express smoke suite
        run: make test-deploy-smoke-full
      - name: Run the DeFi/Web3 showcase smoke suite
        run: |
          make test-deploy-wgas-smoke test-deploy-flashloan-smoke \
            test-deploy-amm-smoke test-deploy-vesting-smoke \
            test-deploy-lending-smoke test-deploy-dao-smoke