hyalite 0.1.0

Exact, SIMD-accelerated sequence alignment (Smith-Waterman, Needleman-Wunsch, semi-global, overlap) with runtime CPU dispatch
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:

# Cancel superseded runs on the same ref.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: rustfmt + clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - name: rustfmt
        run: cargo fmt --all --check
      # `-- -D warnings` denies lints in *our* crate only; dependencies are built (not linted)
      # by clippy, so their warnings can't fail the build.
      - name: clippy
        run: cargo clippy --all-targets --all-features --locked -- -D warnings

  test:
    name: test (${{ matrix.os }}, backend=${{ matrix.backend }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # Run the whole suite on both x86-64 and aarch64. NEON is mandatory on aarch64, so the
        # ARM runner is load-bearing once the SIMD backends land.
        os: [ubuntu-latest, ubuntu-24.04-arm]
        # Force scalar for the whole suite. We deliberately do NOT add a matrix entry per SIMD
        # backend: forcing (say) HYALITE_BACKEND=avx2 globally would make every test that builds a
        # non-i8-eligible database fail with the (correct) BackendUnavailable error. Cross-backend
        # determinism is instead covered directly by the `scan_identical_across_simd_backends`
        # proptest, which forces each *available* SIMD backend only on eligible databases. The
        # aarch64 runner exercises NEON, and the x86-64 runner SSE4.1/AVX2, through that test.
        backend: [scalar]
    env:
      # Force the backend so a mismatch (e.g. the CPU lacks the forced ISA) fails loudly rather
      # than silently falling back. `HYALITE_BACKEND` is read at Database::build.
      HYALITE_BACKEND: ${{ matrix.backend }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      # Plain `cargo test` also runs doctests (which `--all-targets` would skip).
      - name: test
        run: cargo test --all-features --locked