name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: "MSRV (1.88)"
toolchain: "1.88"
- name: "Stable"
toolchain: "stable"
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
- name: Build (no default features — CPU only on CI)
run: cargo build --no-default-features --features transformer
- name: Clippy (pedantic)
run: cargo clippy --no-default-features --features transformer -- -W clippy::pedantic
- name: Tests
run: cargo test --no-default-features --features transformer
- name: Build (RWKV)
run: cargo build --no-default-features --features "rwkv,rwkv-tokenizer"
- name: Clippy (RWKV, pedantic)
run: cargo clippy --no-default-features --features "rwkv,rwkv-tokenizer" -- -W clippy::pedantic
- name: Tests (RWKV)
run: cargo test --no-default-features --features "rwkv,rwkv-tokenizer"
- name: Build (Stoicheia)
run: cargo build --no-default-features --features stoicheia
- name: Clippy (Stoicheia, pedantic)
run: cargo clippy --no-default-features --features stoicheia -- -W clippy::pedantic
- name: Tests (Stoicheia)
run: cargo test --no-default-features --features stoicheia --lib --test stoicheia_analysis --test validate_stoicheia
- name: Build (CLT)
run: cargo build --no-default-features --features "clt,transformer"
- name: Clippy (CLT, pedantic)
run: cargo clippy --no-default-features --features "clt,transformer" -- -W clippy::pedantic
- name: Tests (CLT)
run: cargo test --no-default-features --features "clt,transformer" --lib
- name: Build (no default features)
run: cargo build --no-default-features
- name: Build (all software features)
run: cargo build --no-default-features --features "transformer,rwkv,rwkv-tokenizer,clt,sae,stoicheia,probing"