Skip to content

Commit

Permalink
Merge pull request unoplatform#13749 from unoplatform/dev/mazi/gtk-wi…
Browse files Browse the repository at this point in the history
…nui-runtime-tests
  • Loading branch information
MartinZikmund authored Sep 22, 2023
2 parents 4aaf2c0 + 6161d90 commit 8d1f0b0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 18 deletions.
68 changes: 51 additions & 17 deletions build/ci/.azure-devops-skia-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,22 @@ jobs:
UnoDisableNetCurrentMobile: true
UnoDisableNetCurrent: true

strategy:
matrix:
UWP:
UNO_UWP_BUILD: true
XAML_FLAVOR_BUILD: UWP

WinUI:
UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI

steps:

- checkout: self
clean: true

- template: templates/download-winui-converted-tree.yml

- template: templates/gitversion.yml
- template: templates/dotnet-install.yml

Expand All @@ -40,7 +54,7 @@ jobs:
condition: always()
inputs:
PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.Gtk\bin\Release\net7.0
ArtifactName: skia-gtk-samples-app
ArtifactName: skia-gtk-samples-app-$(XAML_FLAVOR_BUILD)
ArtifactType: Container

- powershell: dotnet msbuild src/SamplesApp/SamplesApp.Skia.WPF/SamplesApp.Skia.WPF.csproj /r /m /p:Configuration=Release /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build-wpf.binlog
Expand All @@ -51,7 +65,7 @@ jobs:
condition: always()
inputs:
PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.WPF\bin\Release\net7.0-windows
ArtifactName: skia-wpf-samples-app
ArtifactName: skia-wpf-samples-app-$(XAML_FLAVOR_BUILD)
ArtifactType: Container

- powershell: dotnet msbuild src/SamplesApp/UnoIslandsSamplesApp.Skia.WPF/UnoIslandsSamplesApp.Skia.Wpf.csproj /r /m /p:Configuration=Release /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build-wpf-islands.binlog
Expand All @@ -62,7 +76,7 @@ jobs:
condition: always()
inputs:
PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\UnoIslandsSamplesApp.Skia.WPF\bin\Release\net7.0-windows
ArtifactName: uno-islands-skia-wpf-samples-app
ArtifactName: uno-islands-skia-wpf-samples-app-$(XAML_FLAVOR_BUILD)
ArtifactType: Container

- powershell: dotnet publish src/SamplesApp/SamplesApp.Skia.Linux.FrameBuffer/SamplesApp.Skia.Linux.FrameBuffer.csproj -c Release -f net7.0 /bl:$(build.artifactstagingdirectory)\build-framebuffer.binlog
Expand All @@ -73,7 +87,7 @@ jobs:
condition: always()
inputs:
PathtoPublish: $(Build.SourcesDirectory)\src\SamplesApp\SamplesApp.Skia.Linux.FrameBuffer\bin\Release\net7.0
ArtifactName: skia-framebuffer-samples-app
ArtifactName: skia-framebuffer-samples-app-$(XAML_FLAVOR_BUILD)
ArtifactType: Container

- task: PublishBuildArtifacts@1
Expand All @@ -97,17 +111,21 @@ jobs:

dependsOn: Skia_Tests_Build

variables:
SamplesAppArtifactName: skia-gtk-samples-app-UWP
SamplesAppArtifactPath: $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)

steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: skia-gtk-samples-app
artifactName: $(SamplesAppArtifactName)
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-install.yml
- template: templates/gtk-install-macos.yml

- script: |
cd $(build.sourcesdirectory)/build/skia-gtk-samples-app
cd $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)
dotnet SamplesApp.Skia.Gtk.dll --auto-screenshots=$(build.artifactstagingdirectory)/screenshots/skia-gtk-screenshots
displayName: Run Skia GTK Snapshot Tests
Expand All @@ -127,10 +145,18 @@ jobs:
pool:
vmImage: ${{ parameters.vmMacImage }}

strategy:
matrix:
UWP:
XAML_FLAVOR_BUILD: UWP

WinUI:
XAML_FLAVOR_BUILD: WinUI

dependsOn: Skia_Tests_Build

