name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-features
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nightly + Miri
run: |
rustup toolchain install nightly --component miri
rustup run nightly cargo miri setup
- name: Run Miri tests (no SIMD/mmap — Miri incompatibility)
run: rustup run nightly cargo miri test --no-default-features --features "f16,parallel,gzip"
fedora:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Clippy
run: cargo clippy --all-features