core-math-sys 1.2.0

Generate bindings to CORE-MATH
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        submodules: recursive
    - name: Run tests
      run: cargo test --verbose

  msrv:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
      with:
        submodules: recursive
    - name: Install Rust 1.85
      run: rustup toolchain install 1.85 --profile minimal
    - name: Run tests with MSRV
      run: cargo +1.85 test --verbose

  # f16 needs GCC 12+ or Clang 17+ (binary16 sources use _Float16 and
  # __builtin_roundeven); f128 needs GCC 14+ or Clang 15+ (binary128
  # sources use __builtin_addcl). Both need nightly Rust for the unstable
  # f16/f128 primitives. ubuntu-24.04 ships gcc 13, clang 18.
  features:
    runs-on: ubuntu-24.04
    strategy:
      fail-fast: false
      matrix:
        include:
          - { features: f16,        cc: gcc }
          - { features: "f16,f128", cc: clang }
    steps:
    - uses: actions/checkout@v4
      with:
        submodules: recursive
    - name: Install nightly
      run: rustup toolchain install nightly --profile minimal
    - name: Run tests
      run: cargo +nightly test --features "${{ matrix.features }}" --verbose
      env:
        CC: ${{ matrix.cc }}