CI: log precompiled header sizes after Windows Build#6340
Merged
Conversation
Add a step after the Windows Build that reports the size of every precompiled header produced by the MRPch, MRMesh and MRViewer projects. Both build systems write PCH files under source\TempOutput (MSBuild emits one MRPch.pch per project IntDir; CMake/Ninja emits cmake_pch.hxx.pch), so a recursive *.pch scan covers either path. Runs with always() and continue-on-error so it never masks a build failure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the precompiled-header size report (and its comment) out of the Windows workflow into scripts/diagnostics/windows-pch-sizes.ps1, matching the other windows-*.ps1 diagnostics. Drop the always() guard so the step runs in the normal step order; continue-on-error keeps it from masking a build failure. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Adds a step after the Windows Build that logs the size of every precompiled header produced by the MRPch, MRMesh and MRViewer projects, so PCH growth is visible directly in the build log.
Details
source\TempOutput:MRPch.pchper projectIntDir(withMR_PCH_USE_EXTRA_HEADERS=ON, MRMesh and MRViewer build their own; MRPch always does).cmake_pch.cxx.pch(each of MRPch/MRMesh/MRViewer builds its own when the extra headers are on).*.pchscan covers both layouts and prints aSize (MB)/Pathtable. The body lives inscripts/diagnostics/windows-pch-sizes.ps1.continue-on-error: trueso it never masks a build failure, and bails out cleanly if the build directory doesn't exist.CI-only change; no library or product code affected. All non-Windows platforms disabled.
Measured sizes (run 28318048245, MB)
CMake / Ninja (
cmake_pch.cxx.pch)MSBuild (
MRPch.pch)Notes: CMake PCHs are ~2× the MSBuild ones; MRPch is the largest (full shared header incl. OpenVDB), MRMesh drops the viewer/imgui section; msvc-2019 produces the biggest PCHs, msvc-2022 the smallest.