lling-llang 0.1.0

WFST framework for text normalization and grammar correction
name: ci

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

env:
  CARGO_TERM_COLOR: always

jobs:
  rust:
    name: Rust
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt

      - name: Cache cargo registry and build outputs
        uses: Swatinem/rust-cache@v2

      - name: Format
        run: cargo fmt --all -- --check

      - name: Check
        run: cargo check --all-features --all-targets

      # Use --no-deps so warnings in vendored workspace dependencies
      # (PathMap, libdictenstein, ...) don't gate this crate's CI.
      - name: Clippy
        run: cargo clippy --all-features --all-targets --no-deps -- -D warnings

      - name: Test
        run: cargo test --all-features

  proofs:
    name: Rocq and TLA+
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install proof tools
        run: |
          sudo apt-get update
          sudo apt-get install -y coq default-jre-headless curl
          curl -fsSL \
            -o "$RUNNER_TEMP/tla2tools.jar" \
            https://downloads.sourceforge.net/project/tlaplus.mirror/v1.7.4/tla2tools.jar
          echo "TLA2TOOLS_JAR=$RUNNER_TEMP/tla2tools.jar" >> "$GITHUB_ENV"

      - name: Verify proofs and finite models
        run: make verify-proofs