|
7 | 7 | # Global variables |
8 | 8 | variables: |
9 | 9 | BundleArtifactName: bundle |
| 10 | + InstallerArtifactName: unsigned-installers |
10 | 11 | AutoProvisionArgs: /p:AutoProvision=True /p:AutoProvisionUsesSudo=True /p:IgnoreMaxMonoVersion=False |
11 | 12 |
|
12 | 13 | # Stage and Job "display names" are shortened because they are combined to form the name of the corresponding GitHub check. |
@@ -121,7 +122,7 @@ stages: |
121 | 122 | - task: PublishPipelineArtifact@0 |
122 | 123 | displayName: upload unsigned installers |
123 | 124 | inputs: |
124 | | - artifactName: unsigned |
| 125 | + artifactName: $(InstallerArtifactName) |
125 | 126 | targetPath: bin/Build$(XA.Build.Configuration)/unsigned-installers |
126 | 127 |
|
127 | 128 | - task: MSBuild@1 |
@@ -228,3 +229,107 @@ stages: |
228 | 229 | artifactName: win-build-test-results |
229 | 230 | targetPath: $(Build.ArtifactStagingDirectory) |
230 | 231 | condition: always() |
| 232 | + |
| 233 | +- stage: test |
| 234 | + displayName: Test |
| 235 | + dependsOn: mac_build |
| 236 | + jobs: |
| 237 | + - job: mac_apk_tests |
| 238 | + displayName: APK Instrumentation |
| 239 | + pool: $(XA.Build.Mac.Pool) |
| 240 | + timeoutInMinutes: 240 |
| 241 | + cancelTimeoutInMinutes: 5 |
| 242 | + variables: |
| 243 | + ApkTestConfiguration: Release |
| 244 | + steps: |
| 245 | + - task: DownloadPipelineArtifact@1 |
| 246 | + inputs: |
| 247 | + artifactName: $(InstallerArtifactName) |
| 248 | + itemPattern: "*.pkg" |
| 249 | + downloadPath: $(System.DefaultWorkingDirectory) |
| 250 | + |
| 251 | + - template: yaml-templates/run-installer.yaml |
| 252 | + |
| 253 | + # HACK - Provision Emulator |
| 254 | + - script: | |
| 255 | + make prepare CONFIGURATION=$(ApkTestConfiguration) V=1 MSBUILD=msbuild MSBUILD_ARGS="$(AutoProvisionArgs)" |
| 256 | + git clean -xfd |
| 257 | + displayName: (hack) make prepare - provision emulator |
| 258 | +
|
| 259 | + - task: NuGetCommand@2 |
| 260 | + displayName: nuget restore Xamarin.Android.Tools.sln |
| 261 | + inputs: |
| 262 | + restoreSolution: external/xamarin-android-tools/Xamarin.Android.Tools.sln |
| 263 | + |
| 264 | + - task: MSBuild@1 |
| 265 | + displayName: build Xamarin.Android.Tools.BootstrapTasks.csproj |
| 266 | + inputs: |
| 267 | + solution: build-tools/xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj |
| 268 | + configuration: $(ApkTestConfiguration) |
| 269 | + msbuildArguments: /bl:$(System.DefaultWorkingDirectory)/bin/Test$(ApkTestConfiguration)/BootstrapTasks.binlog |
| 270 | + |
| 271 | + - task: NuGetCommand@2 |
| 272 | + displayName: nuget restore Xamarin.Android-Tests.sln |
| 273 | + inputs: |
| 274 | + restoreSolution: Xamarin.Android-Tests.sln |
| 275 | + |
| 276 | + - template: yaml-templates/apk-instrumentation.yaml |
| 277 | + parameters: |
| 278 | + configuration: $(ApkTestConfiguration) |
| 279 | + testName: Mono.Android_Tests |
| 280 | + project: src/Mono.Android/Test/Mono.Android-Tests.csproj |
| 281 | + testResultsFiles: bin/Test$(ApkTestConfiguration)/TestResult-Mono.Android_Tests.xml |
| 282 | + |
| 283 | + - template: yaml-templates/apk-instrumentation.yaml |
| 284 | + parameters: |
| 285 | + configuration: $(ApkTestConfiguration) |
| 286 | + testName: Mono.Android_TestsAppBundle |
| 287 | + project: tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj |
| 288 | + testResultsFiles: bin/Test$(ApkTestConfiguration)/TestResult-Mono.Android_TestsAppBundle.xml |
| 289 | + packageType: Aab |
| 290 | + |
| 291 | + - template: yaml-templates/apk-instrumentation.yaml |
| 292 | + parameters: |
| 293 | + configuration: $(ApkTestConfiguration) |
| 294 | + testName: Mono.Android_TestsMultiDex |
| 295 | + project: tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj |
| 296 | + testResultsFiles: bin/Test$(ApkTestConfiguration)/TestResult-Mono.Android_TestsMultiDex.xml |
| 297 | + |
| 298 | + - template: yaml-templates/apk-instrumentation.yaml |
| 299 | + parameters: |
| 300 | + configuration: $(ApkTestConfiguration) |
| 301 | + testName: Xamarin.Android.JcwGen_Tests |
| 302 | + project: tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj |
| 303 | + testResultsFiles: bin/Test$(ApkTestConfiguration)/TestResult-Xamarin.Android.JcwGen_Tests.xml |
| 304 | + |
| 305 | + - template: yaml-templates/apk-instrumentation.yaml |
| 306 | + parameters: |
| 307 | + configuration: $(ApkTestConfiguration) |
| 308 | + testName: Xamarin.Android.Locale_Tests |
| 309 | + project: tests/locales/Xamarin.Android.Locale-Tests/Xamarin.Android.Locale-Tests.csproj |
| 310 | + testResultsFiles: bin/Test$(ApkTestConfiguration)/TestResult-Xamarin.Android.Locale_Tests.xml |
| 311 | + |
| 312 | + - template: yaml-templates/apk-instrumentation.yaml |
| 313 | + parameters: |
| 314 | + configuration: $(ApkTestConfiguration) |
| 315 | + testName: Xamarin.Android.EmbeddedDSO_Test |
| 316 | + project: tests/EmbeddedDSOs/EmbeddedDSO/EmbeddedDSO.csproj |
| 317 | + testResultsFiles: bin/Test$(ApkTestConfiguration)/TestResult-Xamarin.Android.EmbeddedDSO_Test.nunit.xml |
| 318 | + |
| 319 | + - task: MSBuild@1 |
| 320 | + displayName: shut down emulator |
| 321 | + inputs: |
| 322 | + solution: src/Mono.Android/Test/Mono.Android-Tests.csproj |
| 323 | + configuration: $(ApkTestConfiguration) |
| 324 | + msbuildArguments: > |
| 325 | + /t:AcquireAndroidTarget,ReleaseAndroidTarget |
| 326 | + /bl:$(System.DefaultWorkingDirectory)/bin/Test$(ApkTestConfiguration)/shutdown-emulator.binlog |
| 327 | + condition: succeededOrFailed() |
| 328 | + |
| 329 | + - task: MSBuild@1 |
| 330 | + displayName: package results |
| 331 | + inputs: |
| 332 | + solution: build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj |
| 333 | + configuration: $(ApkTestConfiguration) |
| 334 | + msbuildArguments: /t:ZipTestResults /p:TestResultZipOutputPath=$(Build.ArtifactStagingDirectory) |
| 335 | + condition: always() |
0 commit comments