bitcoin_slices 0.11.0

Parse Bitcoin objects without allocations
on: [pull_request]

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        toolchain: ["1.74.0", "stable", "nightly"]
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
      - run: cargo update -p cc --precise 1.0.28

      - run: cargo build --all-features
        if: ${{ matrix.toolchain == '1.74.0' || matrix.toolchain == 'stable' || matrix.toolchain == 'nightly' }}
      
        

  test:
    name: Test Suite
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo test --all-features

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: "1.82.0"
          components: rustfmt, clippy
      - run: cargo fmt --all -- --check
      - run: cargo clippy -- -D warnings

  bench:
    name: Bench Suite
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo bench --all-features

  fuzz:
    name: Fuzz
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        fuzz_target: ["block", "block_header", "len", "out_point", "script", "transaction", "tx_in", "tx_ins", "tx_out", "tx_outs", "witness", "witnesses"]
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@nightly
      - run: rustup override set nightly
      - run: cargo install cargo-fuzz --version 0.12.0
      - run: cargo fuzz run ${{ matrix.fuzz_target }} -- -max_total_time=120