102 Commits
Author SHA1 Message Date
Virgile Bello a3b14d369e Tests: sidecars record pixels per diff, and a pass a threshold rule allowed saves its render
Diffs 0 to 15 are counted one by one, then by band 16-31, 32-63, 64-127, 128+. A pass against the lane's own gold with pixels at diff 3+ keeps its PNG, so CompareGold can tell the renders apart and turn them into variants. ForceSaveImageOnSuccess saves the PNG again.
2026-10-10 17:46:32 +09:00
Virgile Bello 519906fd9c Tests: the vision gate uses Claude Sonnet 5.5, reasons before its verdict and ignores NuGet vulnerability warnings 2026-10-10 09:50:54 +09:00
Virgile Bello 462244d191 Tests: the editor screenshot vision gate tolerates NuGet vulnerability warnings in build logs 2026-10-10 01:56:02 +09:00
Virgile Bello 0ddd0f5e32 tests/comparator: read STRIDE_ANTHROPIC_API_KEY before ANTHROPIC_API_KEY
A developer can keep the key out of ANTHROPIC_API_KEY, which other tools
(Claude Code among them) pick up and bill. CI keeps the standard name.
2026-10-09 17:54:34 +09:00
Virgile Bello 29f044884a TextureConverter: resize non-8-bit textures again (fix #3441)
ImageSharpTexLib only handles 8-bit BGRA/RGBA but claimed every non-Nearest
rescale, so Lanczos3 on R16G16B16A16_Float or R16_Float threw. Since the
FreeImage removal no other library implements Lanczos3, so TextureTool now
falls back to Bicubic (DirectXTex) for formats ImageSharp cannot process.
2026-09-17 22:14:54 +09:00
Virgile Bello 23ac63bcc3 Resolve the test suites a run needs
build/tools/Stride.TestSuites prints the suites a test filter can hit, or the
ones an explicit project list names. It parses each suite's sources with
Roslyn for test methods and evaluates the filter on them with vstest's own
engine. When unsure (no filter, bad filter, no match) it answers every suite.
With --slnf it writes a solution filter narrowed to those suites.

Stride.Tests.Combined takes -p:StrideCombinedSuites="<name> <name>" to bundle
only those suites.
2026-09-10 18:13:19 +09:00
Nicolas Musset 0aa3c0f730 Merge branch 'master' into feature/launcher-avalonia-cherrypick 2026-08-10 21:14:05 +02:00
Virgile Bello 51f4da6044 feat: asset URL using layer (bare-to-canonical aliases, StrideAssetNamespaceUsings) 2026-07-16 17:19:57 +02:00
Virgile Bello f12d2ac238 chore: track .ico/.cur/.xcf/.pdn/.woff/.eot binaries with git-lfs 2026-07-16 11:16:26 +02:00
Nicolas Musset 5a2f2d2e21 Merge branch 'master' into feature/launcher-avalonia-cherrypick 2026-07-05 13:05:32 +02:00
Virgile Bello d6c7684588 editor tests: ScriptEditor screenshot fixture guarding the RoslynPad script editor
Adds OpenAssetEditor + WaitForSyntaxHighlighting to the AutoTesting harness,
a comparison preset that tolerates script text but flags missing syntax
highlighting, and the dpi100 baseline (xen2 CI run 28671029922).
2026-07-04 01:21:19 +09:00
Nicolas Musset 4bd02aae72 A few fixes following merge from master 2026-06-29 21:04:35 +02:00
Virgile Bello 0b26daa159 Merge origin/master into feature/launcher-avalonia-cherrypick
Resolve launcher (Avalonia) vs WPF conflicts; take master's xunit runner; add Stride.Cli to launcher solution; implement multi-checkbox dialog for Avalonia.
2026-06-29 23:25:58 +09:00
Virgile Bello 1b63c54e35 engine: rename Stride foundation assembly to Stride.Foundation
The bare Stride assembly held the API-agnostic graphics/rendering
foundation (Image, PixelFormat, ParameterCollection, media interfaces),
not the engine, so the name was misleading. Renaming it frees the
Stride id and clarifies the layering. Bumps the binary serialization
format version since the assembly identity changed.
2026-06-25 17:31:39 +09:00
Virgile Bello fe349ab069 build: declare test TargetFrameworks explicitly, move StrideTestPlatforms expansion to props
Test projects now set <TargetFramework(s)> from props-time sets (StrideTestTargetFrameworks
[/MacOS]) computed from StrideTestPlatforms, instead of the targets-time expansion in the
Tests SDK. TargetFrameworks are identical across platform configs (verified); the literal
element makes Roslyn MSBuildWorkspace tooling treat tests as SDK-style. Tests that already
declared a TargetFramework are untouched.
2026-06-18 17:40:41 +09:00
Virgile Bello cb66a3e1c3 ci: rename screenshot gate runner to Stride.ScreenshotComparator.VisionGate 2026-06-17 15:34:07 +09:00
Virgile Bello 8b85d198c6 ci: editor screenshots via label suite + trusted vision gate 2026-06-17 15:32:42 +09:00
Virgile Bello e899b52a69 ci: trusted vision gate re-judges deferred screenshot frames 2026-06-17 15:32:39 +09:00
Virgile Bello f8b1f78b0b tests: defer sample screenshot vision verdict when no API key 2026-06-17 15:32:36 +09:00
Virgile Bello 3765d5cfc7 tests: support compound vstest filters on-device (| and & in parser, quote Android filter extra) 2026-06-12 01:21:46 +09:00
Virgile Bello 42d0d64d0e ci: add --repeat flake-hunt input to Android/iOS game test workflows 2026-06-11 15:04:59 +09:00
Virgile Bello 60feb7a38a tests/combined: aggregate test suites into single .app/APK via meta ProjectReference 2026-06-11 15:04:58 +09:00
Virgile Bello c710b008fd xunit.runner.stride: bring up on iOS 2026-06-11 15:04:57 +09:00
Virgile Bello c970ef49b2 Add test-gold-gen workflow with cross-platform filtering and headless gold promotion
- test-filter + project inputs on test-{windows,linux,macos,android}-game (default empty = unchanged)
- Android on-device --filter via xunit_filter intent extra, reusing ParseVstestFilter
- test-gold-gen.yml: on-demand per-platform dispatch, combined gold-images artifact, optional promote
- CompareGold promote/dedup subcommands: tolerance compare (StbImageSharp + linked ImageThreshold),
  priority-ordered, lands gold via branch/amend/PR (never the default branch directly)
- CompareGold UI: surface Test Gold Generation runs
2026-06-10 14:50:50 +09:00
Virgile Bello c5e242c339 Upgrade to Avalonia 12.0.2 2026-06-02 21:59:40 +09:00
Virgile Bello 62ca4bf3c4 xunit.runner.stride: Android UI fixes
- ObservableCollection<TestNodeViewModel> so async discovery surfaces in the tree
- Tap (not press) drives drill-in so touch-scroll doesn't swap pages
- TreeView row shows method name only; filter still matches the full name
- Desktop-only filter auto-focus (no soft-keyboard pop on mobile)
- Qualify Application as Avalonia.Application to avoid Android.App clash
2026-06-02 21:59:37 +09:00
Virgile Bello 3ff8742f2a tests/android: headless MainActivity via run intent
MainActivity reads Intent xunit_command=run and sets App.HeadlessMode; the
single-view branch awaits discovery, runs the assembly via RunTestsAsync,
and exits with FailedCount. Discovery runs on a background task so Android
doesn't ANR. trx/test root live in FilesDir (targetSdk 30+ scoped storage).
2026-06-02 18:57:51 +09:00
Virgile Bello 42176cb405 tests/android: bring up xunit runner on emulator
Multi-target xunit.runner.stride for net10.0-android with an Avalonia
activity entry; the Tests SDK packages test projects as APKs. Re-derive
StrideGraphicsApi to Vulkan and pin RuntimeIdentifier=android-x64 for
mobile, gate per-RID inner builds (StrideHostGraphicsApi decouples
build-host from device API), and collapse MainActivity onto
AvaloniaMainActivity<App>.
2026-06-02 18:57:50 +09:00
Virgile Bello ada2a41c3d xunit.runner.stride: revamp UI (filter, per-row run/preview, output capture, RenderDoc dropdown) 2026-05-27 10:00:29 +09:00
Virgile Bello cf9a353f91 xunit.runner.stride: parse --filter FullyQualifiedName~X in headless mode (vstest/dotnet test syntax) 2026-05-24 14:40:37 +09:00
Virgile Bello 1b9ab88c07 TextureConverter: split LoadingRequest into typed File/TexImage/XkImage subclasses 2026-05-24 14:40:02 +09:00
Virgile Bello 2d62b40c8b deps: remove PVRTT now that ASTC encoder handles mobile compression
ASTC superseded ETC2 on Android/iOS for compressed sprite output, leaving
PVRTT (the ETC2/PVRTC encoder) with no callers. Drops:
- deps/PVRTT/ (~10 binaries + headers + license)
- Stride.TextureConverter.TexLibraries.PvrttTexLib + its C# wrapper layer
- Stride.TextureConverter.Tests.PvrttTexLibTest
- PVRTexLib preload in TextureTool

ETC* / EAC* PixelFormat entries stay in the enum for backward compatibility
with already-built content. There is just no encoder for them anymore.

DetermineOutputFormat Level_9_x branch (pre-Vulkan GLES 2.0 era) now falls
back to uncompressed R8G8B8A8 instead of ETC1; the path is effectively dead
for a Vulkan-targeted engine.
2026-05-24 11:07:30 +09:00
Virgile Bello 2b7a1211cd dxtwrapper: fix native lib preload name + add smoke test
TextureTool's static ctor still PreloadLibrary'd "DxtWrapper" — eager
load failed with DllNotFoundException before any P/Invoke could fire.
Renamed to "stride_directxtex" to match the actual lib filename.

Added a non-skipped Fact in DxtTexLibTest: load+convert+save round-trip
on an existing fixture. Exercises native lib loading, P/Invoke
marshalling, struct layout, and the DDS encode path end-to-end — caught
the preload-name regression above.
2026-05-24 11:07:25 +09:00
Virgile Bello 5c55d8b53b Stride.TextureConverter: migrate from FreeImage to ImageSharp
Replace the FreeImage-backed FITexLib with a managed ImageSharpTexLib for
common bitmap I/O and pixel-space operations (rescale, flip, R/B swap,
gamma, sub-image swap). Operates on Image<Bgra32>; supports B8G8R8A8 /
R8G8B8A8 and their SRgb/Typeless variants. Rescale-filter mapping:
Bilinear -> Triangle, BSpline -> Spline; others 1:1. Gamma matches
FreeImage's out = 255 * (in/255)^(1/gamma).

With no remaining consumers, fully remove the Stride.FreeImage project,
the deps/FreeImage native bundle, and the Stride.csproj reference left
over from the StandardImageHelper migration. Drop libfreeimage-dev from
the Linux CI job and the FreeImage-era "BMP save not supported on Linux"
test skips (ImageSharp is cross-platform). Refresh THIRD PARTY.md.
2026-05-24 11:07:23 +09:00
Virgile Bello 62678de06b tests/comparator: retry transient Claude API errors (429/529/5xx)
Brief Anthropic overload was surfacing as fake drift regressions in the
screenshot suite. Retry up to 3x with 2s/4s backoff; on persistent failure
the message says 'unavailable, retry the run' so operators don't chase a
phantom drift.
2026-05-18 20:16:35 +09:00
Virgile Bello cc7ae58ff7 Merge remote-tracking branch 'origin/master' into sdsl-rewrite
# Conflicts:
#	.github/workflows/build-ios.yml
#	.github/workflows/build-windows-full.yml
#	.github/workflows/test-linux-game.yml
#	.github/workflows/test-linux-simple.yml
#	.github/workflows/test-samples-screenshots.yml
#	.github/workflows/test-windows-game.yml
#	.github/workflows/test-windows-simple.yml
#	README.md
#	build/Stride.sln
#	sources/tests/Stride.ScreenshotComparator/ClaudeVisionFallback.cs
2026-05-11 11:45:24 +09:00
Virgile Bello cd1cb6a90d comparator: multi-baseline-per-frame variants
Adds support for committing multiple acceptable variants of a frame as
'<frame>.<tag>.png' siblings of the canonical '<frame>.png' baseline.
LPIPS picks the closest match across the variant set (best-of); the
Claude vision fallback receives all variants in one request and is asked
whether the capture is consistent with the demonstrated variance range.
Single-baseline path is unchanged.
2026-05-09 16:23:05 +09:00
Virgile Bello 43bf0c4872 comparator: ComparisonPrompt domain classes + Claude vision wiring
Adds an overrideable record-based prompt builder (ComparisonPrompt with
sealed Gameplay/Editor variants, each carrying its own tolerance and
regression-trigger toggles plus a curated static Default). Threads the
prompt through ClaudeVisionFallback.Compare and ScreenshotComparator's
new defaultPrompt parameter. Existing samples flow keeps the gameplay
preset as the default; editor flow can opt into EditorComparisonPrompt.
2026-05-09 16:23:05 +09:00
Virgile Bello 4947898216 tests: extract ScreenshotComparator into shared sources/tests/ project
Move the LPIPS / Claude vision comparator out of samples/Tests/Comparator/
into sources/tests/Stride.ScreenshotComparator/ so other test pipelines
(notably the GameStudio AutoTesting fixtures in tests/editor/) can reuse
it via ProjectReference. Namespace renamed Stride.SampleScreenshotComparator
to Stride.Tests.ScreenshotComparator. The lpips_alex.onnx model propagates
to consumers' bins via <None CopyToOutputDirectory>.

samples/Tests/Stride.Samples.Tests.csproj drops its inline OnnxRuntime +
ImageSharp PackageRefs and the explicit model <None> item — all come
transitively from the shared lib now. SampleScreenshotTests.cs uses the
new namespace and lets the comparator default to AppContext.BaseDirectory
for model lookup.

Stride.sln update is intentionally deferred — bundle it with the AutoTesting
sln entry when those land together.
2026-05-09 15:20:37 +09:00
Nicolas Musset 60d5ad213c refactor(xunit-runner): replace CommunityToolkit.Mvvm with Stride's own ViewModelBase
Copies the ViewModelBase implementation from Stride.Core.Presentation (minus
IDestroyable/IViewModelServiceProvider) so the runner has no external MVVM
dependency. Renames SetProperty → SetValue to match Stride's API.
2026-04-27 23:19:32 +02:00
Virgile Bello 9a70c883fc tests: split launchSettings into console/interactive, run xunit headlessly when not interactive
The Avalonia UI used to fire whenever STRIDE_TESTS_GPU=1, conflating the
GPU-vs-software backend choice with whether to launch the runner UI.
Now keyed off STRIDE_TESTS_INTERACTIVE=1; Test Explorer / dotnet test /
CI all bypass our Main entirely and stay headless.

Each test project's launchSettings.json gets four profiles: Software/GPU
each in (console) and (interactive) variants. Default first profile is
Software (console), so F5 from VS runs xunit in-process via
XunitFrontController + a console-printing sink and exits with status —
matches what direct exe invocation produces under dotnet test.
2026-04-24 10:50:52 +09:00
Nicolas Musset 4950387419 Upgrade to Avalonia 12
Use MarkView.Avalonia library for markdown
2026-04-21 17:18:46 +02:00
Virgile Bello 7234a896eb Merge remote-tracking branch 'origin/master' into sdsl-rewrite 2026-04-14 17:43:19 +09:00
Virgile Bello 865c404852 fix: skip Avalonia initialization on headless Linux (no DISPLAY) 2026-04-14 11:36:36 +09:00
Virgile Bello 3c7c965927 Merge branch 'master' into sdsl-rewrite
# Conflicts:
#	build/Stride.Android.sln
#	build/Stride.Build.props
#	build/Stride.Runtime.sln
#	build/Stride.UnitTests.Build.targets
#	build/Stride.build
#	build/Stride.iOS.sln
#	build/Stride.sln
#	sources/Directory.Packages.props
#	sources/engine/Stride.Engine.Tests/TesselationTest.cs
#	sources/engine/Stride.Graphics/OpenGL/CommandList.OpenGL.cs
#	sources/engine/Stride.Graphics/OpenGL/GraphicsDevice.OpenGL.cs
#	sources/engine/Stride.Graphics/Vulkan/GraphicsAdapterFactory.Vulkan.cs
#	sources/engine/Stride.Graphics/Vulkan/GraphicsDevice.Vulkan.cs
#	sources/engine/Stride.Shaders.Compiler/Stride.Shaders.Compiler.csproj
#	sources/engine/Stride.Shaders.Parser/Stride.Shaders.Parser.csproj
#	sources/engine/Stride.Shaders.Tests/Stride.Shaders.Tests.Windows.csproj
#	sources/sdk/Stride.Build.Sdk/Sdk/Stride.Graphics.targets
#	sources/shaders/Irony.GrammarExplorer/Irony.GrammarExplorer.csproj
#	sources/shaders/Irony/Irony.csproj
#	sources/shaders/Stride.Core.Shaders/Stride.Core.Shaders.csproj
#	sources/shaders/Stride.Shaders/Stride.Shaders.csproj
#	sources/targets/Stride.UnitTests.targets
#	sources/targets/Stride.targets
2026-04-09 11:31:09 +09:00
Nicolas Musset 11de67077d refactor: replace SDK-style project references with direct imports
Projects no longer use `<Project Sdk="Stride.Build.Sdk">`. Every .csproj
now imports SDK props/targets directly from source:

  <Project>
    <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove(...))\sdk\...\Sdk.props" />
    ...
    <Import Project="$(StrideRoot)sources\sdk\...\Sdk.targets" />
  </Project>

