Allow for custom message in workflow steps

We use --workflow to run CI steps in TeamCity. This allows us to limit our TeamCity configuration to just one build step of running the workflow. However, as a result of specifying the steps via the single workflow vs individual build steps in TeamCity we lose certain features of TeamCity such as automatic folding of build output by step and performance monitoring reported of each individual step. TeamCity has a feature called “Service Messages” that allow you to manually print to stdout when steps begin and end however there is no good way to accomplish this currently. Ideally would like something along the lines of an optional “message” field for each workflow step where I could print custom messages at the beginning of a workflow step. For example:

      {
         "name": "teamcity-windows-debug",
         "steps": [
            { "type": "configure", "name": "teamcity-windows-debug", "message": "My custom message." },
            { "type": "build", "name": "teamcity-windows-debug-show-ccache-stats", "message": "My other custom message" },
            { "type": "build", "name": "teamcity-windows-debug-install" },
            { "type": "build", "name": "teamcity-windows-debug-show-ccache-stats", "message": "Perhaps allow macro expansion: ${sourceDir}" },
            { "type": "test", "name": "teamcity-windows-debug-slim", "message": "Perhaps support whatever message(...) supports" }
         ]
      }

Personally, even static messages would work for my needs but either supporting macro expansion or being more of a pass-through to CMake’s message(…) function would be even more functional.

I proposed a feature in issue 25475 motivated by a very similar use case to yours. I’ve since thought of other use cases that proposal would address, so I’d really like to see it implemented (I’m unlikely to have the time myself in the short to medium term).

What I’ve done with a couple of my consulting clients is pipe the output of the cmake --workflow command to a script that detects the output text CMake logs at the start of each workflow step, and then insert the message marker text that the CI system recognizes for delineating steps/groups based on output. I’ve done this with both GitHub and TeamCity, and it has worked reliably for some time now. It’s not a prohibitive amount of bash script, but if you want something that works on Windows too, then you might have a bit more work to do.