everett 0.1.0

A clean, zero-dependency statevector quantum simulator.
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

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

jobs:
  check:
    name: nix flake check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: DeterminateSystems/nix-installer-action@v16
      # GitHub-Actions-backed nix store cache; needs no external service or auth.
      - uses: nix-community/cache-nix-action@v6
        with:
          primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
          restore-prefixes-first-match: nix-${{ runner.os }}-
      # no --all-systems: the runner is x86_64-linux and cannot build the
      # toolchain for other platforms (the fenix channel drv is per-system).
      - run: nix flake check

  miri:
    name: miri
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: install miri
        # each rustup component needs its own --component flag. the nightly
        # toolchain is selected per-command with `+nightly` below, which takes
        # precedence over the repo's rust-toolchain.toml (pinned to stable).
        run: |
          rustup toolchain install nightly --component miri --component rust-src
          cargo +nightly miri setup
      - name: cargo miri test
        run: |
          MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-tree-borrows" \
            cargo +nightly miri test miri_

  kani:
    name: kani
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: model-checking/kani-github-action@v1

  coverage:
    name: coverage
    runs-on: ubuntu-latest
    needs: check
    steps:
      - uses: actions/checkout@v5
      - uses: DeterminateSystems/nix-installer-action@v16
      - uses: nix-community/cache-nix-action@v6
        with:
          primary-key: nix-${{ runner.os }}-${{ hashFiles('flake.lock', '**/Cargo.lock') }}
          restore-prefixes-first-match: nix-${{ runner.os }}-
      - name: cargo llvm-cov
        run: nix develop --command cargo llvm-cov --all-features --lcov --output-path lcov.info
      # uploading is best-effort: a missing CODECOV_TOKEN (or codecov outage)
      # should not fail the build, since coverage was still generated above.
      - uses: codecov/codecov-action@v5
        continue-on-error: true
        with:
          files: lcov.info
          fail_ci_if_error: false
          token: ${{ secrets.CODECOV_TOKEN }}