Skip to content

Commit

Permalink
ci: Split skia tests into two stages (UWP and WinUI)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Jan 22, 2024
1 parent a39fd6b commit b1c9239
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 52 deletions.
73 changes: 25 additions & 48 deletions build/ci/.azure-devops-skia-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ parameters:
vmImage: ''
vmMacImage: ''
poolName: ''
UNO_UWP_BUILD: ''
XAML_FLAVOR_BUILD: ''

snapshotGroups:
- 0
Expand Down Expand Up @@ -29,15 +31,8 @@ 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
UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- checkout: self
Expand Down Expand Up @@ -116,11 +111,14 @@ jobs:
vmImage: ${{ parameters.vmImage }}

dependsOn: Skia_Tests_Build
condition: and(succeeded(), eq(variables['UNO_UWP_BUILD'], 'false'))

variables:
SamplesAppArtifactName: skia-gtk-samples-app-WinUI
SamplesAppArtifactPath: $(build.sourcesdirectory)/build/$(SamplesAppArtifactName)
SnapshotGroupCount: ${{ parameters.snapshotGroupCount }}
UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

strategy:
matrix:
Expand Down Expand Up @@ -160,39 +158,15 @@ jobs:

strategy:
matrix:
UWP_GROUP_0:
UNO_UWP_BUILD: true
XAML_FLAVOR_BUILD: UWP
GROUP_0:
UITEST_RUNTIME_TEST_GROUP: 0
UITEST_RUNTIME_TEST_GROUP_COUNT: 3

UWP_GROUP_1:
UNO_UWP_BUILD: true
XAML_FLAVOR_BUILD: UWP
GROUP_1:
UITEST_RUNTIME_TEST_GROUP: 1
UITEST_RUNTIME_TEST_GROUP_COUNT: 3

UWP_GROUP_2:
UNO_UWP_BUILD: true
XAML_FLAVOR_BUILD: UWP
UITEST_RUNTIME_TEST_GROUP: 2
UITEST_RUNTIME_TEST_GROUP_COUNT: 3

WinUI_GROUP_0:
UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI
UITEST_RUNTIME_TEST_GROUP: 0
UITEST_RUNTIME_TEST_GROUP_COUNT: 3

WinUI_GROUP_1:
UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI
UITEST_RUNTIME_TEST_GROUP: 1
UITEST_RUNTIME_TEST_GROUP_COUNT: 3

WinUI_GROUP_2:
UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI
GROUP_2:
UITEST_RUNTIME_TEST_GROUP: 2
UITEST_RUNTIME_TEST_GROUP_COUNT: 3

Expand All @@ -209,6 +183,9 @@ jobs:
UnoDisableNetCurrentMobile: true
UnoDisableNetCurrent: true

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:

- template: templates/download-winui-converted-tree.yml
Expand Down Expand Up @@ -262,11 +239,15 @@ jobs:
vmImage: ${{ parameters.vmImage }}

dependsOn: Skia_Tests_Build
condition: and(succeeded(), eq(variables['UNO_UWP_BUILD'], 'false'))

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

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- task: DownloadBuildArtifacts@0
inputs:
Expand Down Expand Up @@ -296,22 +277,15 @@ jobs:
pool:
vmImage: ${{ parameters.vmImage }}

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

WinUI:
UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI

dependsOn: Skia_Tests_Build

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

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- task: DownloadBuildArtifacts@0
inputs:
Expand All @@ -337,16 +311,19 @@ jobs:
- job: Uno_Islands_Skia_Wpf_Runtime_Tests_Build
displayName: 'Run Uno Islands Skia WPF Runtime Tests'
timeoutInMinutes: 45

condition: and(succeeded(), eq(variables['UNO_UWP_BUILD'], 'false'))
pool:
vmImage: ${{ parameters.vmImage }}

dependsOn: Skia_Tests_Build

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

UNO_UWP_BUILD: ${{ parameters.UNO_UWP_BUILD }}
XAML_FLAVOR_BUILD: ${{ parameters.XAML_FLAVOR_BUILD }}

steps:
- task: DownloadBuildArtifacts@0
inputs:
Expand Down
24 changes: 20 additions & 4 deletions build/ci/.azure-devops-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ stages:
parameters:
poolName: '$(linuxScaledPool)'

- stage: skia_tests
displayName: Tests - Skia
- stage: skia_tests_uwp
displayName: Tests - Skia UWP
dependsOn:
- Setup
- convert_tree
Expand All @@ -142,7 +142,23 @@ stages:
vmImage: '$(windows2022HostedVMImage)'
vmMacImage: '$(macOSVMImage)'
poolName: '$(windowsScaledPool)'

UNO_UWP_BUILD: true
XAML_FLAVOR_BUILD: UWP

- stage: skia_tests_winui
displayName: Tests - Skia WinUI
dependsOn:
- Setup

jobs:
- template: .azure-devops-skia-tests.yml
parameters:
vmImage: '$(windows2022HostedVMImage)'
vmMacImage: '$(macOSVMImage)'
poolName: '$(windowsScaledPool)'
UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI

- stage: macos_tests
displayName: Tests - macOS
dependsOn:
Expand Down Expand Up @@ -201,7 +217,7 @@ stages:
- ios_tests
- android_tests
- macos_tests
- skia_tests
- skia_tests_winui

jobs:
- template: .azure-devops-screenshot-compare.yml
Expand Down

0 comments on commit b1c9239

Please sign in to comment.