Skip to content

CI: run the standard-library tests on Linux with SPIRV-Tools and numpy - #4085

Open
AAyberkU wants to merge 1 commit into
ItsNotRexed:mainfrom
AAyberkU:ci-stdlib-tests-linux
Open

AAyberkU wants to merge 1 commit into
ItsNotRexed:mainfrom
AAyberkU:ci-stdlib-tests-linux

Conversation

@AAyberkU

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: #3918 (comment) (new TEST item)

What and why

check runs the standard-library test loop on windows-latest only. That runner has neither SPIRV-Tools nor numpy, and translator-tests, the one job that installs them, only picks the pytest files. So these never ran in CI:

  • the spirv-as / spirv-val checks of tests/test_split_big_switch.py (the 37 220-case switch), tests/test_image_load_typed.py, tests/test_mesh_compute_vs.py and tests/test_bary_fallback_gs.py, which skip without the tools;
  • the optional validation in test_desc_cache, test_f64_transcendentals, test_spirv_asm and test_spirv_stubs, which pass silently without it;
  • test_skinned_glb::SkinnedGlbTest::test_numpy_and_stdlib_weight_paths_agree (numpy);
  • the POSIX-only tests, which skip on Windows.

A translator or tool change that makes one of these generators emit invalid SPIR-V therefore passes CI today. TEST-604 (#3091) fixed this for tests/semantic. This does the same for the standard-library loop: a new stdlib-tests-linux job at the end of ci.yml installs spirv-tools from apt as semantic-tests does and tests/requirements.txt for numpy and Pillow, then runs the loop of check unchanged (same PYTEST_FILE_MARKERS selection, same find). translator-tests is untouched, so no file is picked twice by one job.

tests/test_ci_registration.py gets a check in the spirit of spirv_gated_semantic_files: a standard-library file that calls which("spirv-as"/"spirv-val") (9 today) needs a job that apt-get installs spirv-tools and runs the loop. It fails with the new job removed.

Relation to #2909: its macOS job runs the same loop before Homebrew installs anything, so on macOS these checks still skip. This job installs first. The two jobs are independent, are added at different places in ci.yml, and can both merge.

Tested

No GPU, no game files.

  • All 298 standard-library test files, run with the loop's own selection under Linux (WSL, non-root user), Python 3.12.13, the pinned tests/requirements.txt and SPIRV-Tools 2025.1 from Ubuntu noble-updates (the version this job installs on ubuntu-24.04): 298 of 298 exit 0. 4848 unittest tests ran and 104 skipped (llvm-mc, GPU, built binaries, rpf9dump, Windows-only).
  • With -v: test_37220_cases_spirv_as_and_spirv_val, both test_image_load_typed validation tests, the test_mesh_compute_vs assembly tests, the test_bary_fallback_gs spirv-as/val tests and test_numpy_and_stdlib_weight_paths_agree run and pass instead of skipping.
  • python -I tests/test_ci_registration.py (Windows 11, Python 3.12.10): OK. With the new job removed it fails and lists the 9 spirv-using files.
  • Unrelated to this PR: tests/test_u16_high_half.py::test_d16_buffer_store_no_redundant_extract_after_shr16 (a pytest file in the existing translator-tests job) fails on main with SPIRV-Tools 2025.1 and 2026.4; rdna2spirv: define the format-table constants before use #3921 fixes it.

AI-assisted (Claude Code); the runs above were done on this branch.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (Not applicable: no translator change.)

🤖 Generated with Claude Code

The check job runs the standard-library loop only on windows-latest, which has neither
SPIRV-Tools nor numpy, and translator-tests (the one job that installs them) picks only the
pytest files. So the spirv-val checks of test_split_big_switch (the 37 220-case switch),
test_image_load_typed, test_mesh_compute_vs and test_bary_fallback_gs, the numpy path of
test_skinned_glb and the POSIX-only tests skipped in CI and ran nowhere; desc_cache,
f64_transcendentals, spirv_asm and spirv_stubs validate only when spirv-val is present.

Add stdlib-tests-linux at the end of ci.yml: ubuntu-24.04, spirv-tools from apt as the
semantic-tests job installs it, tests/requirements.txt for numpy and Pillow, then the same
loop as check. test_ci_registration.py now fails when a stdlib file that calls spirv-as or
spirv-val has no job that installs spirv-tools and runs that loop; it fails with the job removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Vonsek

Vonsek commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Independent static check of 68c2466 against main aa2988c. The new Linux loop uses the same selector as the existing Windows loop. Applying those predicates to the tracked tree selects 298 of 329 non-semantic Python test files on each OS. The semantic subtree is pruned and the existing pytest-marker and main exclusions are the same. Nine selected files contain explicit spirv-as or spirv-val lookups. The extra coverage is a second platform run of that same file set, with SPIRV-Tools available. The hosted CI run was queued when checked, so this verifies selection only.

AI-assisted.

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