1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: CI
on:
push:
branches:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
# ── test matrix ──────────────────────────────────────────────────────────────
#
# Four platforms covering distinct SIMD stories:
# ubuntu-latest → x86_64 Linux (SSE2 / SSSE3 / AVX2)
# ubuntu-24.04-arm → AArch64 Linux (NEON)
# macos-latest → AArch64 macOS (NEON — Apple Silicon)
# windows-latest → x86_64 Windows (SSE2 / SSSE3 / AVX2)
test:
name: test / ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# ── feature matrix ──────────────────────────────────────────────────────
- name: Test — default features (scalar path)
run: cargo test
- name: Test — simd-auto (runtime detection, best available path)
run: cargo test --features simd-auto
# x86_64 only: forced compile-time SIMD paths
- name: Test — simd-ssse3 (forced SSSE3)
if: runner.arch == 'X64'
run: cargo test --features simd-ssse3
- name: Test — simd-avx2 (forced AVX2)
if: runner.arch == 'X64'
run: cargo test --features simd-avx2
# AArch64 only: forced NEON path
- name: Test — simd-neon (forced NEON)
if: runner.arch == 'ARM64'
run: cargo test --features simd-neon
# no_std + alloc: all platforms
- name: Test — no_std + alloc
run: cargo test --no-default-features --features alloc
# ── lint ─────────────────────────────────────────────────────────────────────
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: fmt
run: cargo fmt --check
# simd-auto activates all SIMD code paths so clippy sees everything.
- name: clippy
run: cargo clippy --features simd-auto -- -D clippy::all
# ── MSRV ─────────────────────────────────────────────────────────────────────
msrv:
name: MSRV (1.87.0)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.87.0
- uses: Swatinem/rust-cache@v2
- name: Test — default features
run: cargo test
- name: Test — simd-auto
run: cargo test --features simd-auto