Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions scripts/azure-pipelines-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions scripts/azure-pipelines-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
15 changes: 9 additions & 6 deletions scripts/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 33 additions & 6 deletions scripts/azure-templates-bootstrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
29 changes: 17 additions & 12 deletions scripts/azure-templates-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: 5.0.x
displayName: Install .NET Core 5.0.x
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: $(DOTNET_VERSION)
displayName: Install the correct version of .NET Core
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
Expand All @@ -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')) }}:
Expand All @@ -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')) }}:
Expand Down
1 change: 1 addition & 0 deletions scripts/azure-templates-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/install-dotnet-workloads.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/install-vs.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Param(
[string] $Version = "17/pre",
[string] $Version,
[string] $TestPath = "2022\Preview"
)

Expand Down
7 changes: 4 additions & 3 deletions scripts/select-vs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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