Validate-samples skill, samples build refactor, and stale file cleanup#3616
Merged
Conversation
74f1e8b to
345211b
Compare
The revert in 76da5e1 ('Revert samples, source, and global.json changes') re-added old sample files that had been replaced during the Basic samples refactoring. Also removes other unused files found during a thorough audit of all Basic samples. Stale files from revert: - iOS/macOS/tvOS: old ViewController.cs + .designer.cs replaced by CpuViewController, DrawingViewController, GpuGLViewController, etc. - MAUI: old MainPage.xaml/.cs replaced by CpuPage/DrawingPage/GpuPage - BlazorWebAssembly: old Bootstrap NavMenu.razor/.css, Raster.razor, bootstrap.min.css — app uses MudBlazor now - Web: duplicate root-level jquery-validation-unobtrusive JS files Additional dead files found via audit: - BlazorWebAssembly: empty MainLayout.razor.css - Web: removed jQuery library (Bootstrap 5 doesn't need it, no jQuery API calls in the sample) and unused _ValidationScriptsPartial.cshtml + jquery-validation libraries (no forms in the sample) - Web: removed jQuery script tag from _Layout.cshtml - WindowsForms: empty CpuPage/DrawingPage/GpuPage.resx template files, unused Properties/Resources.resx + Resources.Designer.cs - MacCatalyst: unreferenced Resources/LaunchScreen.xib (Info.plist uses Main.storyboard, not this xib) - Android: stale drawable/ic_launcher_background.xml (launcher uses @color/ic_launcher_background from values/ instead) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
345211b to
4f5319e
Compare
Add a Copilot skill that automates building and validating sample projects using CI-produced NuGet packages, plus a developer guide explaining the CI artifacts feed, cake targets, and troubleshooting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the 4 samples-related cake targets (samples-generate, samples-prepare, samples-run, samples) from build.cake into scripts/cake/samples.cake alongside the existing CreateSamplesDirectory helper. Key improvements: - Split monolithic 'samples' task into prepare/run phases - Add --sample filter argument for building specific samples - Enable Docker sample builds (previously commented out) - Better error reporting: collect failures and report at the end - Cleaner classification: build vs skip with reasons logged upfront Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove non-existent validate-samples-full target from Quick Reference - Fix --artifactsFeed to --previewFeed (correct cake argument name) - Fix stale line references pointing to build.cake instead of samples.cake - Replace simplified version construction with actual code including FEATURE_NAME handling and conditional BUILD_NUMBER append - Fix download resolution to show actual PREVIEW_LABEL pattern - Remove incorrect externals-download ordering advice (both targets clear ./output/ so neither order preserves both outputs) - Remove externals-download from building-samples.md targets table and Building with Native Binaries section Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove duplicated inline bash detection logic from SKILL.md and building-samples.md. Both now reference the detect-preview-version.sh script, which prints values the AI agent can parse from stdout. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
SKILL.md is now a lean AI runbook: just the 4 workflow steps, troubleshooting, and a link to docs. Version construction details, download resolution, cake arguments reference, and samples-generate internals now live exclusively in building-samples.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The docs no longer duplicate the workflow steps — they point to the validate-samples skill instead, with example prompts showing how to invoke it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace bash detect-preview-version.sh with detect-preview-version.ps1. Convert all inline code blocks in SKILL.md and building-samples.md to PowerShell using short aliases (rm, ls, etc.). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… dev/remove-stale-sample-files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three related improvements to the samples build and validation workflow.
1. Add
validate-samplesskill and documentationNew Copilot skill (
.github/skills/validate-samples/SKILL.md) that automates the workflow for building samples against CI-produced NuGet packages. Includes a helper script (detect-preview-version.ps1) to detect preview labels and build numbers from downloaded packages.New developer documentation (
documentation/dev/building-samples.md) explaining:--samplefilter, Mac/Windows/Linux variants)2. Refactor samples build tasks
Extracted all sample-related Cake tasks from
build.cakeintoscripts/cake/samples.cake:samples-generate— generates and zips the samples directorysamples-prepare— prepares sample directories with NuGet configsamples-run— builds all sample solutions with platform-aware filteringrun.ps1detection)This reduces
build.cakeby ~140 lines and keeps sample logic self-contained.3. Remove stale sample files
The revert in
76da5e16re-added old sample files that had been replaced during the Basic samples refactoring. Also removes other unused files found during a thorough audit of all Basic samples.Stale files from revert (19 files):
ViewController.cs,.designer.csCpuViewController,DrawingViewController,GpuGLViewController,GpuMetalViewControllerViewController.cs,.designer.csViewController.cs,.designer.csMainPage.xaml,.xaml.csCpuPage/DrawingPage/GpuPageviaAppShell.xamlNavMenu.razor,.css,Raster.razor,bootstrap.min.css,.mapMainLayout.razorwithMudNavMenujquery.validate.unobtrusive.js,.min.jsdist/copies already existAdditional dead files from audit (5 files):
MainLayout.razor.cssResources/LaunchScreen.xibInfo.plistor csprojResources/drawable/ic_launcher_background.xml@color/ic_launcher_backgroundfromvalues/_ValidationScriptsPartial.cshtmlValidation
dotnet cake --target=samplesPR Checklist