analyssa 0.4.1

Target-agnostic SSA IR, analyses, and optimization pipeline
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust: [stable, "1.88"]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
      # Run both ways: the default build must stay serde-free, and the feature
      # must actually be exercised on every supported toolchain.
      - run: cargo test
      - run: cargo test --all-features

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    strategy:
      matrix:
        # The MSRV is a supported configuration, so it must lint clean too — a
        # stable-only clippy job lets a 1.88 break land silently.
        rust: [stable, "1.88"]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
          components: clippy
      - run: cargo clippy --all-targets --all-features -- -D warnings

  deny:
    name: Advisories and licences
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: taiki-e/install-action@cargo-deny
      # Without this, a RUSTSEC advisory against dashmap, rayon, boxcar or
      # num_enum would never surface here.
      - run: cargo deny check

  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
        with:
          components: rustfmt
      - run: cargo fmt --check

  doc:
    name: Docs
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo doc --no-deps --all-features --document-private-items
        env:
          RUSTDOCFLAGS: -D warnings -D missing-docs

  doctest:
    name: Doctests
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo test --doc --all-features
        env:
          RUSTDOCFLAGS: -D warnings

  # Fuzzing is deliberately not a CI job. Coverage-guided fuzzing only pays off
  # with an accumulated corpus, and a runner starts from an empty one every
  # time — a cold 60s campaign is little more than random input, at the cost of
  # a full ASan build per push. Fuzz locally instead:
  #
  #   cargo +nightly fuzz run --target x86_64-unknown-linux-gnu <validate|pipeline>
  #
  # --target is explicit because cargo-fuzz defaults to the triple it was itself
  # built for rather than the host, which breaks under a musl-built cargo-fuzz.

  coverage:
    name: Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview
      - uses: taiki-e/install-action@cargo-llvm-cov
      - run: cargo llvm-cov --all-targets --all-features --fail-under-lines 70 --summary-only