Skip to content

Select the MSVC toolset by prefix with yaito3014/setup-msvc - #120

Open
yaito3014 wants to merge 5 commits into
mainfrom
msvc-toolset-prefix
Open

yaito3014 wants to merge 5 commits into
mainfrom
msvc-toolset-prefix

Conversation

@yaito3014

Copy link
Copy Markdown
Member

No description provided.

The windows-2025-vs2026 runner image 20261116.315 replaces MSVC 14.51
with 14.52, so the pinned toolset_version 14.51 fails in setup once a
job lands on it. Select the newest toolset matching "14.5" instead, and
pass its full version to CMake's -T in both configure steps so MSBuild
uses that exact toolset rather than the VS default. Bump the deps cache
key, since cached FetchContent sub-builds record the -T value.

This replaces build.yml's compiler-toolset-version and vs-path inputs
with msvc-toolset-prefix and msvc-platform-toolset; x4 must update its
caller accordingly.
The build job always configured with FETCHCONTENT_FULLY_DISCONNECTED=ON,
assuming prepare-deps had saved build/_deps under the same key. The key
includes the MSVC version, and since the toolset is now selected per
job, the two jobs can pick different ones when they land on different
runner images during a rollout (14.51 vs 14.52 in PR #120's CI). The
build job then missed the cache and configure failed under CMP0170.

Set FETCHCONTENT_FULLY_DISCONNECTED only on a cache hit, as prepare-deps
already does, so a miss costs a dependency build instead of failing.
@cppwarningnotifier

Copy link
Copy Markdown
EnvironmentC++23C++26
irisClang22Debug✅success✅success
Release✅success✅success
GCC15Debug✅success✅success
Release✅success✅success
MSVC2026Debug✅success✅success
Release✅success✅success

@saki7

saki7 commented Nov 19, 2026

Copy link
Copy Markdown
Member

f5acf42 is actually a good addition; I recall I sometimes encountered that situation and the CI was refusing to build deps.

However, please make sure to call actions/cache/save in such scenario, otherwise the build artifact of the deps will never be reused in the same PR's timeframe.

Decide on FETCHCONTENT_FULLY_DISCONNECTED with the same inline
expression as the build job, instead of a separate step that exported
it as IRIS_CI_CMAKE_ARGS, so both jobs read the same way.
On a deps cache miss the build job fetched and built Catch2 but never
saved it, so later runs in the same PR rebuilt it whenever their job
landed on that toolset again. Build Catch2WithMain in its own step and
save build/_deps right after configure, as prepare-deps does, so the
cache holds a complete deps build regardless of whether the tests then
compile.

The step is named "Prepare Deps" rather than "Build Deps" because
cpp-warning-notifier links each result to the first successful step
matching STEP_REGEX ("Build .+"), which must remain "Build Tests".
Comment thread .github/workflows/build.yml Outdated
Comment on lines +197 to +198
# Not named "Build ...": the warning notifier links to the first step
# matching its STEP_REGEX, which must be "Build Tests".

@saki7 saki7 Nov 19, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this caveat is necessary.

I think cppwarningnotifier already checks CPPWARNINGNOTIFIER_LOG_MARKER for parsing, so the restriction on the step name seems quite unnecessary. I'd suggest removing this restriction on cppwarningnotifier's side, because a restriction on a step name is quite surprising for a GitHub Action's design.

If a parse-time check of CPPWARNINGNOTIFIER_LOG_MARKER is going to introduce some runtime overhead, then I think cppwarningnotifier should require the user to specify some key like build_step_name: (or maybe build_step_id: ?) below the uses: parameter. Then STEP_REGEX can be obsolete, as it is too fragile like I mentioned.

Meanwhile, I think we can simply remove this comment, as we have no actual plans to add a step named "Build ..." anyway.

@saki7 saki7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all remaining works are done, feel free to self-merge, and please proceed on the x4's companion PR.

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