Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add markup+dsp validation #690

Merged
merged 2 commits into from
May 28, 2024
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
216 changes: 116 additions & 100 deletions build/.azure-pipelines.TemplateValidation.yml
Original file line number Diff line number Diff line change
@@ -1,106 +1,121 @@
parameters:
vmImage: ''
stageVariant: ''

jobs:
- job: Packages_Validation
- 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",

# 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: 'windows-2022'
vmImage: ${{ parameters.vmImage }}

strategy:
matrix:
DefaultArguments:
templateArgs: ''
DefaultArguments_net9:
templateArgs: '-tfm net9.0'
unocheckArguments: '--preview-major'
Recommended:
templateArgs: '-preset recommended'
SkiaOnlyHeads:
templateArgs: '-platforms desktop'
MobileOnlyHeads:
templateArgs: '-platforms android ios maccatalyst'
RecommendedMarkup:
templateArgs: '-preset recommended -markup csharp'
RecommendedMarkupFluent:
templateArgs: '-preset recommended -markup csharp -theme fluent'
MVVM:
templateArgs: '-preset recommended -presentation mvvm'
CSharpMarkup:
templateArgs: '-markup csharp'
NoHosting:
templateArgs: '-preset recommended -di false'
HostingOnly:
templateArgs: '-preset recommended -config false -loc false -http false -log none --navigation blank'
NoConfiguration:
templateArgs: '-preset recommended -config false'
NoLocalization:
templateArgs: '-preset recommended -loc false'
NoHttp:
templateArgs: '-preset recommended -http false'
NoSerilog:
templateArgs: '-preset recommended -log default'
NoServer:
templateArgs: '-preset recommended -server false'
NoServerNoHttp:
templateArgs: '-preset recommended -server false -http false'
NoTests:
templateArgs: '-preset recommended -tests none'
FrameNavigation:
templateArgs: '-preset recommended --navigation blank'
# Disabling this test for now as it was specific to net7
# https://github.com/unoplatform/uno.templates/issues/22
# Issue22:
# templateArgs: '-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:
templateArgs: '-preset=recommended -auth=custom'
CustomAuthMvvm:
templateArgs: '-preset=recommended -presentation mvvm -auth=custom'
CustomAuthMvuxCSharp:
templateArgs: '-preset=recommended -auth=custom -markup csharp'
CustomAuthMvvmCSharp:
templateArgs: '-preset=recommended -presentation mvvm -auth=custom -markup csharp'
WebAuthMvux:
templateArgs: '-preset=recommended -auth=web'
WebAuthMvvm:
templateArgs: '-preset=recommended -presentation mvvm -auth=web'
WebAuthMvuxCSharp:
templateArgs: '-preset=recommended -auth=web -markup csharp'
WebAuthMvvmCSharp:
templateArgs: '-preset=recommended -presentation mvvm -auth=web -markup csharp'
OidcAuthMvux:
templateArgs: '-preset=recommended -auth=oidc'
OidcAuthMvvm:
templateArgs: '-preset=recommended -presentation mvvm -auth=oidc'
OidcAuthMvuxCSharp:
templateArgs: '-preset=recommended -auth=oidc -markup csharp'
OidcAuthMvvmCSharp:
templateArgs: '-preset=recommended -presentation mvvm -auth=oidc -markup csharp'
MsalAuthMvux:
templateArgs: '-preset=recommended -auth=msal'
MsalAuthMvvm:
templateArgs: '-preset=recommended -presentation mvvm -auth=msal'
MsalAuthMvuxCSharp:
templateArgs: '-preset=recommended -auth=msal -markup csharp'
MsalAuthMvvmCSharp:
templateArgs: '-preset=recommended -presentation mvvm -auth=msal -markup csharp'
MauiBlank:
templateArgs: '-preset=blank -maui'
MauiRecommended:
templateArgs: '-preset=recommended -maui'
ThemeService:
templateArgs: '-theme-service'
# https://github.com/unoplatform/uno.templates/issues/396
Issue396:
templateArgs: '-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:
templateArgs: '-preset recommended -auth msal -markup csharp'
# https://github.com/unoplatform/uno.templates/issues/477
Issue477:
templateArgs: '-preset recommended -theme material -toolkit'
# https://github.com/unoplatform/uno.templates/issues/500
Issue500:
templateArgs: '-preset blank -tfm net8.0 -markup csharp -presentation mvux -theme material -di -config -http -nav regions -log default -server -auth msal'
Issue572:
templateArgs: '-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'
matrix: $[ dependencies.Matrix_Gen_${{ parameters.stageVariant }}.outputs['TestMatrix.groups'] ]

variables:
- name: UseDotNetNativeToolchain
Expand All @@ -109,7 +124,8 @@ jobs:
value: ''

steps:
- template: templates/package-validation.yml
- template: templates/package-validation.yml
parameters:
arguments: $(templateArgs)
xCodeRoot: '/Applications/Xcode_15.2.app'
arguments: $(validations)
unocheckArguments: $(unocheckArguments)
14 changes: 13 additions & 1 deletion build/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pr:
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
IsCanaryBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries/')]
ValidationUnoCheckVersion: '1.22.0-dev.2'
ValidationUnoCheckVersion: '1.24.0-dev.7'
ValidationDotNetVersion: '8.0.204'

stages:
Expand Down Expand Up @@ -66,6 +66,18 @@ stages:
dependsOn: Build
jobs:
- template: .azure-pipelines.TemplateValidation.yml
parameters:
vmImage: 'windows-2022'
stageVariant: 'windows'
- template: .azure-pipelines.TemplateValidation.yml
parameters:
vmImage: 'ubuntu-latest'
stageVariant: 'linux'
# net9.0 base version for catalyst is 14.5 and should be 15.0 in uno.sdk
# - template: .azure-pipelines.TemplateValidation.yml
# parameters:
# vmImage: 'macos-13'
# stageVariant: 'macos13'
- template: .azure-pipelines.UnoLibValidation.yml
- template: .azure-pipelines.UnoMauiLibValidation.yml
- template: .azure-pipelines.UWPValidation.yml
Expand Down
Loading
Loading