polyzonotope 0.2.0

Sparse polynomial zonotopes, zonotopes and interval boxes for set-based reachability analysis
Documentation
# Keep in sync with `task ci` in the Taskfile. Job `name:`s are the required status checks.
# Actions are pinned to commit SHAs; Dependabot keeps the SHAs and their version comments current.
name: CI

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

permissions: {}

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
  CARGO_TERM_COLOR: always
  NEXTEST_NO_TESTS: warn

jobs:
  branch:
    name: branch name
    # Runs on PRs and merge queues (detached HEAD passes) so it can be a required check.
    if: github.event_name != 'push'
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      # The second argument is the branching model; keep it equal to BRANCH_FLOW in the Taskfile.
      - run: sh scripts/check-branch.sh "$HEAD_REF" github
        env:
          HEAD_REF: ${{ github.head_ref }}

  fmt:
    name: rustfmt
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
          components: rustfmt
      - run: cargo fmt --all --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
          components: clippy
      - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
      - run: cargo clippy --workspace --all-targets --all-features -- -D warnings

  style:
    name: style (separators, README links, typos, mermaid)
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - name: No `// ----` separator comments
        run: "! grep -rnE --include='*.rs' --exclude-dir=target --exclude-dir=.git '^[[:space:]]*//+[[:space:]]*[-=*#~_/]{4,}' ."
      - name: Absolute URLs in README files
        run: "! grep -rnoE --include='README.md' --exclude-dir=target --exclude-dir=.git --exclude-dir=review '(\\]\\(|src=\")[^)\"]*' . | grep -vE ':(\\]\\(|src=\")(https?://|#|mailto:)'"
      - name: Typos
        uses: crate-ci/typos@276087d9a4f06398b3e04825487805e2d7375888 # v1.52.2
      - name: Mermaid diagrams render
        run: python3 scripts/lint-mermaid.py
        env:
          MMDC: npx --yes @mermaid-js/mermaid-cli@12.2.0
          MMDC_NO_SANDBOX: "1"

  doc:
    name: rustdoc
    runs-on: ubuntu-latest
    permissions:
      contents: read
    env:
      RUSTDOCFLAGS: -D warnings --html-in-header ${{ github.workspace }}/docs/mermaid.html
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
      - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
      - run: cargo doc --workspace --all-features --no-deps --document-private-items

  test:
    name: test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    permissions:
      contents: read
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
      - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
      - uses: taiki-e/install-action@75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f # v2.90.6
        with:
          tool: cargo-nextest
      - run: cargo nextest run --workspace --all-features
      # Remove for binary-only crates (no library target, no doctests).
      - run: cargo test --workspace --all-features --doc

  coverage:
    name: coverage
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
          components: llvm-tools-preview
      - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
      - uses: taiki-e/install-action@75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f # v2.90.6
        with:
          tool: cargo-llvm-cov,cargo-nextest
      - run: cargo llvm-cov nextest --workspace --all-features --lcov --output-path lcov.info
      - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
        with:
          files: lcov.info
          fail_ci_if_error: true
          # OIDC everywhere except fork PRs, which get no id-token and upload tokenless instead.
          use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}

  deny:
    name: cargo-deny
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: EmbarkStudios/cargo-deny-action@17aeb3c839e42274e2b8adf721c8c65edfdc74dd # v2.1.3
        with:
          command: check
          arguments: --all-features

  no-std:
    name: no_std
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
          targets: thumbv7em-none-eabihf,thumbv6m-none-eabi
      - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
      # Exercises the repeated-squaring powers that replace f64::powi without std.
      - run: cargo test --workspace --no-default-features
      # Cortex-M4: no 64-bit atomics, so portable-atomic's lock-based fallback provides AtomicU64.
      - run: cargo build --no-default-features --target thumbv7em-none-eabihf
      # Cortex-M0: no atomic read-modify-write at all, so portable-atomic needs a critical section.
      - run: cargo build --no-default-features --features portable-atomic/critical-section --target thumbv6m-none-eabi

  msrv:
    name: MSRV
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
        with:
          toolchain: stable
      - uses: taiki-e/install-action@75a7c0f87bd666af3cdb75c5b9e9d03ab6044e6f # v2.90.6
        with:
          tool: cargo-hack
      - run: cargo hack check --rust-version --workspace --all-targets --ignore-private

  semver:
    name: semver
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: obi1kenobi/cargo-semver-checks-action@6b69fcf40e9b5fb17adeb57e4b6ecd020649a239 # v2.9