ci: use pre-installed VS 2022, skip VS 2026 download#2395
Draft
doodlum wants to merge 2 commits into
Draft
Conversation
windows-2025 GitHub runners ship VS 2022 Enterprise out of the box. The setup-build-environment action was downloading and installing VS 2026 Build Tools on every job invocation (~8-12 min), despite the runner already having a working C++ toolchain available. Remove the VS 2026 download step and switch CI to the ALL-VS2022 cmake preset (Visual Studio 17 2022 generator), which is already defined in CMakePresets.json. TheMrMilchmann/setup-msvc-dev auto-detects the highest available VS installation on the runner. Affected jobs: cpp-build (~8-12 min saving) and shader-unit-tests (~8-12 min saving). Both jobs pay the install cost today; neither needs VS 2026 specifically.
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Allows testing workflow and action file changes on a feature branch without merging to dev first. workflow_dispatch resolves all files (including .github/actions/*) from the selected ref, unlike pull_request_target which always uses the base branch. Trigger via: Actions → Manual CI Test → Run workflow → select branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
windows-2025GitHub-hosted runners ship VS 2022 Enterprise pre-installed. Every CI job currently ignores that and downloads + installs VS 2026 Build Tools from scratch on each run (~8–12 min network + installer time). This PR removes that download step entirely and switches to theALL-VS2022cmake preset (VS 17 2022 generator), which is already defined inCMakePresets.json.Changes
.github/actions/setup-build-environment/action.yamlInstall Visual Studio 2026 Build Toolsstep (20-line PowerShell download/install); update comment.github/workflows/_shared-build.yamlcpp-buildmatrix andshader-unit-testsfromALL/build/ALLtoALL-VS2022/build/ALL-VS2022The
ALL-VS2022configure preset and build preset were added toCMakePresets.jsonpreviously and use"Visual Studio 17 2022"as the generator.Benchmarks
Before (measured from recent CI on
dev— VS 2026 install on every job)Expected after (VS 2026 download removed; VS 2022 pre-installed on runner)
The VS 2026 installer step runs at the start of both
cpp-buildandshader-unit-tests. Based on installer timing in the job logs, it accounts for roughly 8–12 minutes of each job's wall-clock time.After (to be filled once CI runs post-merge)
Compatibility notes
ALL-VS2022inherits fromskyrimwhich inheritsmsvc, but overrides the generator to"Visual Studio 17 2022". The stale-cache detection insetup-build-environmentvalidates the generator, so cached builds fromALL/ VS 2026 will not be reused incorrectly.tests/shaders/CMakeLists.txt(MSVC_VERSION GREATER_EQUAL 1950) does not trigger for VS 2022 (~1930s). Shader tests compile normally._shared-build.yamlviarelease-build.yaml, so they also benefit.Generated by Claude Code