Skip to content

fix(core): skip prefill for sequences with no tokens to process #121

fix(core): skip prefill for sequences with no tokens to process

fix(core): skip prefill for sequences with no tokens to process #121

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
# Disable CUDA in CI (GitHub runners don't have GPU)
CANDLE_NATIVE_BACKEND: 1
jobs:
# Check formatting and linting
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace -- -D warnings
- name: Check dependencies
run: cargo audit || true
# Build and test
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build (CPU only, no GPU required)
run: |
# Build without CUDA features to avoid GPU-dependent downloads in CI
cargo build --workspace --no-default-features
# Also build with default features (may fail on no-GPU runners)
cargo build --workspace || true
- name: Test
run: cargo test --workspace
- name: Test (with output)
run: cargo test --workspace -- --nocapture
# Build documentation
docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build docs
run: cargo doc --workspace --no-deps
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
# Test on stable and beta
matrix-test:
name: Matrix Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [stable, beta]
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build (CPU only)
run: cargo build --workspace --no-default-features
- name: Test
run: cargo test --workspace
# Security audit
security:
name: Security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run security audit
run: |
cargo install cargo-audit || true
cargo audit || true