Skip to content

test: repair three pre-existing failures under lane-select latching #130

test: repair three pre-existing failures under lane-select latching

test: repair three pre-existing failures under lane-select latching #130

Workflow file for this run

# gridbook CI -- no GPU runners exist, so this workflow proves exactly the
# things a GPU-less machine can prove, and says where it stops.
#
# What it gates:
# * the sdist contains every gridbook/csrc/*.cu | *.hpp in the checkout, and
# the wheel contains every one of them EXCEPT the declared sdist-only set
# (standalone developer binaries under csrc/tools/, and the pristine
# cutlass_fork/*_orig.hpp diff baselines). check_dist.py gates that split in
# both directions -- missing from the wheel is a broken install, present in
# the wheel is dead weight in every user's site-packages -- and
# tests/test_release_metadata.py re-checks it from inside the wheel that
# cpu-tests actually installs
# * a NON-EDITABLE install of the wheel resolves those sources from
# site-packages (the historical bug was repo-root `os.pardir` arithmetic,
# which resolved to <site-packages>/csrc; old releases then selected a
# Triton path, while the current runtime fails closed)
# * `import gridbook` needs no torch / vLLM or Triton package
# * the `vllm.general_plugins` entry point is discoverable and loadable
# * the GPU-free part of the test suite passes on every supported Python
#
# What it does NOT gate, and cannot here:
# * that the CUDA extension compiles. That needs nvcc; free GitHub runners
# have none. It is a MANUAL pre-tag gate -- the exact docker command is in
# docs/RELEASING.md and takes ~30 s. Steps 1-3 above pass happily on a
# wheel whose resolver is still wrong, so the manual gate is not optional.
# * the Dockerfile. Nothing here builds it -- hosted runners have no nvcc and
# the base image alone is ~32 GB on disk. Its manual gate is
# `bash scripts/verify-image.sh` (build + 10 run-time checks, no GPU); see
# docs/CONTAINER.md, "Keeping this image from rotting". Run it before
# tagging and whenever VLLM_TAG moves, or the image rots silently.
#
# Action pinning: actions are pinned to exact patch tags (latest releases
# checked 2026-07-28), never to a floating major like `@v7` and never to a
# branch. .github/dependabot.yml bumps them weekly so the pins do not rot.
# SHA pinning is stricter still (git tags are mutable) -- see docs/RELEASING.md.
name: CI
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build sdist + wheel
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-python@v7.0.0
with:
python-version: "3.12" # reference interpreter (matches vllm-node)
- name: Install build tooling
run: python -m pip install --upgrade pip build twine
# `python -m build` defaults to sdist-then-wheel-FROM-the-sdist, which is
# the property we want: if package-data / MANIFEST.in drop the .cu files,
# the wheel built from that sdist drops them too, and check_dist.py sees it.
- name: Build
run: python -m build
- name: twine check
run: python -m twine check --strict dist/*
- name: Assert native sources are packaged
run: python .github/scripts/check_dist.py dist .
- uses: actions/upload-artifact@v7.0.1
with:
name: dist
path: dist/
if-no-files-found: error
install:
name: install wheel (py${{ matrix.python }})
needs: build
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
# requires-python = ">=3.10". Nothing had ever executed this code on
# 3.10 or 3.11 before this workflow existed -- that floor was an
# assumption in published metadata, and this matrix is what turns it
# into a measurement. 3.14 stays out until torch ships wheels for it.
python: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-python@v7.0.0
with:
python-version: ${{ matrix.python }}
- uses: actions/download-artifact@v8.0.1
with:
name: dist
path: dist
# --no-deps on purpose: this job asserts the package imports and resolves
# its own packaged resources with NO torch / triton / vLLM present. The
# full dependency set is installed for real in the cpu-tests job below.
- name: Install the wheel (no deps)
run: python -m pip install --no-deps dist/*.whl
# Run from runner.temp, never the checkout: ./gridbook would shadow
# site-packages and the check would prove nothing (check_installed.py
# asserts this itself and fails loudly if it is ever run from the repo).
- name: Post-install checks
working-directory: ${{ runner.temp }}
run: python "${GITHUB_WORKSPACE}/.github/scripts/check_installed.py"
cpu-tests:
name: cpu tests (py${{ matrix.python }})
needs: build
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-python@v7.0.0
with:
python-version: ${{ matrix.python }}
- uses: actions/download-artifact@v8.0.1
with:
name: dist
path: dist
# CPU torch from PyTorch's own index. The default PyPI torch wheel drags
# in ~3 GB of nvidia-* CUDA runtime packages this runner can never use;
# the +cpu build is a fraction of that. Verified 2026-07-28 that
# torch 2.13.0+cpu ships manylinux_2_28_x86_64 wheels for cp310-cp315.
- name: Install CPU torch
run: |
python -m pip install --upgrade pip
python -m pip install torch \
--index-url https://download.pytorch.org/whl/cpu
# The real `pip install gridbook`: torch is already satisfied by the +cpu
# build above, so pip resolves safetensors / the rest from PyPI and never
# pulls the CUDA torch.
- name: Install the wheel with its dependencies
run: python -m pip install pytest dist/*.whl
# Stage the tests outside the checkout so `./gridbook` cannot shadow
# site-packages -- the point is to exercise the installed wheel.
- name: Stage tests outside the checkout
run: cp -r tests "${RUNNER_TEMP}/gbtests"
- name: Confirm the installed package is the one under test
working-directory: ${{ runner.temp }}
run: python "${GITHUB_WORKSPACE}/.github/scripts/check_installed.py"
- name: Run GPU-free tests
working-directory: ${{ runner.temp }}
run: |
bash "${GITHUB_WORKSPACE}/.github/scripts/run_cpu_tests.sh" \
"${RUNNER_TEMP}/gbtests"