Skip to content

[CI] test: Run the CPU unit tests on GitHub-hosted runners - #31

Merged
Oasis-Git merged 4 commits into
mainfrom
ci/cpu-unit-tests
Nov 3, 2026
Merged

Oasis-Git merged 4 commits into
mainfrom
ci/cpu-unit-tests

Conversation

@em-dreyer

@em-dreyer em-dreyer commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

test/unit is CPU-only but nothing runs it in CI. SGLang runs its own CPU unit-test stage on GitHub-hosted ubuntu-latest. For a public repo, standard hosted runners are free, so these tests don't need self-hosted runners.

Modifications

Adds .github/workflows/unit-test.yml, one ubuntu-latest job:

  • It installs SGLang from a nightly wheel from sgl-project/whl. The wheel is prebuilt, so CI doesn't need Rust or protoc. The plugin needs SGLang main from [Refactor] kernels: Add the plugin kernel backend and split plugin contracts from their srt integration sglang#45389 on, and no tagged release has that yet.
  • The workflow runs when a PR is opened or updated and when a commit lands on main. Those runs install the SGLang nightly pinned in SGLANG_NIGHTLY_TAG (currently nightly-2026-10-28-15d39bd840), so an SGLang change can't break unrelated PRs. To move to a newer SGLang, a person edits that one line in a normal PR.
  • Torch, FlashInfer, CuTe DSL and the CUDA Python bindings come in as SGLang's own dependencies, all from PyPI. They install and import without a GPU.
  • The job runs with read-only permissions and uses no secrets. Fork PRs stay behind the existing first-time-contributor approval.

Not covered: test/kernels and test/e2e need GB300s and are left for a separate change. A daily run against the newest SGLang nightly, which test_contract.py asks for, is left out for now.

Accuracy Tests

N/A, this PR only adds CI.

Speed Tests and Profiling

N/A.

Checklist

  • pre-commit run --all-files passes.
  • Tests under test/ cover the change. The first run of this workflow is the test. Some unit tests may still need GPU skip marks.
  • The SGLang commit or PR this was tested against is named above.
  • Accuracy and speed results are attached when kernel or forward code changes. (N/A)
  • A new model adds one line to .github/CODEOWNERS that names its owner. (N/A)

Once this is green, a repo admin can add Unit Test as a required check in the main ruleset.

🤖 Generated with Claude Code

em-dreyer and others added 3 commits October 28, 2026 13:00
test/unit runs on CPU but imports the installed SGLang, torch, FlashInfer,
CuTe DSL and the CUDA Python bindings. Install them from an SGLang nightly
wheel (prebuilt, so no Rust build) on ubuntu-latest, as SGLang's own CPU
stage does. PRs pin one nightly; the scheduled run takes the newest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every run now installs the pinned SGLang nightly; a PR moves the pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@em-dreyer
em-dreyer marked this pull request as ready for review October 29, 2026 22:42
@em-dreyer
em-dreyer requested a review from Oasis-Git as a code owner October 29, 2026 22:42
@Oasis-Git
Oasis-Git merged commit 4710cd4 into main Nov 3, 2026
2 of 3 checks passed
Oasis-Git pushed a commit that referenced this pull request Nov 3, 2026
#31 kept --continue-on-collection-errors from a temporary debugging commit.
A test module that fails to import should fail the job at collection.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants