jsonbb 0.2.3

A binary representation of json value, optimized for parsing and querying.
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

env:
  CARGO_TERM_COLOR: always

jobs:
  fmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          components: rustfmt, clippy
      - name: Check code format
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check
      - name: Clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-targets --all-features -- -D warnings

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain: [stable, nightly]
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.toolchain }}
      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-targets --all-features
      - name: Test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features --no-fail-fast

  fuzz:
    name: fuzz (${{ matrix.fuzz_target }})
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - fuzz_target: parse
            feature_args: ""
          - fuzz_target: roundtrip
            feature_args: "--features jsonbb/float_roundtrip"
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
      - name: Install cargo-fuzz
        run: cargo install cargo-fuzz --locked
      - name: Run cargo fuzz
        run: cargo fuzz run ${{ matrix.fuzz_target }} ${{ matrix.feature_args }} -- -max_total_time=60