From 756f949839bd93b42ac832aeb591968ec45a20bc Mon Sep 17 00:00:00 2001 From: Bill Dolinar Date: Mon, 31 Aug 2026 16:34:58 -0600 Subject: [PATCH] Compile each configuration once, with instrumentation in the package id Post-mortem items 1-3 from the xmsvtk coverage investigation. Item 1 is the root cause; items 2 and 3 are what it was hiding, and the pipeline restructure is what item 3 turned out to require. Instrumentation reached the build through XMS_COVERAGE=1 in a profile's [buildenv], which conan does not see. An instrumented binary and a production binary therefore shared a package_id, so a coverage run could satisfy --build=missing for a production build and vice versa. The generated recipe grows a `coverage` option instead, so instrumentation travels with the identity; package_id() dels it when False, which keeps every uninstrumented id byte-identical to the ids this recipe produced before the option existed -- no republish, no cache invalidation for normal builds. The generated CMakeLists.txt no longer reads $ENV{XMS_COVERAGE} as a fallback, and plan_cmake_presets writes the variable into every configure preset's cacheVariables, because a raw `cmake --preset` build never runs the recipe's build(). Only the two coverage legs are instrumented, not every configuration the matrix builds. The split-out GitLab test job found its artifact directory by falling back to the first of Debug-testing, Release-testing that existed. A matrix building both therefore compiled the Release runner on every pipeline and never executed it, with nothing red to show for it -- the warning naming the choice went to a job log nobody reads. The template now emits one "Run C++ Tests -