Skip to content

Set CMake presets explicitly in CI/CD workflows#5191

Draft
ScottTodd wants to merge 6 commits into
ROCm:mainfrom
ScottTodd:cmake-preset-flag-explicit
Draft

Set CMake presets explicitly in CI/CD workflows#5191
ScottTodd wants to merge 6 commits into
ROCm:mainfrom
ScottTodd:cmake-preset-flag-explicit

Conversation

@ScottTodd
Copy link
Copy Markdown
Member

@ScottTodd ScottTodd commented May 11, 2026

Important

See also #5192 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".

The choice of cmake preset is fixed for a given workflow entry point, so we can instead be explicit upfront.

Test Plan

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

Submission Checklist

ScottTodd and others added 6 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>
Instead of deriving the cmake preset from build_variant through the
configure script and family matrix lookup, pass it directly at the
workflow call site. This makes the preset choice visible from reading
the workflow file without drilling through layers of YAML and Python.

Fixes the PR ROCm#5153 issue where Windows CI used the release preset
(with git version stamping) instead of a dev preset.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Now that cmake_preset is passed directly at the workflow call site,
BuildConfig no longer needs to carry it. Remove the field from the
dataclass and its construction in the configure script.

The field still exists in all_build_variants for the old-style CI
pipeline (configure_ci.py), which can be cleaned up separately.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Set cmake presets explicitly in the old-style CI workflow files instead
of deriving them from the matrix variant config. Remove the field from
all_build_variants since no pipeline reads it from there anymore.

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

Co-Authored-By: Claude <noreply@anthropic.com>
The release workflows always use release presets, so set them directly
instead of accepting them as inputs. Removes the cmake_preset input
from multi_arch_release_linux.yml and multi_arch_release_windows.yml.

🤖 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