mathlex 0.4.1

Mathematical expression parser for LaTeX and plain text notation, producing a language-agnostic AST
Documentation
name: Swift CI

on:
  push:
    branches:
      - main
      - dev
  pull_request:
    branches:
      - main

jobs:
  swift-build:
    name: Swift Package Build
    runs-on: macos-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v5

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          targets: aarch64-apple-darwin,x86_64-apple-darwin

      - name: Cache Cargo dependencies
        uses: Swatinem/rust-cache@v2

      - name: Build Rust library with FFI and serde
        run: cargo build --release --features "ffi,serde"

      - name: Update generated Swift bridge files
        run: |
          cp generated/SwiftBridgeCore.h Sources/MathLexBridge/include/
          cp generated/mathlex/mathlex.h Sources/MathLexBridge/include/

      - name: Build Swift package
        run: swift build

      - name: Run Swift tests
        run: swift test