The props import uses GetDirectoryNameOfFileAbove (no pre-set property
needed) and the targets import uses $(StrideRoot) (safe after the SDK
chain is loaded).

SDK internal cross-references (Editor and Tests SDKs) now use
$(MSBuildThisFileDirectory) relative paths instead of the Sdk= resolver.

Other changes:
- global.json: msbuild-sdks entries commented out
- nuget.config: stride-sdks source and packageSourceMapping commented out
- .github/actions/build-sdk: removed (no longer a prerequisite)
- build/compile.bat: removed SDK build step
- sources/Directory.Build.props: replaced TODO with explanatory comment
- build/docs/SDK-GUIDE.md: added direct-import section and revert guide
- sources/sdk/README.md: new file explaining import modes and revert steps

To revert to full-SDK mode: build SDK packages, uncomment global.json
and nuget.config entries, restore <Project Sdk="..."> opening tags, and
revert the four SDK internal files. See sources/sdk/README.md.
2026-03-28 17:48:36 +01:00
Nicolas Musset 2e2a25bf96 Merge branch 'master' into feature/stride-sdk 2026-03-28 17:27:22 +01:00
Virgile Bello 014c7dee36 Tests: Add IsTestProject to xunit.runner.stride.csproj 2026-03-17 17:45:06 +09:00
Nicolas Musset 4a92770716 Rename Stride.Sdk to Stride.Build.Sdk to reserve Stride.Sdk for future user-facing SDK
Renames all three internal MSBuild SDK packages:
- Stride.Sdk -> Stride.Build.Sdk
- Stride.Sdk.Editor -> Stride.Build.Sdk.Editor
- Stride.Sdk.Tests -> Stride.Build.Sdk.Tests

Updates 126 consuming .csproj files, global.json, nuget.config,
build scripts, GitHub actions, and documentation. Adds README.md
to all SDK packages to eliminate NuGet warnings. Removes notes.txt.
2026-03-09 18:39:34 +01:00
ds5678 031908a2c8 Fix many warnings when building Stride 2026-03-08 17:01:55 +09:00