floating-distance 0.3.1

Measure distance between floating-point vectors in Rust
Documentation
name: Main

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always
  CARGO_NET_GIT_FETCH_WITH_CLI: true

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Install Rust toolchain v1.60.0
      uses: actions-rs/toolchain@v1
      with:
        toolchain: 1.60.0

    - name: Install Rust toolchain nightly
      uses: actions-rs/toolchain@v1
      with:
        toolchain: nightly

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

    - name: Check compilation
      run: cargo +1.60.0 check

    - name: Check compilation (--features=simd)
      run: >
        cargo +nightly -Zgitoxide check
        --features=simd

    - name: Check compilation (--examples=default)
      run: >
        cargo +1.60.0 check
        --example=default

    - name: Check compilation (--package=benchmarks-no-simd)
      run: >
        cargo +nightly -Zgitoxide check
        --package=benchmarks-no-simd

    - name: Check compilation (--package=benchmarks-simd)
      run: >
        cargo +nightly -Zgitoxide check
        --package=benchmarks-simd

    - name: Run doc-tests
      run: >
        cargo +nightly -Zgitoxide test
        --doc

    - name: Run doc-tests (--features=simd)
      run: >
        cargo +nightly -Zgitoxide test
        --doc --features=simd

    - name: Run tests
      run: >
        cargo +1.60.0 llvm-cov
        --lcov --output-path=target/llvm-cov-default.info

    - name: Run tests (--features=simd)
      run: >
        cargo +nightly -Zgitoxide llvm-cov
        --features=simd --lcov --output-path=target/llvm-cov-simd.info

    - name: Upload all coverage reports to Codecov
      uses: codecov/codecov-action@v3
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        files: >
          target/llvm-cov-default.info,
          target/llvm-cov-simd.info
        fail_ci_if_error: true
        verbose: true