ci: build and test the PC suite at /O2 as well #441
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/447"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by grahamster2 on 2026-11-22T03:50:03Z.
Problem
The Windows job runs
cmake --preset dev,cmake --build --preset devandctest --preset dev. Thedevpreset setsCMAKE_BUILD_TYPE=Debug, so CI compiles and tests every generated C++ translation, including all the*_lifted.cpptargets, only without optimization. CI cannot see translation bugs that appear only when the optimizer runs:memcpycalls. CI never built at /O2, so it did not catch this.Change
CMakePresets.json: addreleaseconfigure, build and test presets. They mirrordevwithCMAKE_BUILD_TYPE=Release(/O2 /Ob2 /DNDEBUG) andbinaryDirout/build/release.devis unchanged..github/workflows/windows.yml: add a parallelBuild and test on Windows at /O2job. It sets up Python the same way as the existing job, then configures, builds and runsctest --preset release --no-tests=error -E '_hardware$'. The existing Debug job, the GPU package step and the upload step are unchanged. I chose a separate job over extra steps in the existing one for two reasons. A failure that appears only at /O2 shows up under its own check name, and the job adds no time to the existing job's 20-minute limit. The cost is about 10 s of duplicated Python setup.CONTRIBUTING.md: one sentence on the new job.README.md: one sentence under First build on thereleasepreset.I confirmed in the generated
build.ninjathat the lifted DLLs (for examplecpu_address_size_lifted.cpp) compile with/O2 /Ob2 /DNDEBUG, and that no target in the Release tree uses/Od.Evidence
Environment: Windows 11 Pro build 26200, VS Build Tools 2026 18.3 / MSVC 19.50.35725, Windows SDK 10.0.26100, Python 3.12, commit
c1ca45bplus this change.On this machine I excluded
conditional_import_paths,static_exe_intakeandbundled_export_forwarderslocally because of a local setup choice. CI runs them.releasebvh_wave64_warpandwave_shuffle_warpskipped (capability)devNo test failed in Release only.
tests/docs_links_check.py(10 files, 81 links) andtests/bidi_controls_check.py(353 files) pass.Cost
On recent
mainruns, the existing job's configure, build and test step takes 2.1 to 3.1 minutes, and the whole job takes 2.5 to 3.9 minutes. The new job runs in parallel with it, so wall-clock time should barely change. It adds about one more Windows job's worth of runner minutes per push and PR. Runner timings for this PR are below.AI-assisted (Claude Code).