sux 0.12.3

A pure Rust implementation of succinct and compressed data structures
Documentation
name: Rust

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main"]

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Check formatting
        run: cargo fmt -- --check
      - name: Run clippy
        run: cargo clippy

  build:
    runs-on: ubuntu-latest
    needs: lint
    strategy:
      matrix:
        rust:
          - 1.85.0
          - stable
          - beta
          - nightly
        features:
          - ''
          - '--no-default-features'
          - '--features rayon,flate2,zstd,clap,cli,fuzz,slow_tests,mwhc,no_logging,deko,serde,epserde,mmap'
        include:
          - rust: nightly
            features: '--all-features'

    steps:
      - name: Install rust (${{ matrix.rust }})
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          profile: minimal
          override: true
      - uses: actions/checkout@v3
      - name: Build
        run: cargo build --verbose ${{ matrix.features }}

  docs:
    runs-on: ubuntu-latest
    needs: lint
    steps:
      - uses: actions/checkout@v3
      - name: Install nightly
        uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          profile: minimal
      - name: Build docs
        env:
          RUSTDOCFLAGS: "--cfg docsrs"
        run: cargo +nightly doc --all-features --no-deps

  coverage:
    needs: build
    name: coverage
    runs-on: ubuntu-latest
    container:
      image: xd009642/tarpaulin:develop-nightly
      options: --security-opt seccomp=unconfined
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Generate code coverage
        run: |
          cargo +nightly tarpaulin --verbose --engine llvm --all-features --workspace --out Lcov

      - name: Coveralls
        uses: coverallsapp/github-action@v2
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          path-to-lcov: "lcov.info"