Switch provisioners to install Boost from GitHub releases on Windows (#972)

* switch provisioners to install boost from github releases

* minor fixes

* separate boosts by toolset versions

* minor fix

* switch provisioners for win16

* fix bugs

* fix validation

* minor fix

* fix validation

* fix validation

* fix validation

* minor fix

* change toolset version for win16

* minor fixes

* minor fix

* fix validation

* update links to toolset-json

* add arch to BoostInstallationDir
This commit is contained in:
Dibir Magomedsaygitov
2020-06-10 19:42:15 +03:00
committed by GitHub
parent a0b45fba7a
commit f33a870bf1
10 changed files with 52 additions and 77 deletions

View File

@@ -15,7 +15,13 @@ Function Install-Asset {
$assetArchivePath = Start-DownloadWithRetry -Url $ReleaseAsset.download_url -Name $ReleaseAsset.filename
Write-Host "Extract $($ReleaseAsset.filename) content..."
7z.exe x $assetArchivePath -o"$assetFolderPath" -y | Out-Null
if ($assetArchivePath.EndsWith(".tar.gz")) {
$assetTarPath = $assetArchivePath.TrimEnd(".tar.gz")
Extract-7Zip -Path $assetArchivePath -DestinationPath $assetTarPath
Extract-7Zip -Path $assetTarPath -DestinationPath $assetFolderPath
} else {
Extract-7Zip -Path $assetArchivePath -DestinationPath $assetFolderPath
}
Write-Host "Invoke installation script..."
Push-Location -Path $assetFolderPath
@@ -48,7 +54,7 @@ $ErrorActionPreference = "Stop"
Import-Module -Name ImageHelpers -Force
# Get toolcache content from toolset
$ToolsToInstall = @("Python", "Node")
$ToolsToInstall = @("Python", "Node", "Boost")
$tools = Get-ToolsetContent | Select-Object -ExpandProperty toolcache | Where {$ToolsToInstall -contains $_.Name}
foreach ($tool in $tools) {
@@ -60,7 +66,7 @@ foreach ($tool in $tools) {
$asset = $assets | Where-Object version -like $toolVersion `
| Sort-Object -Property {[version]$_.version} -Descending `
| Select-Object -ExpandProperty files `
| Where-Object { ($_.platform -eq $tool.platform) -and ($_.arch -eq $tool.arch) } `
| Where-Object { ($_.platform -eq $tool.platform) -and ($_.arch -eq $tool.arch) -and ($_.toolset -eq $tool.toolset) } `
| Select-Object -First 1
Write-Host "Installing $($tool.name) $toolVersion $($tool.arch)..."