name: Verify
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ${{ matrix.rust.os }}
env:
RUSTFLAGS: -D warnings
strategy:
matrix:
rust:
- { target: i686-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: aarch64-apple-darwin, os: macos-latest }
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
target: ${{ matrix.rust.target }}
components: clippy
- uses: Swatinem/rust-cache@master
- name: Clippy
run: cargo clippy --all-targets --target ${{ matrix.rust.target }}
- name: Clippy with Libm
run: cargo clippy --all-targets --features libm --target ${{ matrix.rust.target }}
- name: Clippy with optional dependencies
run: cargo clippy --all-targets --features "bytemuck fixed mint num-primitive rand serde wide" --target ${{ matrix.rust.target }}
- name: Clippy with Libm and optional dependencies
run: cargo clippy --all-targets --all-features --target ${{ matrix.rust.target }}
test:
runs-on: ${{ matrix.rust.os }}
env:
RUSTFLAGS: -D warnings ${{ matrix.command.rustflags }}
strategy:
matrix:
rust:
- { target: i686-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: aarch64-apple-darwin, os: macos-latest }
command:
- rustflags: -C debug-assertions=off -C overflow-checks=off
args: --features "bytemuck fixed mint num-primitive rand serde wide"
- rustflags: -C debug-assertions=on -C overflow-checks=on
args: --all-features
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
target: ${{ matrix.rust.target }}
components: clippy
- uses: Swatinem/rust-cache@master
- name: Cargo Test
run: cargo test ${{ matrix.command.args }} --target ${{ matrix.rust.target }}
test_sse4:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings -C target-feature=+sse4.1,+sse4.2,+ssse3 -C debug-assertions=off -C overflow-checks=off
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.95.0"
target: x86_64-unknown-linux-gnu
components: clippy
- uses: Swatinem/rust-cache@master
- name: Cargo Test
env:
RUSTFLAGS: -D warnings ${{ matrix.command.rustflags }}
run: cargo test --target x86_64-unknown-linux-gnu
fmt_and_doc:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.95.0
components: rustfmt
- uses: Swatinem/rust-cache@master
- name: Cargo Fmt
run: cargo fmt --check --all
- name: Doc
run: cargo doc --no-deps
- name: Doc with optional dependencies
run: cargo doc --no-deps --features "bytemuck fixed mint num-primitive rand serde wide"