Use an older Xamarin.Android preview via the stable VS (#1993)

This commit is contained in:
Matthew Leibowitz 2022-04-09 02:55:21 +02:00 коммит произвёл GitHub
Родитель c5efe055d5
Коммит b7728fae36
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 77 добавлений и 39 удалений

Просмотреть файл

@ -10,18 +10,21 @@ parameters:
- name: VM_IMAGE_WINDOWS
type: object
default:
name: Azure Pipelines
vmImage: windows-2022
pool:
name: Azure Pipelines
vmImage: windows-2022
- name: VM_IMAGE_MAC
type: object
default:
name: Azure Pipelines
vmImage: macos-11
pool:
name: Azure Pipelines
vmImage: macos-11
- name: VM_IMAGE_LINUX
type: object
default:
name: Azure Pipelines
vmImage: ubuntu-18.04
pool:
name: Azure Pipelines
vmImage: ubuntu-18.04
variables:
- template: azure-pipelines-variables.yml

Просмотреть файл

@ -13,9 +13,7 @@ variables:
MONO_VERSION_MACOS: '6_12_13'
MONO_VERSION_LINUX: ''
XCODE_VERSION: 13.2.1
XCODE_VERSION_NATIVE: 13.2.1
DOTNET_VERSION_PREVIOUS: 3.1.417
DOTNET_VERSION: 5.0.406
VISUAL_STUDIO_VERSION: ''
DOTNET_VERSION_PREVIEW: '6.0.200-rtm.22107.3'
DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.200/preview.14.json'
CONFIGURATION: 'Release'

Просмотреть файл

@ -16,18 +16,21 @@ parameters:
- name: VM_IMAGE_WINDOWS
type: object
default:
name: Azure Pipelines
vmImage: windows-2022
pool:
name: Azure Pipelines
vmImage: windows-2022
- name: VM_IMAGE_MAC
type: object
default:
name: Azure Pipelines
vmImage: macos-11
pool:
name: Azure Pipelines
vmImage: macos-11
- name: VM_IMAGE_LINUX
type: object
default:
name: Azure Pipelines
vmImage: ubuntu-18.04
pool:
name: Azure Pipelines
vmImage: ubuntu-18.04
variables:
- template: azure-pipelines-variables.yml

Просмотреть файл

@ -8,6 +8,7 @@ parameters:
variables: [] # the job variables
requiredArtifacts: [] # the artifacts that this build needs to download
preBuildSteps: [] # any steps to run before the build
provisioningSteps: [] # any steps to run to provision the machine
postBuildSteps: [] # any additional steps to run after the build
initScript: '' # any scripts to run before starting the bootstrapper
additionalArgs: '' # any additional arguments to pass to the bootstrapper
@ -37,13 +38,26 @@ jobs:
parameters:
name: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
vmImage: ${{ parameters.vmImage }}
vmImage: ${{ parameters.vmImage.pool }}
packages: ${{ parameters.packages }}
target: ${{ parameters.target }}
dependsOn: ${{ parameters.dependsOn }}
variables: ${{ parameters.variables }}
variables:
${{ if ne(parameters.vmImage.variables, '') }}:
${{ parameters.vmImage.variables }}
${{ if ne(length(parameters.variables), 0) }}:
${{ parameters.variables }}
requiredArtifacts: ${{ parameters.requiredArtifacts }}
preBuildSteps: ${{ parameters.preBuildSteps }}
provisioningSteps:
- ${{ if ne(parameters.vmImage.provisioningSteps, '') }}:
- ${{ parameters.vmImage.provisioningSteps }}
- ${{ if ne(length(parameters.provisioningSteps), 0) }}:
- ${{ parameters.provisioningSteps }}
preBuildSteps:
- ${{ if ne(parameters.vmImage.preBuildSteps, '') }}:
- ${{ parameters.vmImage.preBuildSteps }}
- ${{ if ne(length(parameters.preBuildSteps), 0) }}:
- ${{ parameters.preBuildSteps }}
postBuildSteps: ${{ parameters.postBuildSteps }}
initScript: ${{ parameters.initScript }}
additionalArgs: ${{ parameters.additionalArgs }}
@ -71,13 +85,26 @@ jobs:
parameters:
name: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
vmImage: ${{ parameters.vmImage }}
vmImage: ${{ parameters.vmImage.pool }}
packages: ${{ parameters.packages }}
target: ${{ parameters.target }}
dependsOn: ${{ parameters.dependsOn }}
variables: ${{ parameters.variables }}
variables:
${{ if ne(parameters.vmImage.variables, '') }}:
${{ parameters.vmImage.variables }}
${{ if ne(length(parameters.variables), 0) }}:
${{ parameters.variables }}
requiredArtifacts: ${{ parameters.requiredArtifacts }}
preBuildSteps: ${{ parameters.preBuildSteps }}
provisioningSteps:
- ${{ if ne(parameters.vmImage.provisioningSteps, '') }}:
- ${{ parameters.vmImage.provisioningSteps }}
- ${{ if ne(length(parameters.provisioningSteps), 0) }}:
- ${{ parameters.provisioningSteps }}
preBuildSteps:
- ${{ if ne(parameters.vmImage.preBuildSteps, '') }}:
- ${{ parameters.vmImage.preBuildSteps }}
- ${{ if ne(length(parameters.preBuildSteps), 0) }}:
- ${{ parameters.preBuildSteps }}
postBuildSteps: ${{ parameters.postBuildSteps }}
initScript: ${{ parameters.initScript }}
additionalArgs: ${{ parameters.additionalArgs }}

Просмотреть файл

@ -7,6 +7,7 @@ parameters:
dependsOn: [] # the dependiencies
variables: [] # the job variables
requiredArtifacts: [] # the artifacts that this build needs to download
provisioningSteps: [] # any steps to run to provision the machine
preBuildSteps: [] # any steps to run before the build
postBuildSteps: [] # any additional steps to run after the build
initScript: '' # any scripts to run before starting the bootstrapper
@ -48,6 +49,9 @@ jobs:
parameters:
state: 'pending'
# provisioning steps
- ${{ parameters.provisioningSteps }}
# install any packages on linux
- ${{ if and(eq(parameters.docker, ''), endsWith(parameters.name, '_linux')) }}:
- bash: |
@ -120,13 +124,18 @@ jobs:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: $(DOTNET_VERSION_PREVIOUS)
displayName: Install the previous version of .NET Core
version: 3.1.x
displayName: Install .NET Core 3.1.x
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: $(DOTNET_VERSION)
displayName: Install the correct version of .NET Core
version: 5.0.x
displayName: Install .NET Core 5.0.x
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: 6.0.x
displayName: Install .NET Core 6.0.x
# install the bits needed for .NET 6 builds
- pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet"
displayName: Install the preview version of .NET Core
@ -136,8 +145,8 @@ jobs:
displayName: Display all the .NET information
# install VS
- ${{ if endsWith(parameters.name, '_windows') }}:
- ${{ if eq(parameters.installPreviewVs, 'true') }}:
- pwsh: .\scripts\install-vs.ps1
- ${{ if and(eq(parameters.installPreviewVs, 'true'), ne(variables.VISUAL_STUDIO_VERSION, '')) }}:
- pwsh: .\scripts\install-vs.ps1 -Version $(VISUAL_STUDIO_VERSION)
displayName: Install Visual Studio
# install workloads
- ${{ if not(endsWith(parameters.name, '_linux')) }}:
@ -160,12 +169,8 @@ jobs:
# install the mac tools
- ${{ if endsWith(parameters.name, '_macos') }}:
- ${{ if startsWith(parameters.name, 'native_') }}:
- bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION_NATIVE)
displayName: Switch to the latest Xcode
- ${{ if not(startsWith(parameters.name, 'native_')) }}:
- bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION)
displayName: Switch to the latest Xcode
- bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION)
displayName: Switch to the latest Xcode
# install the linux tools
- ${{ if and(eq(parameters.installEmsdk, 'true'), endsWith(parameters.name, '_linux')) }}:

Просмотреть файл

@ -12,6 +12,7 @@ jobs:
displayName: ${{ parameters.displayName }}
pool: ${{ parameters.vmImage }}
condition: ${{ parameters.condition }}
variables: ${{ parameters.variables }}
steps:
- checkout: none
- template: azure-templates-download-artifacts.yml

Просмотреть файл

@ -11,8 +11,8 @@ $previewRuntime = 'https://api.nuget.org/v3/index.json'
$previewEmscripten = 'https://api.nuget.org/v3/index.json'
if ($IsPreview) {
$previewFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json'
$previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-6dd808ff-1/nuget/v3/index.json'
$previewEmscripten = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-ee0a97a0/nuget/v3/index.json'
$previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-323bf2dd/nuget/v3/index.json'
$previewEmscripten = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-572aeedc/nuget/v3/index.json'
}
Write-Host "Installing workloads..."

Просмотреть файл

@ -1,5 +1,5 @@
Param(
[string] $Version = "17/pre",
[string] $Version,
[string] $TestPath = "2022\Preview"
)

Просмотреть файл

@ -2,13 +2,14 @@ $ErrorActionPreference = 'Stop'
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
Write-Host "Installed Visual Studio Versions:"
& $vswhere -all -prerelease -property installationPath
Write-Host "Setting Environment Variables..."
$installationPath = & $vswhere -latest -prerelease -property installationPath
Write-Host "##vso[task.prependpath]$installationPath\MSBuild\Current\Bin"
Write-Host "##vso[task.setvariable variable=VS_INSTALL]$installationPath"
$env:VS_INSTALL = $installationPath
Write-Host "Installed Visual Studio Versions:"
& $vswhere -all -prerelease -property installationPath
Write-Host "Selected VS $installationPath"
exit $LASTEXITCODE