Skip to content

Commit

Permalink
[vcpkg] VM Update (#12176)
Browse files Browse the repository at this point in the history
* [qt5] Add more dependent Linux packages for #11596

* [vcpkg] Add LLVM 10 to Windows CI machines for #11655

* [vcpkg] Add missing Param block to InstallLLVM function.

* [vcpkg] Add throw after all Write-Error calls for consistency with #12172
  • Loading branch information
BillyONeal authored Jul 1, 2020
1 parent 0084acc commit 532db1d
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/Generate-SpdxLicenseList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/azure-pipelines/create-vmss-helpers.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions scripts/azure-pipelines/generate-skip-list.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,13 +44,15 @@ $missingValues = $baselineListRaw | Where-Object { -not ($_ -match "=\w") }

if ($missingValues) {
Write-Error "The following are missing values: $missingValues"
throw
}

$invalidValues = $baselineListRaw `
| Where-Object { -not ($_ -match "=(skip|pass|fail|ignore)$") }

if ($invalidValues) {
Write-Error "The following have invalid values: $invalidValues"
throw
}

$baselineForTriplet = $baselineListRaw `
Expand All @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion scripts/azure-pipelines/linux/provision-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions scripts/azure-pipelines/test-modified-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
43 changes: 43 additions & 0 deletions scripts/azure-pipelines/windows/provision-image.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:/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 ' + `
Expand Down Expand Up @@ -154,6 +155,7 @@ Function PrintMsiExitCodeMessage {
}
else {
Write-Error "Installation failed! Exited with $ExitCode."
throw
}
}

Expand Down Expand Up @@ -211,6 +213,7 @@ Function InstallVisualStudio {
}
catch {
Write-Error "Failed to install Visual Studio! $($_.Exception.Message)"
throw
}
}

Expand Down Expand Up @@ -244,6 +247,7 @@ Function InstallMSI {
}
catch {
Write-Error "Failed to install $Name! $($_.Exception.Message)"
throw
}
}

Expand Down Expand Up @@ -280,6 +284,7 @@ Function InstallZip {
}
catch {
Write-Error "Failed to install $Name! $($_.Exception.Message)"
throw
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand All @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions scripts/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 532db1d

Please sign in to comment.