-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.azure-pipelines.TemplateValidation.yml
132 lines (114 loc) · 6.56 KB
/
.azure-pipelines.TemplateValidation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
parameters:
vmImage: ''
stageVariant: ''
jobs:
- job: Matrix_Gen_${{ parameters.stageVariant }}
displayName: Test Matrix Generation ${{ parameters.stageVariant }}
steps:
- pwsh: |
$tests = @(
# The format is "TestName;[PlatformFilter];Arguments"
# The platform
"DefaultArgs;;",
"Recommended;;-preset recommended",
"SkiaOnlyHeads;;-platforms desktop",
"MobileOnlyHeads;;-platforms android ios maccatalyst",
"RecommendedMarkup;;-preset recommended -markup csharp",
"RecommendedMarkupDsp;;-preset recommended -markup csharp -dsp",
"RecommendedMarkupFluent;;-preset recommended -markup csharp -theme fluent",
"MVVM;;-preset recommended -presentation mvvm",
"CSharpMarkup;;-markup csharp",
"NoHosting;;-preset recommended -di false",
"HostingOnly;;-preset recommended -config false -loc false -http false -log none --navigation blank",
"NoConfiguration;;-preset recommended -config false",
"NoLocalization;;-preset recommended -loc false",
"NoHttp;;-preset recommended -http false",
"NoSerilog;;-preset recommended -log default",
"NoServer;;-preset recommended -server false",
"NoServerNoHttp;;-preset recommended -server false -http false",
"NoTests;;-preset recommended -tests none",
"FrameNavigation;; -preset recommended --navigation blank",
"WasmMultiThreading;;-wasm-multi-threading true",
# Disabling this test for now as it was specific to net7
# https://github.com/unoplatform/uno.templates/issues/22
# "Issue22;;-preset blank -tfm net7.0 -platforms android -platforms ios -platforms maccatalyst -platforms windows -platforms wasm -platforms desktop -presentation mvvm -server false -tests none -vscode false -pwa false -di true -nav regions -log none -theme material",
"CustomAuthMvux;;-preset=recommended -auth=custom",
"CustomAuthMvvm;;-preset=recommended -presentation mvvm -auth=custom",
"CustomAuthMvuxCSharp;;-preset=recommended -auth=custom -markup csharp",
"CustomAuthMvvmCSharp;;-preset=recommended -presentation mvvm -auth=custom -markup csharp",
"WebAuthMvux;;-preset=recommended -auth=web",
"WebAuthMvvm;;-preset=recommended -presentation mvvm -auth=web",
"WebAuthMvuxCSharp;;-preset=recommended -auth=web -markup csharp",
"WebAuthMvvmCSharp;;-preset=recommended -presentation mvvm -auth=web -markup csharp",
"OidcAuthMvux;;-preset=recommended -auth=oidc",
"OidcAuthMvvm;;-preset=recommended -presentation mvvm -auth=oidc",
"OidcAuthMvuxCSharp;;-preset=recommended -auth=oidc -markup csharp",
"OidcAuthMvvmCSharp;;-preset=recommended -presentation mvvm -auth=oidc -markup csharp",
"MsalAuthMvux;;-preset=recommended -auth=msal",
"MsalAuthMvvm;;-preset=recommended -presentation mvvm -auth=msal",
"MsalAuthMvuxCSharp;;-preset=recommended -auth=msal -markup csharp",
"MsalAuthMvvmCSharp;;-preset=recommended -presentation mvvm -auth=msal -markup csharp",
"MauiBlank;Windows;-preset=blank -maui",
"MauiRecommended;Windows;-preset=recommended -maui",
"MauiBlank_Linux;Linux;-preset=blank -maui -platforms android desktop wasm",
"MauiRecommended_Linux;Linux;-preset=recommended -maui -platforms android desktop wasm",
"ThemeService;;-theme-service",
# https://github.com/unoplatform/uno.templates/issues/396
"Issue396;;-preset blank -platforms windows -platforms android -presentation none -theme fluent -nav blank -log none -maui -markup csharp",
# https://github.com/unoplatform/uno.templates/issues/414
"Issue414;;-preset recommended -auth msal -markup csharp",
# https://github.com/unoplatform/uno.templates/issues/477
"Issue477;;-preset recommended -theme material -toolkit",
# https://github.com/unoplatform/uno.templates/issues/500
"Issue500;;-preset blank -markup csharp -presentation mvux -theme material -di -config -http -nav regions -log default -server -auth msal",
# https://github.com/unoplatform/uno.templates/issues/572
"Issue572;;-preset `"recommended`" -id `"com.companyname.TestDuplicatedReference`" -pub `"O=TestDuplicatedReference`" -platforms `"android`" -platforms `"ios`" -platforms `"wasm`" -platforms `"desktop`" -theme-service -vscode False -pwa False -theme `"material`" -presentation `"mvvm`" -config -di -log `"default`" -nav `"regions`" -http -loc -server False -tests `"unit`" -tests `"ui`" -toolkit -dsp"
);
$matrixGroups = [ordered]@{}
$currentGroup = @()
$groupSize = 5
# Generate matrix for net8
for ($i = 0; $i -lt $tests.Count; $i++)
{
$currentGroup += $tests[$i];
if ($currentGroup.Count -eq $groupSize) {
$matrixGroups["Group$($matrixGroups.Count)"] = @{
'unocheckArguments' = ''
'validations' = $currentGroup -join "`r`n"
};
$currentGroup = @()
}
}
# generate matrix for net9
for ($i = 0; $i -lt $tests.Count; $i++)
{
$currentGroup += $tests[$i] + " -tfm net9.0";
if ($currentGroup.Count -eq $groupSize) {
$matrixGroups["Group$($matrixGroups.Count)_net9"] = @{
'unocheckArguments' = '--pre-major'
'validations' = $currentGroup -join "`r`n"
};
$currentGroup = @()
}
}
$matrixAsJson = $matrixGroups | ConvertTo-Json -Compress
echo "json: $matrixAsJson"
echo "##vso[task.setvariable variable=groups;isOutput=true]$matrixAsJson"
name: TestMatrix
- job: Packages_Validation_${{ parameters.stageVariant }}
dependsOn: Matrix_Gen_${{ parameters.stageVariant }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix: $[ dependencies.Matrix_Gen_${{ parameters.stageVariant }}.outputs['TestMatrix.groups'] ]
variables:
- name: UseDotNetNativeToolchain
value: false
- name: unocheckArguments
value: ''
steps:
- template: templates/package-validation.yml
parameters:
xCodeRoot: '/Applications/Xcode_15.2.app'
arguments: $(validations)
unocheckArguments: $(unocheckArguments)