Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions build/ci/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ stages:
solution: samples/Playground/Playground.sln
solutionName: Playground

- template: stage-build-windows.yml
parameters:
solution: samples/MauiEmbedding/MauiEmbedding.sln
solutionName: MauiEmbedding
# Disable: needs update https://github.com/unoplatform/uno.extensions/issues/3056
#- template: stage-build-windows.yml
# parameters:
# solution: samples/MauiEmbedding/MauiEmbedding.sln
# solutionName: MauiEmbedding

- template: stage-build-wasm.yml

Expand All @@ -69,6 +70,7 @@ stages:
- template: stage-build-uitests-wasm.yml
# Disabled waiting on uno fix: https://github.com/unoplatform/uno/pull/17668
# - template: stage-build-runtimetests-skia.yml
- template: stage-build-runtimetests-skia-hotreload.yml

##
## Publishing
Expand Down
56 changes: 56 additions & 0 deletions build/ci/stage-build-runtimetests-skia-hotreload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
jobs:
- job: Skia_HotReload_Tests
cancelTimeoutInMinutes: 0
displayName: 'Hot-Reload Tests - Skia Desktop (Debug)'
timeoutInMinutes: 60

pool:
vmImage: 'ubuntu-24.04'

variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget

steps:
- checkout: self
clean: true

- template: templates/host-cleanup-linux.yml

- template: templates/dotnet-install.yml

- script: |
dotnet tool install -g uno.check --add-source https://api.nuget.org/v3/index.json
uno-check --target linux --fix --non-interactive --ci

displayName: 'Run uno-check'

- script: dotnet build Uno.Extensions-runtimetests.slnf /p:Build_Android=false /p:Build_iOS=false /p:Build_Windows=false /p:Build_MacCatalyst=false /p:Build_Web=false -c Debug -p:GeneratePackageOnBuild=false -bl:$(Build.ArtifactStagingDirectory)/skia-hotreload-test-build.binlog
displayName: 'Build Runtime Tests app (Debug)'
workingDirectory: $(Build.SourcesDirectory)

- task: PublishBuildArtifacts@1
displayName: Publish Build Logs
retryCountOnTaskFailure: 3
condition: always()
inputs:
PathtoPublish: $(build.artifactstagingdirectory)/skia-hotreload-test-build.binlog
ArtifactName: skia-hotreload-test-build
ArtifactType: Container

- script: xvfb-run --auto-servernum --server-args='-screen 0 1280x1024x24' dotnet Uno.Extensions.RuntimeTests.dll
displayName: 'Run Hot-Reload Tests'
workingDirectory: $(Build.SourcesDirectory)/src/Uno.Extensions.RuntimeTests/Uno.Extensions.RuntimeTests/bin/Uno.Extensions.RuntimeTests/Debug/net9.0-desktop
env:
UNO_RUNTIME_TESTS_RUN_TESTS: '{"Filter": {"Value": "_HotReload"}}'
UNO_RUNTIME_TESTS_OUTPUT_PATH: '$(Common.TestResultsDirectory)/skia-hotreload-tests-results.xml'
DOTNET_MODIFIABLE_ASSEMBLIES: debug

- task: PublishTestResults@2
displayName: 'Publish Hot-Reload Tests Results'
condition: always()
retryCountOnTaskFailure: 3
inputs:
testRunTitle: 'Hot-Reload Runtime Tests'
testResultsFormat: 'NUnit'
testResultsFiles: '$(Common.TestResultsDirectory)/skia-hotreload-tests-results.xml'
failTaskOnFailedTests: true
33 changes: 13 additions & 20 deletions build/ci/stage-build-runtimetests-skia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,29 @@
cancelTimeoutInMinutes: 0
displayName: 'Runtime Tests - Skia Desktop'
timeoutInMinutes: 60

pool:
vmImage: 'ubuntu-24.04'

variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
DotNetVersion: '8.0.301'
UnoCheck_Version: '1.23.0'
# UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/3b250f49b719d1cf5ab205f997c3959b5e9fed1d/manifests/uno.ui.manifest.json'

steps:
- checkout: self
clean: true

