Skip to content

crc-fast-rust: fmt fix #3

crc-fast-rust: fmt fix

crc-fast-rust: fmt fix #3

Workflow file for this run

name: Tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
test-aarch64:
name: Test aarch64
strategy:
matrix:
os: [ubuntu-22.04-arm, ubuntu-24.04-arm, macos-14, macos-15, macos-26, macos-latest, windows-11-arm]
rust-toolchain:
- "1.81" # minimum for this crate
- "1.89" # when AVX-512 VPCLMULQDQ was stabilized
- "stable"
- "nightly"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # not pinning to commit hash since this is a GitHub action, which we trust
- uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
cache-key: ${{ matrix.os }}-${{ matrix.rust-toolchain }}
- name: Check
run: cargo check --all-features
- name: Architecture check
run: cargo run --features cli --bin arch-check
- if: ${{ matrix.rust-toolchain != 'nightly' }}
name: Format
run: cargo fmt -- --check
- if: ${{ matrix.rust-toolchain != 'nightly' }}
name: Clippy
run: cargo clippy --all-features
- name: Test
run: cargo test --features cli
test-x86_64:
name: Test x86_64
strategy:
matrix:
os: [ ubuntu-latest, ubuntu-22.04, ubuntu-24.04, macos-13, macos-15-intel, windows-2022, windows-2025, windows-latest ]
rust-toolchain:
- "1.81" # minimum for this crate
- "1.89" # when AVX-512 VPCLMULQDQ was stabilized
- "stable"
- "nightly"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # not pinning to commit hash since this is a GitHub action, which we trust
- uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
cache-key: ${{ matrix.os }}-${{ matrix.rust-toolchain }}
- name: Check
run: cargo check --all-features
- name: Architecture check
run: cargo run --features cli --bin arch-check
- if: ${{ matrix.rust-toolchain != 'nightly' }}
name: Format
run: cargo fmt -- --check
- if: ${{ matrix.rust-toolchain != 'nightly' }}
name: Clippy
run: cargo clippy --all-features
- name: Test
run: cargo test --features cli
test-x86:
name: Test x86
runs-on: ubuntu-latest
strategy:
matrix:
target: [i586-unknown-linux-gnu, i686-unknown-linux-gnu]
rust-toolchain:
- "1.81" # minimum for this crate
- "1.89" # when AVX-512 VPCLMULQDQ was stabilized
- "stable"
- "nightly"
steps:
- uses: actions/checkout@v4 # not pinning to commit hash since this is a GitHub action, which we trust
- uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
- name: Set up cross
run: cargo install cross --locked --version 0.2.5
- name: Check
run: cross check --all-features --target ${{ matrix.target }}
- name: Architecture check
run: cross run --features cli --bin arch-check --target ${{ matrix.target }}
- name: Test
run: cross test --features cli --target ${{ matrix.target }}
test-software:
name: Test software fallback
runs-on: ubuntu-latest
strategy:
matrix:
target: [powerpc-unknown-linux-gnu, powerpc64-unknown-linux-gnu]
rust-toolchain:
- "1.81" # minimum for this crate
- "1.89" # when AVX-512 VPCLMULQDQ was stabilized
- "stable"
- "nightly"
steps:
- uses: actions/checkout@v4 # not pinning to commit hash since this is a GitHub action, which we trust
- uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
- name: Set up cross
run: cargo install cross --locked --version 0.2.5
- name: Check
run: cross check --all-features --target ${{ matrix.target }}
- name: Architecture check
run: cross run --features cli --bin arch-check --target ${{ matrix.target }}
- name: Test
run: cross test --features cli --target ${{ matrix.target }}