caexfer 0.1.2

Transfer linear finite-element meshes and results across CAE formats
Documentation
name: CI
# Exercise supported platforms and the minimum Rust version on every change.
on:
  push:
  pull_request:
  workflow_dispatch:
permissions:
  contents: read
env:
  CARGO_TERM_COLOR: always
jobs:
  test:
    strategy:
      fail-fast: false
      # The stable matrix covers platform differences; Rust 1.86 checks MSRV.
      matrix:
        include:
          - { os: ubuntu-latest, rust: stable }
          - { os: macos-latest, rust: stable }
          - { os: windows-latest, rust: stable }
          - { os: ubuntu-latest, rust: '1.86.0' }
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - name: Install toolchain
        run: rustup toolchain install ${{ matrix.rust }} --profile minimal --component clippy,rustfmt
      - name: Select toolchain
        run: rustup override set ${{ matrix.rust }}
      - name: Fetch Rust dependencies
        run: cargo fetch
      - name: Check formatting
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: cargo fmt --all -- --check
      - name: Test library, CLI, and examples
        run: cargo test --all-targets --offline
      - name: Test doctests
        run: cargo test --doc --offline
      # Cargo.toml enables clippy::pedantic for every Rust target.
      - name: Clippy (pedantic)
        run: cargo clippy --all-targets --offline -- -D warnings
      - name: Documentation
        env:
          RUSTDOCFLAGS: -D warnings
        run: cargo doc --no-deps --offline
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Check README diagram XML
        run: python -c "from xml.etree import ElementTree; ElementTree.parse('assets/conversion-flow.svg')"
      - name: Verify Cargo package
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: cargo package --offline
      # Independent tools check the CLI output, beyond Rust unit tests.
      - name: Build CLI for interoperability checks
        run: cargo build --offline
      - name: Install Gmsh for MSH import gate
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: sudo apt-get update -qq && sudo apt-get install -y -qq gmsh
      - name: Check MSH output with Gmsh
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        env:
          CAEXFER_GMSH: gmsh
        run: |
          cargo test --lib formats::msh::interop_tests --offline
          cargo test --test unv_interop --offline
      - name: Execute independent CLI interoperability checks
        run: python scripts/check_interop.py
      - name: Check core conversion matrix
        run: python scripts/check_matrix.py
      - name: Install VTK for independent legacy-format checks
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: python -m pip install vtk==9.6.1
      - name: Check legacy VTK with VTK reader and writer
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: python scripts/check_vtk.py
      # pyNastran independently reads Rust-written OP2 only on stable Linux.
      - name: Install pyNastran for OP2 interoperability
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: python -m pip install pyNastran==1.4.1
      - name: Check OP2 conversion matrix
        if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
        run: python scripts/check_matrix.py --op2-check