Skip to content

fix: compute binomial and multinomial coefficients exactly #863

fix: compute binomial and multinomial coefficients exactly

fix: compute binomial and multinomial coefficients exactly #863

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable with clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run cargo clippy (default features)
run: cargo clippy --all-targets
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable with rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run rustfmt --check
run: cargo fmt -- --check
msrv:
needs: [clippy, fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Use predefined lockfile
run: mv -v Cargo.lock.MSRV Cargo.lock
- name: Build (lib only)
run: cargo hack check --rust-version --locked
test:
needs: [clippy, fmt]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Test default features
run: cargo test
no-std:
needs: [clippy, fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable with bare-metal target
uses: dtolnay/rust-toolchain@stable
with:
targets: riscv32imac-unknown-none-elf
- uses: Swatinem/rust-cache@v2
- name: Check no_std core
run: cargo check --target riscv32imac-unknown-none-elf --no-default-features --lib
- name: Check no_std with rand
run: cargo check --target riscv32imac-unknown-none-elf --no-default-features --features rand --lib
- name: Check no_std with nalgebra
run: cargo check --target riscv32imac-unknown-none-elf --no-default-features --features nalgebra --lib
- name: Check no_std with nalgebra and rand
run: cargo check --target riscv32imac-unknown-none-elf --no-default-features --features nalgebra,rand --lib
features:
needs: [clippy, fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Check all possible feature sets
run: cargo hack check --feature-powerset --no-dev-deps
wasm:
needs: [clippy, fmt]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust stable with WebAssembly targets
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown, wasm32-wasip1
- name: Install Wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "46.0.1"
- name: Build no_std runtime verification
run: cargo build --manifest-path tests/no_std/Cargo.toml --target wasm32-unknown-unknown
- name: Run no_std calculations
run: wasmtime run --invoke verify tests/no_std/target/wasm32-unknown-unknown/debug/statrs_no_std_runtime.wasm
- name: Check WebAssembly without a host RNG
run: cargo check --target wasm32-unknown-unknown --no-default-features --features std,nalgebra,rand --lib
- name: Check WASI without a host RNG
run: cargo check --target wasm32-wasip1 --no-default-features --features std,nalgebra,rand --lib