Skip to content

Commit

Permalink
[build] skip provisioning of Xamarin.Android on .NET lanes (#7646)
Browse files Browse the repository at this point in the history
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=7102687&view=logs&j=270ba80a-9de5-5c73-abb9-bb787532a07c&s=25cdcba1-3ecb-5490-0002-daf27c697525&t=306f7057-edf0-58b5-5004-8b3b311950d4&l=449

`provisionator` is a source of random failures like:

	[21:41:23 ERR] Error Xamarin.Provisioning.ProvisioningException: Failed to provision C:\a\_work\1\s\xamarin-android\Xamarin.Android.Sdk-13.1.99.88.vsix

In this case, we were downloading a Classic Xamarin.Android build for
use on a test lane for `One .NET` tests?

Improve things, and skip this step completely for `One .NET` tests.
We don't need to provision Classic Xamarin.Android on these lanes.

This also has the added benefit of faster test runs, just
spot-checking the time spent on the above build:

  * Saves 1-2 min of time for `provisionator` on macOS lanes.
  * Saves up to ~24 min of time for `provisionator` on Windows lanes.
  • Loading branch information
jonathanpeppers committed Mar 21, 2023
1 parent 64ed80f commit 52a2faf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ stages:
steps:
- template: yaml-templates/setup-test-environment.yaml
parameters:
provisionClassic: false
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- template: yaml-templates/run-xaprepare.yaml
Expand Down Expand Up @@ -479,6 +480,7 @@ stages:
steps:
- template: yaml-templates/setup-test-environment.yaml
parameters:
provisionClassic: false
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- template: yaml-templates/run-xaprepare.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
steps:
- template: setup-test-environment.yaml
parameters:
provisionClassic: ${{ ne(parameters.target_framework, parameters.dotnet_targetframework) }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- template: run-xaprepare.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
steps:
- template: setup-test-environment.yaml
parameters:
provisionClassic: ${{ ne(parameters.target_framework, parameters.dotnet_targetframework) }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- task: DownloadPipelineArtifact@1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:

- template: setup-test-environment.yaml
parameters:
provisionClassic: ${{ ne(parameters.target_framework, parameters.dotnet_targetframework) }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
remove_dotnet: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
configuration: $(XA.Build.Configuration)
provisionClassic: true
provisionExtraArgs: -vv -f
provisionatorChannel: latest
xaSourcePath: $(System.DefaultWorkingDirectory)
Expand All @@ -19,10 +20,11 @@ steps:
parameters:
xasourcePath: ${{ parameters.xaSourcePath }}

- template: run-installer.yaml
parameters:
provisionExtraArgs: ${{ parameters.provisionExtraArgs }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}
- ${{ if eq(parameters.provisionClassic, true) }}:
- template: run-installer.yaml
parameters:
provisionExtraArgs: ${{ parameters.provisionExtraArgs }}
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- script: |
echo "##vso[task.setvariable variable=JI_JAVA_HOME]${{ parameters.jdkTestFolder }}"
Expand Down

0 comments on commit 52a2faf

Please sign in to comment.