Skip to content

feat: use vLLM prompt_tokens_details.cached_tokens for accurate PP #1444

feat: use vLLM prompt_tokens_details.cached_tokens for accurate PP

feat: use vLLM prompt_tokens_details.cached_tokens for accurate PP #1444

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install system dependencies (libclang for TTS native deps, mold linker)
run: sudo apt-get update && sudo apt-get install -y libclang-dev mold
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/cache
~/.cargo/git/db
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-registry-
- name: Cache sccache
uses: actions/cache@v4
with:
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-${{ github.run_id }}
restore-keys: ${{ runner.os }}-sccache-
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Install trunk
uses: jetli/trunk-action@v0.5.0
with:
version: latest
- name: Format check
run: cargo fmt --all --check
- name: Check for Windows cfg code
run: |
if grep -rP '#\s*\[\s*cfg\s*\(\s*target_os\s*=\s*"windows"' crates/ --include='*.rs'; then
echo "ERROR: Found #[cfg(target_os = \"windows\")] attribute. Windows support has been removed."
exit 1
fi
- name: Build Leptos WASM frontend
working-directory: crates/tama
run: trunk build --no-default-features --features csr
- name: Clippy (workspace)
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Clippy (tama SSR)
run: cargo clippy --package tama --features ssr --all-targets -- -D warnings
- name: Run tests (workspace)
env:
RUSTC_WRAPPER: sccache
run: cargo nextest run --workspace
- name: Run sccache stats
run: sccache --show-stats