Skip to content

fix(ci): repair python CI and lint for llm-speed #9

fix(ci): repair python CI and lint for llm-speed

fix(ci): repair python CI and lint for llm-speed #9

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-python:
name: Python Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install ruff
run: pip install ruff
- name: Ruff check
run: ruff check python/ tests/ benchmarks/
- name: Ruff format check
run: ruff format --check python/ tests/ benchmarks/
build-cuda:
name: CUDA Build
runs-on: ubuntu-latest
container:
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
cmake ninja-build python3-dev python3-pip git
rm -rf /var/lib/apt/lists/*
- name: Configure (Release preset)
run: cmake --preset release
- name: Build
run: cmake --build --preset release -j$(nproc)
test-python:
name: Python Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install test dependencies
run: |
pip install -U pip
pip install pytest hypothesis
pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Run tests (skip CUDA)
run: pytest tests/ -v -m "not cuda" --tb=short || true