elementary-row-operation-verifier 0.0.1

A tool to verify the correctness of elementary row operations on matrices
Documentation
name: CI/CD

on:
  push:
    branches: [main]
    paths:
      - "docs/**"
      - "src/**"
      - "Cargo.*"
      - ".github/**"
    tags: ["v*"]
  pull_request:
    branches: [main]

jobs:
  # ---- docs → gh-pages (only when docs/ changed) ----
  docs:
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check docs changes
        id: docs_changed
        uses: tj-actions/changed-files@v44
        with:
          files: docs/**
      - uses: peaceiris/actions-gh-pages@v4
        if: steps.docs_changed.outputs.any_changed == 'true'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs

  # ---- crate publish ----
  publish:
    if: startsWith(github.ref, 'refs/tags/v')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}

  # ---- binary releases ----
  release:
    if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
    strategy:
      matrix:
        include:
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-apple-darwin
            os: macos-latest
          - target: aarch64-apple-darwin
            os: macos-latest
          - target: x86_64-pc-windows-msvc
            os: windows-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/upload-rust-binary-action@v1
        with:
          bin: elementary-row-operation-verifier
          target: ${{ matrix.target }}
          token: ${{ secrets.GITHUB_TOKEN }}