- template: templates/host-cleanup-linux.yml

- task: UseDotNet@2
displayName: 'Use .NET'
inputs:
packageType: 'sdk'
version: $(DotNetVersion)


- template: templates/dotnet-install.yml

- script: |
dotnet tool install -g uno.check --version $(UnoCheck_Version) --add-source https://api.nuget.org/v3/index.json
uno-check --target skiagtk --fix --non-interactive --ci
displayName: 'Run uno-check'
dotnet tool install -g uno.check --add-source https://api.nuget.org/v3/index.json
uno-check --target linux --fix --non-interactive --ci

displayName: 'Run uno-check'

- script: dotnet build Uno.Extensions-runtimetests.slnf /p:Build_Android=false /p:Build_iOS=false /p:Build_Windows=false /p:Build_MacCatalyst=false /p:Build_Web=false -c Debug -p:GeneratePackageOnBuild=false -bl:$(Build.ArtifactStagingDirectory)/skia-runtime-test-build.binlog
displayName: 'Build Runtime Tests app'
displayName: 'Build Runtime Tests app (Debug)'
workingDirectory: $(Build.SourcesDirectory)

- task: PublishBuildArtifacts@1
Expand All @@ -45,10 +38,10 @@
ArtifactType: Container

- script: xvfb-run --auto-servernum --server-args='-screen 0 1280x1024x24' dotnet Uno.Extensions.RuntimeTests.dll
displayName: 'Run Runtime Tests'
workingDirectory: $(Build.SourcesDirectory)/src/Uno.Extensions.RuntimeTests/Uno.Extensions.RuntimeTests/bin/Debug/net9.0-desktop
displayName: 'Run Runtime Tests (excluding hot-reload)'
workingDirectory: $(Build.SourcesDirectory)/src/Uno.Extensions.RuntimeTests/Uno.Extensions.RuntimeTests/bin/Uno.Extensions.RuntimeTests/Debug/net9.0-desktop
env:
UNO_RUNTIME_TESTS_RUN_TESTS: '{}'
UNO_RUNTIME_TESTS_RUN_TESTS: '{"Filter": {"Value": "!_HotReload"}}'
UNO_RUNTIME_TESTS_OUTPUT_PATH: '$(Common.TestResultsDirectory)/skia-runtime-tests-results.xml'

- task: PublishTestResults@2
Expand All @@ -59,4 +52,4 @@
testRunTitle: 'Runtime Tests Run'
testResultsFormat: 'NUnit'
testResultsFiles: '$(Common.TestResultsDirectory)/skia-runtime-tests-results.xml'
failTaskOnFailedTests: true
failTaskOnFailedTests: true
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44",
"Uno.Sdk": "6.0.67",
"Uno.Sdk.Private": "6.4.43"
"Uno.Sdk.Private": "6.6.0-dev.982"
}
}
8 changes: 4 additions & 4 deletions samples/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<SkiaSharpVersion>3.119.1</SkiaSharpVersion>
<SvgSkiaVersion>3.0.2</SvgSkiaVersion>
<WinAppSdkVersion>1.7.250909003</WinAppSdkVersion>
<WinAppSdkBuildToolsVersion>10.0.26100.4948</WinAppSdkBuildToolsVersion>
<MicrosoftLoggingVersion>9.0.9</MicrosoftLoggingVersion>
<WinAppSdkBuildToolsVersion>10.0.26100.7463</WinAppSdkBuildToolsVersion>
<MicrosoftLoggingVersion>9.0.14</MicrosoftLoggingVersion>
<WindowsCompatibilityVersion>8.0.15</WindowsCompatibilityVersion>
<MicrosoftIdentityClientVersion>4.70.2</MicrosoftIdentityClientVersion>
<MicrosoftIdentityClientVersion>4.72.1</MicrosoftIdentityClientVersion>
<CommunityToolkitMvvmVersion>8.4.0</CommunityToolkitMvvmVersion>
<PrismVersion>9.0.537</PrismVersion>
<AndroidMaterialVersion>1.12.0.3</AndroidMaterialVersion>
Expand All @@ -16,7 +16,7 @@
<AndroidXRecyclerViewVersion>1.4.0.3</AndroidXRecyclerViewVersion>
<AndroidXActivityVersion>1.10.1.3</AndroidXActivityVersion>
<AndroidXBrowserVersion>1.8.0.9</AndroidXBrowserVersion>
<AndroidXSwipeRefreshLayoutVersion>1.1.0.27</AndroidXSwipeRefreshLayoutVersion>
<AndroidXSwipeRefreshLayoutVersion>1.1.0.28</AndroidXSwipeRefreshLayoutVersion>
<AndroidXNavigationVersion>2.8.9.1</AndroidXNavigationVersion>
<AndroidXCollectionVersion>1.5.0.3</AndroidXCollectionVersion>
<MauiVersion>9.0.111</MauiVersion>
Expand Down
1 change: 0 additions & 1 deletion samples/MauiEmbedding/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
<PackageVersion Include="Telerik.UI.for.Maui" Version="5.1.0" Condition="$(_UseTelerik)" />
<PackageVersion Include="Esri.ArcGISRuntime.Maui" Version="200.1.0" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.4" />

