stripack-sys 0.1.2

Raw Rust FFI bindings to STRIPACK for Delaunay triangulation on the unit sphere
Documentation
name: Run Tests
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    name: Code Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
      - name: Check Formatting
        run: cargo fmt --check
      - name: Check Clippy
        run: cargo clippy -- -D warnings
      - name: Check Documentation
        run: cargo doc --no-deps

  test:
    name: Test (${{ matrix.name }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: Linux x86_64
            os: ubuntu-latest
            fortran: gfortran

          - name: macOS Apple Silicon
            os: macos-14
            fortran: gcc

          - name: Windows MinGW
            os: windows-latest
            fortran: mingw-w64

    steps:
      - uses: actions/checkout@v4

      - name: Setup Fortran
        uses: fortran-lang/setup-fortran@v1
        with:
          compiler: gcc

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable

      - name: (Windows) Set to GNU toolchain
        if: matrix.os == 'windows-latest'
        run: |
          rustup target add x86_64-pc-windows-gnu
          rustup default stable-x86_64-pc-windows-gnu

      - name: Install cargo-nextest
        uses: taiki-e/install-action@cargo-nextest
        env:
          PROPTEST_CASES: 1000

      - name: Install cargo-llvm-cov
        uses: taiki-e/install-action@cargo-llvm-cov

      - name: Build
        run: cargo build --verbose

      - name: Test
        run: cargo nextest run

      - name: Upload proptest regresions on failure
        if: failure()
        uses: actions/upload-artifact@v4
        with:
          name: proptest-regressions-${{ matrix.name }}
          path: proptest-regressions/

      - name: Generate coverage
        if: matrix.os == 'ubuntu-latest'
        run: cargo llvm-cov --lcov --output-path lcov.info

      - name: Upload coverage
        uses: codecov/codecov-action@v3
        if: matrix.os == 'ubuntu-latest'
        with:
          files: lcov.info
          fail_ci_if_error: true
          verbose: true
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}