diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-07-01 10:53:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-01 10:53:10 -0700 |
| commit | 532db1d8f7a5ac7d415fd9feccb7d1ee4377c9f3 (patch) | |
| tree | b9de86b0ec94aa7ff4c3cd07c2531a9920328403 | |
| parent | 0084acc75da5fe831f90c0c16fcb3ce46fb8a533 (diff) | |
| download | vcpkg-532db1d8f7a5ac7d415fd9feccb7d1ee4377c9f3.tar.gz vcpkg-532db1d8f7a5ac7d415fd9feccb7d1ee4377c9f3.zip | |
[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
| -rw-r--r-- | scripts/Generate-SpdxLicenseList.ps1 | 2 | ||||
| -rw-r--r-- | scripts/azure-pipelines/azure-pipelines.yml | 4 | ||||
| -rwxr-xr-x | scripts/azure-pipelines/create-vmss-helpers.psm1 | 1 | ||||
| -rwxr-xr-x | scripts/azure-pipelines/generate-skip-list.ps1 | 4 | ||||
| -rwxr-xr-x | scripts/azure-pipelines/linux/provision-image.sh | 3 | ||||
| -rwxr-xr-x | scripts/azure-pipelines/test-modified-ports.ps1 | 1 | ||||
| -rw-r--r-- | scripts/azure-pipelines/windows/provision-image.txt | 43 | ||||
| -rw-r--r-- | scripts/bootstrap.ps1 | 5 |
8 files changed, 57 insertions, 6 deletions
diff --git a/scripts/Generate-SpdxLicenseList.ps1 b/scripts/Generate-SpdxLicenseList.ps1 index 4710747eb..8af5fd4de 100644 --- a/scripts/Generate-SpdxLicenseList.ps1 +++ b/scripts/Generate-SpdxLicenseList.ps1 @@ -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 diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index e18c4a354..c0cda8432 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -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
diff --git a/scripts/azure-pipelines/create-vmss-helpers.psm1 b/scripts/azure-pipelines/create-vmss-helpers.psm1 index 08057d676..1e8310036 100755 --- a/scripts/azure-pipelines/create-vmss-helpers.psm1 +++ b/scripts/azure-pipelines/create-vmss-helpers.psm1 @@ -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
diff --git a/scripts/azure-pipelines/generate-skip-list.ps1 b/scripts/azure-pipelines/generate-skip-list.ps1 index 98c868eb9..11980d7ad 100755 --- a/scripts/azure-pipelines/generate-skip-list.ps1 +++ b/scripts/azure-pipelines/generate-skip-list.ps1 @@ -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 } diff --git a/scripts/azure-pipelines/linux/provision-image.sh b/scripts/azure-pipelines/linux/provision-image.sh index 0fa7edbf7..5a59161e6 100755 --- a/scripts/azure-pipelines/linux/provision-image.sh +++ b/scripts/azure-pipelines/linux/provision-image.sh @@ -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" diff --git a/scripts/azure-pipelines/test-modified-ports.ps1 b/scripts/azure-pipelines/test-modified-ports.ps1 index c33219795..d6b59364e 100755 --- a/scripts/azure-pipelines/test-modified-ports.ps1 +++ b/scripts/azure-pipelines/test-modified-ports.ps1 @@ -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'
diff --git a/scripts/azure-pipelines/windows/provision-image.txt b/scripts/azure-pipelines/windows/provision-image.txt index 115684b49..2d2790ec7 100644 --- a/scripts/azure-pipelines/windows/provision-image.txt +++ b/scripts/azure-pipelines/windows/provision-image.txt @@ -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'
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index dac97621f..fdbdf65ac 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -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) |
