Files
runner-images-sangeeth/images/win/scripts/Installers/Install-Boost.ps1
Maksim Petrov 0967620111 Switch Windows hostedtoolcache provisioner to GitHub Actions NPM registry (#315)
* Toolcache: add basic error handling in Windows toolcache provisioner

* Toolcache: add GITHUB_FEED_TOKEN into packer templates for Windows

* Toolcache: separate toolcache.json for Windows

* Rework "Validate-ToolCache" script (#6)

* Rework validate toolcache script

* change boost root folder

* Add boost 1.69 for windows-2019

* Add toolcache config variable to Windows 16, 19

* Revert "Add toolcache config variable to Windows 16, 19"

* Add default boost version for validate-boost VS19

* Remove bjam test for boost

* Add boost 1.72 validation for win-2016

Co-authored-by: MaksimZhukov <46996400+MaksimZhukov@users.noreply.github.com>
Co-authored-by: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com>
2020-01-29 10:41:09 +03:00

27 lines
1013 B
PowerShell

################################################################################
## File: Set-BoostRoot.ps1
## Team: CI-Build
## Desc: Install boost using tool cache
################################################################################
$BoostDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "Boost"
$BoostVersions = $env:BOOST_VERSIONS.split(',')
$BoostDefault = $env:BOOST_DEFAULT
foreach($BoostVersion in $BoostVersions)
{
$BoostInstallationDir = Join-Path -Path $BoostDirectory -ChildPath $BoostVersion
$EnvBoostPath = "BOOST_ROOT_{0}" -f ($BoostVersion.Replace('.', '_'))
setx $EnvBoostPath $BoostInstallationDir /M | Out-Null
if ($BoostVersion -eq $BoostDefault)
{
Write-Host "Adding Boost $BoostVersion to the path..."
# Add the Boost binaries to the path
Add-MachinePathItem $BoostInstallationDir | Out-Null
# Set the BOOSTROOT environment variable
setx BOOST_ROOT $BoostInstallationDir /M | Out-Null
}
}