Skip to content

Modernize CI

Modernize CI #282

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: clippy
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
build-and-test-no-simd:
name: CI with ${{ matrix.rust }} on ${{ matrix.os }} [no SIMD]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, nightly]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: cargo build
run: cargo build
- name: cargo test
run: cargo test
- name: Upload coverage report to codecov.io
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
build-and-test-simd:
name: CI with nightly on ${{ matrix.os }} [SIMD]
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Had to remove macos-latest, not sure why that is failing.
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: cargo build
run: cargo build --features simd
- name: cargo test
run: cargo test --features simd