Skip to content

Restructure CMake presets and "build_variant"s#5192

Draft
ScottTodd wants to merge 3 commits into
ROCm:mainfrom
ScottTodd:cmake-preset-flag-matrix
Draft

Restructure CMake presets and "build_variant"s#5192
ScottTodd wants to merge 3 commits into
ROCm:mainfrom
ScottTodd:cmake-preset-flag-matrix

Conversation

@ScottTodd
Copy link
Copy Markdown
Member

@ScottTodd ScottTodd commented May 11, 2026

Important

See also #5191 as an alternate approach.

Motivation

Follow-up to #5153 (comment)

This aims to set the THEROCK_FLAG_STAMP_LIBRARY_GIT_VERSIONS flag value more consistently in our CI/CD workflows:

  • Enabled in linux-release / windows-release presets, used by release (CD) workflows
  • Disabled in linux-dev / windows-dev presets, used by CI workflows

Technical Details

These workflows have been using a top level "build_variant" setting like build_variant: "release" which traced through build_tools/github_actions/configure_multi_arch_ci.py and build_tools/github_actions/amdgpu_family_matrix.py to compute a "build config".

This splits the "release" build variants to include "ci" and "release" with different cmake presets for each.

Test Plan

Check presets used by CI, trigger a dev release build?

Submission Checklist

ScottTodd and others added 3 commits May 11, 2026 14:21
Introduce a base/dev/release preset hierarchy so CI and release builds
can use different cmake presets. The "dev" presets omit
THEROCK_FLAG_STAMP_LIBRARY_GIT_VERSIONS for ccache friendliness, while
"release" presets enable it.

New presets:
- linux-base: shared Linux build config (RelWithDebInfo, debug info splitting)
- linux-dev: inherits linux-base, for CI/development (no stamp)
- linux-release: inherits linux-base, adds git version stamping
- windows-dev: inherits windows-base, Release build type (no stamp)

The plumbing to select between dev and release presets based on build
context (CI vs release workflows) is not yet wired — the build variant
naming conflates sanitizer mode (release/asan/tsan) with build purpose
(CI vs release), and that needs to be resolved first.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…iants

Restructure build variants so CI and release workflows use distinct
variant keys with different cmake presets. Move family compatibility
from per-family build_variants lists to per-variant families allow-lists,
centralizing variant configuration.

Build variant key changes:
- "release" (CI) → "ci" (preset: linux-dev / windows-dev)
- "release" (release) → "release" (preset: linux-release / windows-release)
- "asan" → "ci_asan" (preset: linux-dev-asan)
- "tsan" → "ci_tsan" (preset: linux-dev-tsan)

Also renames sanitizer presets to linux-dev-asan / linux-dev-tsan, with
linux-release-asan / linux-release-tsan inheriting and adding the stamp
flag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

1 participant