variables:
SamplesAppArtifactName: skia-gtk-samples-app
SamplesAppArtifactName: skia-gtk-samples-app-$(XAML_FLAVOR_BUILD)
SamplesAppArtifactPath: $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)
UnoEnableHRuntimeTests: true

Expand Down Expand Up @@ -162,7 +188,7 @@ jobs:
cd $(SamplesAppArtifactPath)
dotnet SamplesApp.Skia.Gtk.dll --runtime-tests=$(build.sourcesdirectory)/build/skia-gtk-runtime-tests-results.xml
displayName: Run Skia GTK Runtime Tests
displayName: Run Skia GTK $(XAML_FLAVOR_BUILD) Runtime Tests
env:
UnoEnableHRuntimeTests: $(UnoEnableHRuntimeTests)
SamplesAppArtifactPath: $(SamplesAppArtifactPath)
Expand All @@ -171,7 +197,7 @@ jobs:
- task: PublishTestResults@2
condition: always()
inputs:
testRunTitle: 'Skia GTK Runtime Tests'
testRunTitle: 'Skia GTK $(XAML_FLAVOR_BUILD) Runtime Tests'
testResultsFormat: 'NUnit'
testResultsFiles: '$(build.sourcesdirectory)/build/skia-gtk-runtime-tests-results.xml'
failTaskOnFailedTests: true
Expand All @@ -190,7 +216,7 @@ jobs:
dependsOn: Skia_Tests_Build

variables:
SamplesAppArtifactName: skia-wpf-samples-app
SamplesAppArtifactName: skia-wpf-samples-app-UWP
SamplesAppArtifactPath: $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)

steps:
Expand Down Expand Up @@ -222,16 +248,24 @@ jobs:
pool:
vmImage: ${{ parameters.vmImage }}

strategy:
matrix:
UWP:
XAML_FLAVOR_BUILD: UWP

WinUI:
XAML_FLAVOR_BUILD: WinUI

dependsOn: Skia_Tests_Build

variables:
SamplesAppArtifactName: skia-wpf-samples-app
SamplesAppArtifactName: skia-wpf-samples-app-$(XAML_FLAVOR_BUILD)
SamplesAppArtifactPath: $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)

steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: skia-wpf-samples-app
artifactName: $(SamplesAppArtifactName)
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-install.yml
Expand All @@ -240,12 +274,12 @@ jobs:
cd $(SamplesAppArtifactPath)
dotnet SamplesApp.Skia.Wpf.dll --runtime-tests=$(build.sourcesdirectory)/build/skia-wpf-runtime-tests-results.xml
displayName: Run Skia WPF Runtime Tests
displayName: Run Skia WPF $(XAML_FLAVOR_BUILD) Runtime Tests
- task: PublishTestResults@2
condition: always()
inputs:
testRunTitle: 'Skia WPF Runtime Tests'
testRunTitle: 'Skia WPF $(XAML_FLAVOR_BUILD) Runtime Tests'
testResultsFormat: 'NUnit'
testResultsFiles: '$(build.sourcesdirectory)/build/skia-wpf-runtime-tests-results.xml'
failTaskOnFailedTests: true
Expand All @@ -260,13 +294,13 @@ jobs:
dependsOn: Skia_Tests_Build

variables:
SamplesAppArtifactName: uno-islands-skia-wpf-samples-app
SamplesAppArtifactName: uno-islands-skia-wpf-samples-app-UWP
SamplesAppArtifactPath: $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)

steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: uno-islands-skia-wpf-samples-app
artifactName: $(SamplesAppArtifactName)
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-install.yml
Expand Down
1 change: 1 addition & 0 deletions build/ci/.azure-devops-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ stages:
displayName: Tests - Skia
dependsOn:
- Setup
- convert_tree

jobs:
- template: .azure-devops-skia-tests.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace Uno.UI.RuntimeTests.Tests.HotReload;

[TestClass]
#if !__SKIA__
#if !__SKIA__ || HAS_UNO_WINUI // Disabled due to #13757
[Ignore("Hot reload tests are only available on Skia targets")]
#endif
internal partial class Given_HotReloadWorkspace
Expand Down

0 comments on commit 8d1f0b0

Please sign in to comment.