name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install GMP and MPFR (MPFR oracle for the ULP tests)
run: sudo apt-get update && sudo apt-get install -y libgmp-dev libmpfr-dev m4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --check
- name: Clippy (default features)
run: cargo clippy -j 16 --all-targets -- -D warnings
- name: Clippy (no default features)
run: cargo clippy -j 16 --all-targets --no-default-features -- -D warnings
- name: Test (default features)
run: cargo test -j 16 --release
- name: Test (no default features)
run: cargo test -j 16 --no-default-features
- name: Documentation
run: cargo doc -j 16 --no-deps