mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[vcpkg] VM Update (#12176)
* [qt5] Add more dependent Linux packages for https://github.com/microsoft/vcpkg/pull/11596/ * [vcpkg] Add LLVM 10 to Windows CI machines for https://github.com/microsoft/vcpkg/pull/11655/ * [vcpkg] Add missing Param block to InstallLLVM function. * [vcpkg] Add throw after all Write-Error calls for consistency with https://github.com/microsoft/vcpkg/pull/12172
This commit is contained in:
parent
0084acc75d
commit
532db1d8f7
@ -29,7 +29,7 @@ function Transform-JsonFile {
|
||||
if ($req.StatusCode -ne 200)
|
||||
{
|
||||
Write-Error "Failed to GET $Uri"
|
||||
return
|
||||
throw
|
||||
}
|
||||
|
||||
$json = $req.Content | ConvertFrom-Json -Depth 10
|
||||
|
@ -2,8 +2,8 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
variables:
|
||||
windows-pool: 'PrWin-2020-06-04'
|
||||
linux-pool: 'PrLin-2020-06-08'
|
||||
windows-pool: 'PrWin-2020-06-30'
|
||||
linux-pool: 'PrLin-2020-06-30'
|
||||
|
||||
jobs:
|
||||
- template: windows/azure-pipelines.yml
|
||||
|
@ -154,6 +154,7 @@ function Sanitize-Name {
|
||||
$result = $RawName.Replace('-', '').ToLowerInvariant()
|
||||
if ($result.Length -gt 24) {
|
||||
Write-Error 'Sanitized name for storage account $result was too long.'
|
||||
throw
|
||||
}
|
||||
|
||||
return $result
|
||||
|
@ -26,6 +26,7 @@ $ErrorActionPreference = 'Stop'
|
||||
|
||||
if (-not (Test-Path -Path $BaselineFile)) {
|
||||
Write-Error "Unable to find baseline file $BaselineFile"
|
||||
throw
|
||||
}
|
||||
|
||||
#read in the file, strip out comments and blank lines and spaces
|
||||
@ -43,6 +44,7 @@ $missingValues = $baselineListRaw | Where-Object { -not ($_ -match "=\w") }
|
||||
|
||||
if ($missingValues) {
|
||||
Write-Error "The following are missing values: $missingValues"
|
||||
throw
|
||||
}
|
||||
|
||||
$invalidValues = $baselineListRaw `
|
||||
@ -50,6 +52,7 @@ $invalidValues = $baselineListRaw `
|
||||
|
||||
if ($invalidValues) {
|
||||
Write-Error "The following have invalid values: $invalidValues"
|
||||
throw
|
||||
}
|
||||
|
||||
$baselineForTriplet = $baselineListRaw `
|
||||
@ -61,6 +64,7 @@ foreach ($port in $baselineForTriplet | ForEach-Object { $_ -replace ":.*$" }) {
|
||||
if ($null -ne $file_map[$port]) {
|
||||
Write-Error `
|
||||
"$($port):$($Triplet) has multiple definitions in $baselineFile"
|
||||
throw
|
||||
}
|
||||
$file_map[$port] = $true
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \
|
||||
# Additionally required by qt5-base for qt5-x11extras
|
||||
APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \
|
||||
libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev \
|
||||
libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev"
|
||||
libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \
|
||||
libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev"
|
||||
|
||||
# Additionally required by libhdfs3
|
||||
APT_PACKAGES="$APT_PACKAGES libkrb5-dev"
|
||||
|
@ -46,6 +46,7 @@ Param(
|
||||
|
||||
if (-Not (Test-Path "triplets/$Triplet.cmake")) {
|
||||
Write-Error "Incorrect triplet '$Triplet', please supply a valid triplet."
|
||||
throw
|
||||
}
|
||||
|
||||
$env:VCPKG_DOWNLOADS = Join-Path $WorkingRoot 'downloads'
|
||||
|
@ -118,6 +118,7 @@ $WindowsSDKUrl = 'https://download.microsoft.com/download/1/c/3/1c3d5161-d9e9-4e
|
||||
$WindowsWDKUrl = 'https://download.microsoft.com/download/1/a/7/1a730121-7aa7-46f7-8978-7db729aa413d/wdk/wdksetup.exe'
|
||||
|
||||
$MpiUrl = 'https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe'
|
||||
$LlvmUrl = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe'
|
||||
|
||||
$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe'
|
||||
$CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 ' + `
|
||||
@ -154,6 +155,7 @@ Function PrintMsiExitCodeMessage {
|
||||
}
|
||||
else {
|
||||
Write-Error "Installation failed! Exited with $ExitCode."
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,6 +213,7 @@ Function InstallVisualStudio {
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install Visual Studio! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,6 +247,7 @@ Function InstallMSI {
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install $Name! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,6 +284,7 @@ Function InstallZip {
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install $Name! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,10 +316,12 @@ Function InstallWindowsSDK {
|
||||
}
|
||||
else {
|
||||
Write-Error "Installation failed! Exited with $exitCode."
|
||||
throw
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install Windows SDK! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -346,10 +353,41 @@ Function InstallWindowsWDK {
|
||||
}
|
||||
else {
|
||||
Write-Error "Installation failed! Exited with $exitCode."
|
||||
throw
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install Windows WDK! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs LLVM.
|
||||
|
||||
.DESCRIPTION
|
||||
InstallLLVM installs LLVM from the supplied URL.
|
||||
|
||||
.PARAMETER Url
|
||||
The URL of the LLVM installer.
|
||||
#>
|
||||
Function InstallLLVM {
|
||||
Param(
|
||||
[String]$Url
|
||||
)
|
||||
|
||||
try {
|
||||
Write-Host 'Downloading LLVM...'
|
||||
[string]$installerPath = Get-TempFilePath -Extension 'exe'
|
||||
curl.exe -L -o $installerPath -s -S $Url
|
||||
Write-Host 'Installing LLVM...'
|
||||
$proc = Start-Process -FilePath $installerPath -ArgumentList @('/S') -NoNewWindow -Wait -PassThru
|
||||
PrintMsiExitCodeMessage $proc.ExitCode
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install LLVM! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,10 +419,12 @@ Function InstallMpi {
|
||||
}
|
||||
else {
|
||||
Write-Error "Installation failed! Exited with $exitCode."
|
||||
throw
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install MPI! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -420,10 +460,12 @@ Function InstallCuda {
|
||||
}
|
||||
else {
|
||||
Write-Error "Installation failed! Exited with $exitCode."
|
||||
throw
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to install CUDA! $($_.Exception.Message)"
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,6 +491,7 @@ if ($null -eq $av) {
|
||||
InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl -Nickname 'Stable'
|
||||
InstallWindowsSDK -Url $WindowsSDKUrl
|
||||
InstallWindowsWDK -Url $WindowsWDKUrl
|
||||
InstallLLVM -Url $LlvmUrl
|
||||
InstallMpi -Url $MpiUrl
|
||||
InstallCuda -Url $CudaUrl -Features $CudaFeatures
|
||||
InstallZip -Url $BinSkimUrl -Name 'BinSkim' -Dir 'C:\BinSkim'
|
||||
|
@ -62,7 +62,7 @@ $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc"
|
||||
if (!(Test-Path $vcpkgSourcesPath))
|
||||
{
|
||||
Write-Error "Unable to determine vcpkg sources directory. '$vcpkgSourcesPath' does not exist."
|
||||
return
|
||||
throw
|
||||
}
|
||||
|
||||
function getVisualStudioInstances()
|
||||
@ -408,8 +408,9 @@ $ec = vcpkgInvokeCommandClean $msbuildExe $arguments
|
||||
if ($ec -ne 0)
|
||||
{
|
||||
Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++."
|
||||
return
|
||||
throw
|
||||
}
|
||||
|
||||
Write-Host "`nBuilding vcpkg.exe... done.`n"
|
||||
|
||||
if (-not $disableMetrics)
|
||||
|
Loading…
x
Reference in New Issue
Block a user