Skip to content

Commit

Permalink
ci: Try to run on a single machine
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Oct 11, 2023
1 parent bbb0657 commit 32d2832
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 48 deletions.
142 changes: 100 additions & 42 deletions build/.azure-pipelines.TemplateValidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,79 +4,137 @@ jobs:
pool:
vmImage: 'windows-2022'

strategy:
matrix:
DefaultArguments:
variables:
- name: UseDotNetNativeToolchain
value: false

steps:
- template: templates/package-validation.yml
parameters:
templateArgs: ''
Blank:
projectName: 'DefaultArguments'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset blank'
SkiaOnlyHeads:
projectName: 'Blank'
- template: templates/package-validation.yml
parameters:
templateArgs: '-platforms gtk wpf linux-fb'
MobileOnlyHeads:
projectName: 'SkiaOnlyHeads'
- template: templates/package-validation.yml
parameters:
templateArgs: '-platforms android ios maccatalyst'
BlankMarkup:
projectName: 'MobileOnlyHeads'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset blank -markup csharp'
BlankNoCpm:
projectName: 'BlankMarkup'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset blank --cpm false'
MVVM:
projectName: 'BlankNoCpm'
- template: templates/package-validation.yml
parameters:
templateArgs: '-presentation mvvm'
NoCentralPackageManagement:
projectName: 'MVVM'
- template: templates/package-validation.yml
parameters:
templateArgs: '--cpm false'
CSharpMarkup:
projectName: 'NoCentralPackageManagement'
- template: templates/package-validation.yml
parameters:
templateArgs: '-markup csharp'
NoHosting:
projectName: 'CSharpMarkup'
- template: templates/package-validation.yml
parameters:
templateArgs: '-di false'
HostingOnly:
projectName: 'NoHosting'
- template: templates/package-validation.yml
parameters:
templateArgs: '-config false -loc false -http false -log none --navigation blank'
NoConfiguration:
projectName: 'HostingOnly'
- template: templates/package-validation.yml
parameters:
templateArgs: '-config false'
NoLocalization:
projectName: 'NoConfiguration'
- template: templates/package-validation.yml
parameters:
templateArgs: '-loc false'
NoHttp:
projectName: 'NoLocalization'
- template: templates/package-validation.yml
parameters:
templateArgs: '-http false'
NoSerilog:
projectName: 'NoHttp'
- template: templates/package-validation.yml
parameters:
templateArgs: '-log default'
NoServer:
projectName: 'NoSerilog'
- template: templates/package-validation.yml
parameters:
templateArgs: '-server false'
NoServerNoHttp:
projectName: 'NoServer'
- template: templates/package-validation.yml
parameters:
templateArgs: '-server false -http false'
NoTests:
projectName: 'NoServerNoHttp'
- template: templates/package-validation.yml
parameters:
templateArgs: '-tests none'
FrameNavigation:
projectName: 'NoTests'
- template: templates/package-validation.yml
parameters:
templateArgs: '--navigation blank'
Net8:
projectName: 'FrameNavigation'
- template: templates/package-validation.yml
parameters:
templateArgs: '-tfm net8.0'
projectName: 'Net8'
# https://github.com/unoplatform/uno.templates/issues/22
Issue22:
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset blank -tfm net7.0 -platforms android -platforms ios -platforms maccatalyst -platforms macos -platforms windows -platforms wasm -platforms gtk -platforms wpf -platforms linux-fb -presentation mvvm -server false -tests none -vscode false -pwa false -di true -nav regions -log none -theme material'
CustomAuthMvux:
projectName: 'Issue22'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -auth=custom'
CustomAuthMvvm:
projectName: 'CustomAuthMvux'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -presentation mvvm -auth=custom'
WebAuthMvux:
projectName: 'CustomAuthMvvm'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -auth=web'
WebAuthMvvm:
projectName: 'WebAuthMvux'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -presentation mvvm -auth=web'
OidcAuthMvux:
projectName: 'WebAuthMvvm'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -auth=oidc'
OidcAuthMvvm:
projectName: 'OidcAuthMvux'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -presentation mvvm -auth=oidc'
MsalAuthMvux:
projectName: 'OidcAuthMvvm'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -auth=msal'
MsalAuthMvvm:
projectName: 'MsalAuthMvux'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -presentation mvvm -auth=msal'
MauiBlank:
projectName: 'MsalAuthMvvm'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=blank -maui'
MauiRecommended:
projectName: 'MauiBlank'
- template: templates/package-validation.yml
parameters:
templateArgs: '-preset=recommended -maui'
MauiRecommendedNet8:
templateArgs: '-preset=recommended -maui -tfm net8.0'

variables:
- name: UseDotNetNativeToolchain
value: false

steps:
projectName: 'MauiRecommended'
- template: templates/package-validation.yml
parameters:
arguments: $(templateArgs)
templateArgs: '-preset=recommended -maui -tfm net8.0'
projectName: 'MauiRecommendedNet8'
16 changes: 10 additions & 6 deletions build/templates/package-validation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
parameters:
- name: arguments
- name: templateArgs
type: string
default: ''

- name: projectName
type: string
default: ''

Expand All @@ -8,7 +12,7 @@ steps:
clean: 'true'

- powershell: |
$templateArgs = '${{ parameters.arguments }}'
$templateArgs = '${{ parameters.templateArgs }}'
Write-Host "TemplateArgs = '$templateArgs'"
$dotnetVersion = '7.0.400'
$workloadRestore = 'https://maui.blob.core.windows.net/metadata/rollbacks/7.0.92.json'
Expand Down Expand Up @@ -49,7 +53,7 @@ steps:
$ErrorActionPreference = 'Stop'
# Create app with defaults
dotnet new unoapp -skip -o UnoApp1 ${{ parameters.arguments }}
dotnet new unoapp -skip -o ${{ parameters.projectName }} ${{ parameters.templateArgs }}
if ($LASTEXITCODE -ne 0)
{
throw "Exit code must be zero."
Expand All @@ -62,17 +66,17 @@ steps:
MergeBranch: false

- powershell: |
cd UnoApp1
cd ${{ parameters.projectName }}
& dotnet workload restore --from-rollback-file $(WorkloadRestore) --skip-sign-check
displayName: Restore workloads

- powershell: |
Set-PSDebug -Trace 1
$ErrorActionPreference = 'Stop'
cd UnoApp1
cd ${{ parameters.projectName }}
& dotnet build UnoApp1.sln "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog"
& dotnet build ${{ parameters.projectName }}.sln "/bl:$(build.artifactstagingdirectory)\$(Agent.JobName).binlog"
if ($LASTEXITCODE -ne 0)
{
throw "Exit code must be zero."
Expand Down

0 comments on commit 32d2832

Please sign in to comment.