Skip to content

Commit 9666fe4

Browse files
authored
[ci] Enable Android Designer tests on Windows (#6725)
Context: xamarin/yaml-templates#172 Context: xamarin/provisionator#447 The Windows build and test job for the designer has been updated in xamarin/UITools, and the tests have been re-enabled. The macOS tests have also been temporarily disabled while they work to get them running with [dotnet test and .NET 6][0]. Update our Designer test jobs to mirror their changes. Windows tests have been re-enabled, and macOS tests have been temporarily disabled. We should re-enable the macOS tests once work item 1469705 is resolved. Additionally, a new `provisionatorChannel` parameter has been added which will allow builds to be manually queued against provisionator PRs for testing purposes. [0]: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1469705
1 parent bac2cf4 commit 9666fe4

File tree

7 files changed

+73
-9
lines changed

7 files changed

+73
-9
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ resources:
3636
ref: refs/heads/main
3737
endpoint: xamarin
3838

39+
parameters:
40+
- name: provisionatorChannel
41+
type: string
42+
default: latest # Support for launching a build against a Provisionator PR (e.g., pr/[github-account-name]/[pr-number]) as a means to test in-progress Provisionator changes
43+
3944
# Global variables
4045
variables:
4146
- template: yaml-templates/variables.yaml
@@ -96,6 +101,8 @@ stages:
96101
condition: and(succeeded(), eq(variables['MicroBuildSignType'], 'Real'))
97102

98103
- template: yaml-templates/commercial-build.yaml
104+
parameters:
105+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
99106

100107
- template: yaml-templates/remove-microbuild-tooling.yaml
101108
parameters:
@@ -335,6 +342,7 @@ stages:
335342
- template: yaml-templates/setup-test-environment.yaml
336343
parameters:
337344
configuration: $(ApkTestConfiguration)
345+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
338346

339347
- template: yaml-templates/run-xaprepare.yaml
340348
parameters:
@@ -586,7 +594,7 @@ stages:
586594
steps:
587595
- template: yaml-templates/setup-test-environment.yaml
588596
parameters:
589-
configuration: $(XA.Build.Configuration)
597+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
590598

591599
- template: yaml-templates/run-xaprepare.yaml
592600
parameters:
@@ -694,12 +702,14 @@ stages:
694702
parameters:
695703
job_name: mac_msbuild_tests_0
696704
nunit_categories: '|| cat == SmokeTests'
705+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
697706

698707
# Xamarin.Android (Smoke Tests MSBuild - Win-0)
699708
- template: yaml-templates\run-msbuild-win-tests.yaml
700709
parameters:
701710
job_name: win_msbuild_tests_0
702711
nunit_categories: '|| cat == SmokeTests'
712+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
703713

704714
# Check - "Xamarin.Android (Smoke Tests MSBuild Emulator - macOS)"
705715
- job: mac_msbuilddevice_tests
@@ -712,6 +722,8 @@ stages:
712722
clean: all
713723
steps:
714724
- template: yaml-templates/setup-test-environment.yaml
725+
parameters:
726+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
715727

716728
- template: yaml-templates/run-xaprepare.yaml
717729
parameters:
@@ -770,6 +782,8 @@ stages:
770782
- template: yaml-templates/setup-ubuntu.yaml
771783

772784
- template: yaml-templates/setup-test-environment.yaml
785+
parameters:
786+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
773787

774788
- task: DownloadPipelineArtifact@2
775789
inputs:
@@ -803,6 +817,7 @@ stages:
803817
job_name: mac_msbuild_tests_1
804818
job_suffix: Legacy
805819
nunit_categories: '&& cat != SmokeTests'
820+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
806821

807822
- template: yaml-templates\run-msbuild-mac-tests.yaml
808823
parameters:
@@ -811,34 +826,39 @@ stages:
811826
job_suffix: Legacy
812827
nunit_categories: '&& cat != SmokeTests'
813828
run_extra_tests: true
829+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
814830

815831
- template: yaml-templates\run-msbuild-mac-tests.yaml
816832
parameters:
817833
node_id: 3
818834
job_name: mac_msbuild_tests_3
819835
job_suffix: Legacy
820836
nunit_categories: '&& cat != SmokeTests'
821-
837+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
838+
822839
- template: yaml-templates\run-msbuild-mac-tests.yaml
823840
parameters:
824841
node_id: 4
825842
job_name: mac_msbuild_tests_4
826843
job_suffix: Legacy
827844
nunit_categories: '&& cat != SmokeTests'
845+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
828846

829847
- template: yaml-templates\run-msbuild-mac-tests.yaml
830848
parameters:
831849
node_id: 5
832850
job_name: mac_msbuild_tests_5
833851
job_suffix: Legacy
834852
nunit_categories: '&& cat != SmokeTests'
853+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
835854

836855
- template: yaml-templates\run-msbuild-mac-tests.yaml
837856
parameters:
838857
node_id: 6
839858
job_name: mac_msbuild_tests_6
840859
job_suffix: Legacy
841860
nunit_categories: '&& cat != SmokeTests'
861+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
842862

843863
# Xamarin.Android (Test MSBuild Legacy - Windows)
844864
- template: yaml-templates\run-msbuild-win-tests.yaml
@@ -848,6 +868,7 @@ stages:
848868
job_name: win_msbuild_tests_1
849869
job_suffix: Legacy
850870
nunit_categories: '&& cat != SmokeTests'
871+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
851872

852873
- template: yaml-templates\run-msbuild-win-tests.yaml
853874
parameters:
@@ -857,6 +878,7 @@ stages:
857878
job_suffix: Legacy
858879
nunit_categories: '&& cat != SmokeTests'
859880
run_extra_tests: true
881+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
860882

861883
- template: yaml-templates\run-msbuild-win-tests.yaml
862884
parameters:
@@ -865,6 +887,7 @@ stages:
865887
job_name: win_msbuild_tests_3
866888
job_suffix: Legacy
867889
nunit_categories: '&& cat != SmokeTests'
890+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
868891

869892
- stage: msbuild_dotnet
870893
displayName: One .NET Tests
@@ -879,6 +902,7 @@ stages:
879902
job_suffix: One .NET
880903
nunit_categories: $(DotNetNUnitCategories)
881904
target_framework: 'net6.0'
905+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
882906

883907
- template: yaml-templates\run-msbuild-mac-tests.yaml
884908
parameters:
@@ -887,6 +911,7 @@ stages:
887911
job_suffix: One .NET
888912
nunit_categories: $(DotNetNUnitCategories)
889913
target_framework: 'net6.0'
914+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
890915

891916
- template: yaml-templates\run-msbuild-mac-tests.yaml
892917
parameters:
@@ -895,6 +920,7 @@ stages:
895920
job_suffix: One .NET
896921
nunit_categories: $(DotNetNUnitCategories)
897922
target_framework: 'net6.0'
923+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
898924

899925
- template: yaml-templates\run-msbuild-mac-tests.yaml
900926
parameters:
@@ -903,6 +929,7 @@ stages:
903929
job_suffix: One .NET
904930
nunit_categories: $(DotNetNUnitCategories)
905931
target_framework: 'net6.0'
932+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
906933

907934
- template: yaml-templates\run-msbuild-mac-tests.yaml
908935
parameters:
@@ -911,6 +938,7 @@ stages:
911938
job_suffix: One .NET
912939
nunit_categories: $(DotNetNUnitCategories)
913940
target_framework: 'net6.0'
941+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
914942

915943
- template: yaml-templates\run-msbuild-mac-tests.yaml
916944
parameters:
@@ -919,6 +947,7 @@ stages:
919947
job_suffix: One .NET
920948
nunit_categories: $(DotNetNUnitCategories)
921949
target_framework: 'net6.0'
950+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
922951

923952
# Xamarin.Android (Test MSBuild One .NET - Windows)
924953
- template: yaml-templates\run-msbuild-win-tests.yaml
@@ -929,6 +958,7 @@ stages:
929958
job_suffix: One .NET
930959
nunit_categories: $(DotNetNUnitCategories)
931960
target_framework: 'net6.0'
961+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
932962

933963
- template: yaml-templates\run-msbuild-win-tests.yaml
934964
parameters:
@@ -938,6 +968,7 @@ stages:
938968
job_suffix: One .NET
939969
nunit_categories: $(DotNetNUnitCategories)
940970
target_framework: 'net6.0'
971+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
941972

942973
- template: yaml-templates\run-msbuild-win-tests.yaml
943974
parameters:
@@ -947,6 +978,7 @@ stages:
947978
job_suffix: One .NET
948979
nunit_categories: $(DotNetNUnitCategories)
949980
target_framework: 'net6.0'
981+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
950982

951983
- stage: msbuilddevice_tests
952984
displayName: MSBuild Emulator Tests
@@ -959,18 +991,21 @@ stages:
959991
node_id: 1
960992
job_name: mac_msbuilddevice_tests_1
961993
job_suffix: Legacy
994+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
962995

963996
- template: yaml-templates/run-msbuild-device-tests.yaml
964997
parameters:
965998
node_id: 2
966999
job_name: mac_msbuilddevice_tests_2
9671000
job_suffix: Legacy
1001+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
9681002

9691003
- template: yaml-templates/run-msbuild-device-tests.yaml
9701004
parameters:
9711005
node_id: 3
9721006
job_name: mac_msbuilddevice_tests_3
9731007
job_suffix: Legacy
1008+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
9741009

9751010
# Check - "Xamarin.Android (MSBuild Emulator Tests macOS - One .NET)"
9761011
- template: yaml-templates/run-msbuild-device-tests.yaml
@@ -980,6 +1015,7 @@ stages:
9801015
job_suffix: One .NET
9811016
nunit_categories: $(DotNetNUnitCategories)
9821017
target_framework: 'net6.0'
1018+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
9831019

9841020
- template: yaml-templates/run-msbuild-device-tests.yaml
9851021
parameters:
@@ -988,6 +1024,7 @@ stages:
9881024
job_suffix: One .NET
9891025
nunit_categories: $(DotNetNUnitCategories)
9901026
target_framework: 'net6.0'
1027+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
9911028

9921029
- template: yaml-templates/run-msbuild-device-tests.yaml
9931030
parameters:
@@ -996,14 +1033,16 @@ stages:
9961033
job_suffix: One .NET
9971034
nunit_categories: $(DotNetNUnitCategories)
9981035
target_framework: 'net6.0'
1036+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
9991037

10001038
- stage: designer_tests
10011039
displayName: Designer Tests
10021040
dependsOn: mac_build
10031041
condition: and(succeeded(), or(eq(variables['RunAllTests'], true), contains(dependencies.mac_build.outputs['mac_build_create_installers.TestConditions.TestAreas'], 'Designer')))
10041042
jobs:
1005-
# Check - "Xamarin.Android (Designer Tests macOS)"
1043+
# Check - "Xamarin.Android (Designer Tests macOS)"
10061044
- job: designer_integration_mac
1045+
condition: false #TODO: Enable once test issues are fixed.
10071046
displayName: macOS
10081047
pool:
10091048
vmImage: internal-macos-11
@@ -1027,7 +1066,7 @@ stages:
10271066
if ("$(Build.Reason)" -eq "PullRequest") {
10281067
$branchName = "$(System.PullRequest.TargetBranch)" -replace $branchPrefix, ""
10291068
}
1030-
if (("$branchName" -ne "main") -and ("$branchName" -notlike "d16*")) {
1069+
if (("$branchName" -ne "main") -and ("$branchName" -notlike "d1*")) {
10311070
$branchName = "main"
10321071
}
10331072
Set-Location -Path $(System.DefaultWorkingDirectory)/UITools
@@ -1046,11 +1085,14 @@ stages:
10461085
github_token: $(GitHub.Token)
10471086
provisioning_script: $(System.DefaultWorkingDirectory)/UITools/Designer/bot-provisioning/dependencies.csx
10481087
provisioning_extra_args: -remove Xamarin.Android -vv DEVDIV_PKGS_NUGET_TOKEN=$(DevDiv.NuGet.Token) SECTOOLS_PKGS_NUGET_TOKEN=$(SecTools.NuGet.Token)
1088+
env:
1089+
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
10491090

10501091
- template: yaml-templates/setup-test-environment.yaml
10511092
parameters:
10521093
xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android
10531094
jdkTestFolder: $(JAVA_HOME_8_X64)
1095+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
10541096

10551097
- template: designer/android-designer-build-mac.yaml@yaml
10561098
parameters:
@@ -1079,20 +1121,18 @@ stages:
10791121
condition: ne(variables['Agent.JobStatus'], 'Succeeded')
10801122

10811123
# Check - "Xamarin.Android (Designer Tests Windows)"
1082-
# TODO: Enable once Windows test issues are fixed.
10831124
- job: designer_integration_win
1084-
condition: false
10851125
displayName: Windows
10861126
pool:
1087-
vmImage: windows-2019
1127+
vmImage: $(HostedWinImage)
10881128
timeoutInMinutes: 120
10891129
cancelTimeoutInMinutes: 5
10901130
workspace:
10911131
clean: all
10921132
variables:
10931133
EnableRegressionTest: true
10941134
RegressionTestSuiteOutputDir: C:\Git\ADesRegTestSuite
1095-
VisualStudioInstallationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
1135+
VisualStudioInstallationPath: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
10961136
steps:
10971137
- checkout: uitools
10981138
clean: true
@@ -1107,7 +1147,7 @@ stages:
11071147
if ("$(Build.Reason)" -eq "PullRequest") {
11081148
$branchName = "$(System.PullRequest.TargetBranch)" -replace $branchPrefix, ""
11091149
}
1110-
if (("$branchName" -ne "main") -and ("$branchName" -notlike "d16*")) {
1150+
if (("$branchName" -ne "main") -and ("$branchName" -notlike "d1*")) {
11111151
$branchName = "main"
11121152
}
11131153
Set-Location -Path $(System.DefaultWorkingDirectory)\UITools
@@ -1126,15 +1166,20 @@ stages:
11261166
github_token: $(GitHub.Token)
11271167
provisioning_script: $(System.DefaultWorkingDirectory)\UITools\Designer\bot-provisioning\dependencies.csx
11281168
provisioning_extra_args: -vv DEVDIV_PKGS_NUGET_TOKEN=$(DevDiv.NuGet.Token) SECTOOLS_PKGS_NUGET_TOKEN=$(SecTools.NuGet.Token)
1169+
env:
1170+
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
11291171

11301172
- template: yaml-templates\setup-test-environment.yaml
11311173
parameters:
11321174
xaSourcePath: $(System.DefaultWorkingDirectory)\xamarin-android
11331175
jdkTestFolder: $(JAVA_HOME_8_X64)
1176+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
11341177

11351178
- template: designer\android-designer-build-win.yaml@yaml
11361179
parameters:
11371180
designerSourcePath: $(System.DefaultWorkingDirectory)\UITools\Designer
1181+
uiToolsSourcePath: $(System.DefaultWorkingDirectory)\UITools
1182+
javaSdkDirectory: $(JAVA_HOME_8_X64)
11381183

11391184
- template: designer\android-designer-tests.yaml@yaml
11401185
parameters:
@@ -1172,6 +1217,8 @@ stages:
11721217
clean: all
11731218
steps:
11741219
- template: yaml-templates/setup-test-environment.yaml
1220+
parameters:
1221+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
11751222

11761223
- template: yaml-templates/run-xaprepare.yaml
11771224
parameters:

build-tools/automation/yaml-templates/commercial-build.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
parameters:
22
xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android
33
makeMSBuildArgs: ''
4+
provisionatorChannel: latest
45

56
steps:
67
- script: echo "##vso[task.setvariable variable=JI_JAVA_HOME]$HOME/android-toolchain/jdk-11"
@@ -21,6 +22,8 @@ steps:
2122
github_token: $(GitHub.Token)
2223
provisioning_script: ${{ parameters.xaSourcePath }}/build-tools/provisioning/xcode.csx
2324
provisioning_extra_args: '-v -v -v -v'
25+
env:
26+
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
2427

2528
- script: make prepare-update-mono CONFIGURATION=$(XA.Build.Configuration) PREPARE_CI=1 PREPARE_AUTOPROVISION=1
2629
workingDirectory: ${{ parameters.xaSourcePath }}

build-tools/automation/yaml-templates/run-installer.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
provisionExtraArgs: -vv -f
3+
provisionatorChannel: latest
34

45
steps:
56
- task: DownloadPipelineArtifact@2
@@ -37,3 +38,5 @@ steps:
3738
provisioning_script: $(XA.Provisionator.Args)
3839
provisioning_extra_args: ${{ parameters.provisionExtraArgs }}
3940
condition: and(succeeded(), ne(variables['agent.os'], 'Linux'))
41+
env:
42+
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}

0 commit comments

Comments
 (0)