</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions samples/MauiEmbedding/MauiEmbedding/MauiEmbedding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
By setting this property, we force the Uno.Sdk[.Private] to use the same version as the one used when building the extension packages.
-->
<WinAppSdkVersion>1.7.250909003</WinAppSdkVersion>

<UnoToolkitVersion>8.4.2</UnoToolkitVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
27 changes: 14 additions & 13 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="7.0.1" />
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.1.1" />
<PackageVersion Include="FluentAssertions" Version="6.7.0" />
<PackageVersion Include="Duende.IdentityModel.OidcClient" Version="6.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.14" />
<PackageVersion Include="Microsoft.Kiota.Abstractions" Version="1.21.0" />
<PackageVersion Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.21.0" />
<PackageVersion Include="Microsoft.Kiota.Serialization.Form" Version="1.21.0" />
Expand All @@ -18,16 +18,16 @@
<PackageVersion Include="MSTest.TestFramework" Version="2.2.9" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.9" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.9" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.61.3" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.61.3" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.14" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.14" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.14" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.14" />
<PackageVersion Include="Microsoft.Extensions.Localization.Abstractions" Version="9.0.14" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.14" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.14" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.72.1" />
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.72.1" />
<PackageVersion Include="Microsoft.Identity.Client.Broker" Version="4.72.1" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="9.0.111" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.111" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
Expand Down Expand Up @@ -60,8 +60,9 @@
<PackageVersion Include="Uno.Extensions.Markup.WinUI" Version="5.3.12" />
<PackageVersion Include="Uno.Roslyn" Version="1.3.0-dev.12" />
<PackageVersion Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="$(UnoVersion)" />
<PackageVersion Include="Uno.UI.RuntimeTests.Engine" Version="0.37.0-dev.126" />
<PackageVersion Include="Uno.UI.RuntimeTests.Engine" Version="2.0.0-dev.79" />
<PackageVersion Include="Uno.WinUI" Version="$(UnoVersion)" />
<PackageVersion Include="Uno.WinUI.DevServer" Version="$(UnoVersion)" />
<PackageVersion Include="Uno.WinUI.Markup" Version="5.3.12" />
<PackageVersion Include="Uno.WinUI.MSAL" Version="$(UnoVersion)" />
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Uno.Sdk">
<Project Sdk="Uno.Sdk.Private">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Uno.Extensions.Core.UI/WindowExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Uno.Extensions;
/// <summary>
/// Extensions for <see cref="Window"/>
/// </summary>
public static class WindowExtensions
public static partial class WindowExtensions
{
/// <summary>
/// Gets the theme service for the window
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Uno.Sdk">
<Project Sdk="Uno.Sdk.Private">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand Down
35 changes: 35 additions & 0 deletions src/Uno.Extensions.Reactive.UI.Tests/Given_HotReload.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#if DEBUG // Hot-reload tests are only relevant in debug configuration
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Uno.UI.RuntimeTests;

namespace Uno.Extensions.Reactive.WinUI.Tests;

[TestClass]
[RunsInSecondaryApp(ignoreIfNotSupported: true)]
public class Given_HotReload
{
[TestInitialize]
public void Setup()
{
// Allow more time for the dev-server to load the Roslyn workspace (solution can be large)
HotReloadHelper.DefaultWorkspaceTimeout = TimeSpan.FromSeconds(300);
// Allow more time for the first metadata update (delta compilation can be slow on CI)
HotReloadHelper.DefaultMetadataUpdateTimeout = TimeSpan.FromSeconds(60);
}

[TestMethod]
public async Task When_UpdateMethodBody_Then_MetadataUpdateReceived(CancellationToken ct)
{
Assert.AreEqual("original", HotReloadTarget.GetValue());

await using var _ = await HotReloadHelper.UpdateSourceFile(
"../../Uno.Extensions.Reactive.UI.Tests/HotReloadTarget.cs",
"""return "original";""",
"""return "updated";""",
ct);

Assert.AreEqual("updated", HotReloadTarget.GetValue());
}
}
#endif
13 changes: 13 additions & 0 deletions src/Uno.Extensions.Reactive.UI.Tests/HotReloadTarget.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Uno.Extensions.Reactive.WinUI.Tests;

/// <summary>
/// Target class for hot-reload tests. The method body is modified at runtime
/// by Given_HotReload via HotReloadHelper.
/// </summary>
internal static class HotReloadTarget
{
internal static string GetValue()
{
return "original";
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Uno.Sdk">
<Project Sdk="Uno.Sdk.Private">
<Import Project="..\tfms-ui-winui.props" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Uno.Sdk">
<Project Sdk="Uno.Sdk.Private">
<Import Project="..\..\tfms-ui-winui.props" />

<PropertyGroup>
Expand All @@ -21,5 +21,8 @@
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Uno.UI.RuntimeTests.Engine" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" />
<!-- Required for hot-reload tests ([RunsInSecondaryApp]) - enables HAS_UNO_DEVSERVER in the RuntimeTests.Engine.
Debug-only: in Release the DevServer assembly is not published and would cause a FileNotFoundException. -->
<PackageReference Include="Uno.WinUI.DevServer" PrivateAssets="all" Condition="'$(Configuration)' == 'Debug'" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using Uno.Extensions.Navigation.UI.Tests;
using Uno.Extensions.Reactive.WinUI.Tests;
using Uno.Resizetizer;
using Uno.UI.RuntimeTests;

namespace Uno.Extensions.RuntimeTests;
public partial class App : Application
{
private static void ForceAssemblyLoading()
{
var reactive_UI_Tests = new Given_FeedView();
#if DEBUG // Hot-reload tests are only relevant in debug configuration
var reactive_HotReload_Tests = new Given_HotReload();
#endif
var navigation_UI_Tests = new Given_RouteNotifier();
var navigation_ChainedResult_Tests = new Given_ChainedGetDataAsync();
var navigation_TabNavigation_Tests = new Given_TabNavigation();
Expand All @@ -28,7 +32,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
{
MainWindow = new Window();
#if DEBUG
MainWindow.EnableHotReload();
MainWindow.UseStudio();
#endif


Expand Down Expand Up @@ -69,6 +73,8 @@ public static void InitializeLogging()

// Default filters for Uno Platform namespaces
builder.AddFilter("Uno", LogLevel.Warning);
builder.AddFilter("Uno.UI.RuntimeTests", LogLevel.Trace);
builder.AddFilter("Uno.UI.RemoteControl", LogLevel.Trace);
builder.AddFilter("Windows", LogLevel.Warning);
builder.AddFilter("Microsoft", LogLevel.Warning);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Uno.Sdk">
<Project Sdk="Uno.Sdk.Private">
<Import Project="..\..\tfms-ui-winui.props" />
<PropertyGroup>

Expand Down
4 changes: 1 addition & 3 deletions testing/TestHarness/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Facebook" Version="6.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="6.0.7" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.7" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.66.2" />
<PackageVersion Include="Microsoft.Identity.Client" Version="4.72.1" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.2.0" />
<PackageVersion Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.11" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
Expand Down
Loading