mantaray 0.2.0

Ray-tracing solver for ocean surface gravity waves that integrates the wave ray equations over spatially varying currents and bathymetry.
Documentation
name: Rust checks

on:
  push:
    branches: [ "main" ]
  pull_request:
  schedule:
    - cron: '0 5 * * 5'

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v6

      - uses: prefix-dev/setup-pixi@v0.9.3
        with:
          pixi-version: v0.57.0
          cache: true
          frozen: true

      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}

      - name: Run cargo check
        run: |
          pixi run --frozen cargo check --workspace

  test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        build: [beta, stable, windows, macos]
        include:
          - build: macos
            os: macos-latest
            rust: stable
          - build: windows
            os: windows-latest
            rust: stable
          - build: beta
            os: ubuntu-latest
            rust: beta
          - build: stable
            os: ubuntu-latest
            rust: stable
    steps:
      - uses: actions/checkout@v6

      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          override: true

      - uses: prefix-dev/setup-pixi@v0.9.3
        with:
          pixi-version: v0.57.0
          cache: true
          frozen: true

      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}

      - name: Run tests
        run: |
          pixi run --frozen cargo test --no-fail-fast

  publish:
    name: Publish (dry-run)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v6

      - uses: prefix-dev/setup-pixi@v0.9.3
        with:
          pixi-version: v0.57.0
          cache: true
          frozen: true

      - uses: Swatinem/rust-cache@v2
        with:
          save-if: ${{ github.ref == 'refs/heads/main' }}

      - name: Make sure we can publish
        run: |
          pixi run --frozen cargo publish --dry-run