Skip to content

Run CI on aarch64 and run clippy on all platforms (#117) #167

Run CI on aarch64 and run clippy on all platforms (#117)

Run CI on aarch64 and run clippy on all platforms (#117) #167

Workflow file for this run

name: Continuous integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
# Ensure the crate builds on x86
build_x86_64:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly]
features: ["+avx2", "+sse2"]
env:
RUSTFLAGS: "-C target-feature=${{matrix.features}} -D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-unknown-linux-gnu
toolchain: ${{ matrix.rust }}
components: clippy
- name: Tests (x86_64)
run: |
cargo clippy &&
cargo test -v --no-default-features --tests --lib &&
cargo build --verbose --features "$FEATURES" &&
cargo test --verbose --features "$FEATURES" &&
cargo test --verbose --release --features "$FEATURES"
# Ensure the crate builds on x86
build_MSRV:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.56.0]
features: ["+avx2", "+sse2"]
env:
RUSTFLAGS: "-C target-feature=${{matrix.features}}"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-unknown-linux-gnu
toolchain: ${{ matrix.rust }}
components: clippy
- name: Tests (x86_64)
run: |
cargo clippy &&
cargo test -v --no-default-features --tests --lib &&
cargo build --verbose --features "$FEATURES" &&
cargo test --verbose --features "$FEATURES" &&
cargo test --verbose --release --features "$FEATURES"
# Ensure the crate builds on ARM
build_aarch64:
runs-on: macos-14
strategy:
matrix:
rust: [stable, nightly]
features: ["+neon", "-neon"]
env:
RUSTFLAGS: "-C target-feature=${{matrix.features}} -D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: aarch64-apple-darwin
toolchain: ${{ matrix.rust }}
components: clippy
- name: Tests (aarch64)
run: |
cargo clippy &&
cargo test -v --no-default-features --tests --lib &&
cargo build --verbose --features "$FEATURES" &&
cargo test --verbose --features "$FEATURES" &&
cargo test --verbose --release --features "$FEATURES"
# Enforce rustfmt formatting
formatting:
runs-on: ubuntu-latest
strategy:
matrix:
# Run formatting checks only on stable
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
- name: Run Clippy
run: |
cargo fmt --all --check
# Ensure the benchmarks compile
benchmark_compiles:
runs-on: ubuntu-latest
strategy:
matrix:
# Check builds only on stable
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: clippy
- name: Run Clippy
run: |
cd benches
cargo bench --bench benches --no-run
build-wasm:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown
- name: Check wasm
run: cargo check --target wasm32-unknown-unknown
miri:
runs-on: ubuntu-latest
strategy:
matrix:
# Check builds only on nightly
rust: [nightly]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: miri
- name: Run miri
run: cargo miri test