Skip to content

Fix non-x86(_64) builds #142

Fix non-x86(_64) builds

Fix non-x86(_64) builds #142

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
build_x86_64:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.56.0, stable, nightly]
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
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Tests (x86_64)
run: |
cargo test -v --no-default-features --tests --lib &&
cargo build --verbose --features "$FEATURES" &&
cargo test --verbose --features "$FEATURES" &&
cargo test --verbose --release --features "$FEATURES"
build_aarch64:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.56.0, stable, nightly]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: aarch64-unknown-linux-gnu
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Tests (aarch64)
run: cargo check --target aarch64-unknown-linux-gnu
# Use clippy to lint for code smells
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
# Run Clippy only on stable
rust: [stable]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: clippy
override: true
- name: Run Clippy
run: |
cargo clippy
# 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:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- 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:
profile: minimal
toolchain: ${{ matrix.rust }}
components: clippy
override: true
- 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