build(cmake): restore copy_shaders fast deployment#1756
Conversation
Restores lightweight COPY_SHADERS target for rapid shader development: - Deploys only shaders without building DLL or running tests - Preserves existing full deployment behavior as DEPLOY_ALL target Development docs: - docs/development/README.md: Development documentation index - docs/development/shader-workflow.md: Deployment workflow guide - docs/development/vscode-setup.md: IDE setup with auto-deploy example AI instruction updates: - Update .claude/CLAUDE.md with new target names and references - Update .github/copilot-instructions.md with fast deployment command Usage: cmake --build build/ALL-WITH-AUTO-DEPLOYMENT --target COPY_SHADERS Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR restructures the shader deployment workflow by introducing two distinct build targets: COPY_SHADERS for fast shader-only deployment and DEPLOY_ALL for full deployment with DLL builds and tests. It adds a Windows Robocopy wrapper for consistent exit code handling, reworks deployment stamps from a single consolidated stamp to multiple shader-related stamps, and provides comprehensive development documentation for VSCode setup and shader iteration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR restores a fast, shader-only deployment path via a COPY_SHADERS CMake target and documents a recommended developer workflow around it, while keeping the full deployment flow under a new DEPLOY_ALL target. It also updates AI-facing instructions so automated tools use the new fast deployment path where appropriate.
Changes:
- Introduces Windows-only incremental shader-only deployment commands (
*_shaders_only.stamp,SHADER_ONLY_HASHES) and a newCOPY_SHADERScustom target, and refactors full deployment into aDEPLOY_ALLtarget that also runs shader tests. - Adds focused development documentation under
docs/development/describing shader workflows, VSCode auto-deploy setup, and common commands. - Updates
.claude/CLAUDE.mdand.github/copilot-instructions.mdto reference the new fast deployment target and directory layout.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Refactors automatic deployment: centralizes robocopy wrapper creation, splits shader-only vs full shader deploy steps, adds COPY_SHADERS (fast shader-only) and DEPLOY_ALL (full deploy + tests) targets, and wires shader tests to DEPLOY_ALL instead of COPY_SHADERS. |
docs/development/vscode-setup.md |
New doc describing VSCode setup and optional RunOnSave configuration that invokes COPY_SHADERS on HLSL saves against the ALL-WITH-AUTO-DEPLOYMENT build tree. |
docs/development/shader-workflow.md |
New doc outlining fast vs full shader deployment workflows, requirements for AUTO_PLUGIN_DEPLOYMENT, and behavior of COPY_SHADERS vs DEPLOY_ALL. |
docs/development/README.md |
New development doc index with quick links for fast shader deployment, full auto-deployment builds, shader tests, and a summary table of key build targets. |
.github/copilot-instructions.md |
Adds a “fast shader deployment” command for AI usage pointing to the new COPY_SHADERS target and associated developer docs. |
.claude/CLAUDE.md |
Updates custom CMake target section to describe using COPY_SHADERS and DEPLOY_ALL from the ALL-WITH-AUTO-DEPLOYMENT build directory instead of the older COPY_SHADERS behavior. |
| - `ALL-WITH-AUTO-DEPLOYMENT` - Build + deploy to game directory | ||
| - `Dev` - Fast iteration preset (recommended for development) | ||
|
|
||
| See `CMakePresets.json` for all available presets. |
There was a problem hiding this comment.
This "Build Presets" section calls out an ALL-WITH-AUTO-DEPLOYMENT preset and then says to "See CMakePresets.json for all available presets", but that file does not define an ALL-WITH-AUTO-DEPLOYMENT build preset (the only reference is a configure preset in CMakeUserPresets.json.template). To avoid confusing new contributors, it would be better to either (a) explicitly mention that ALL-WITH-AUTO-DEPLOYMENT comes from a user CMakeUserPresets file, or (b) adjust the wording so this section and the file reference accurately reflect where each preset is defined.
| - `ALL-WITH-AUTO-DEPLOYMENT` - Build + deploy to game directory | |
| - `Dev` - Fast iteration preset (recommended for development) | |
| See `CMakePresets.json` for all available presets. | |
| - `ALL-WITH-AUTO-DEPLOYMENT` - Build + deploy to game directory (defined in user `CMakeUserPresets.json`) | |
| - `Dev` - Fast iteration preset (recommended for development) | |
| See `CMakePresets.json` for built-in presets, and your local `CMakeUserPresets.json` (created from `CMakeUserPresets.json.template`) for optional user presets such as `ALL-WITH-AUTO-DEPLOYMENT`. |
|
✅ A pre-release build is available for this PR: |
Restores lightweight COPY_SHADERS target for rapid shader development:
Development docs:
AI instruction updates:
Usage: cmake --build build/ALL-WITH-AUTO-DEPLOYMENT --target COPY_SHADERS
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Summary by CodeRabbit
Release Notes
New Features
COPY_SHADERSdeployment target for fast, shader-only iteration.DEPLOY_ALLtarget for comprehensive deployment including DLL builds and tests.Documentation
✏️ Tip: You can customize this high-level summary in your review settings.