mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
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:
committed by
GitHub
parent
a0b45fba7a
commit
f33a870bf1
@@ -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)..."
|
||||
|
||||
Reference in New Issue
Block a user