mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
[Windows] Rename image build scripts (#8808)
This commit is contained in:
committed by
GitHub
parent
f78a7baa80
commit
0263bdd53e
@@ -1,14 +1,32 @@
|
||||
# Set custom directorys for pipx
|
||||
################################################################################
|
||||
## File: Install-Pipx.ps1
|
||||
## Desc: Install pipx and pipx packages
|
||||
################################################################################
|
||||
|
||||
Write-Host "Installing pipx..."
|
||||
$env:PIPX_BIN_DIR = "${env:ProgramFiles(x86)}\pipx_bin"
|
||||
$env:PIPX_HOME = "${env:ProgramFiles(x86)}\pipx"
|
||||
|
||||
# Install pipx
|
||||
pip install pipx
|
||||
|
||||
# Set environment variables
|
||||
Add-MachinePathItem "${env:PIPX_BIN_DIR}"
|
||||
Set-SystemVariable -SystemVariable PIPX_BIN_DIR -Value $env:PIPX_BIN_DIR
|
||||
Set-SystemVariable -SystemVariable PIPX_HOME -Value $env:PIPX_HOME
|
||||
|
||||
# Test pipx
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Pipx"
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "Pipx"
|
||||
|
||||
Write-Host "Installing pipx packages..."
|
||||
|
||||
$pipxToolset = (Get-ToolsetContent).pipx
|
||||
foreach ($tool in $pipxToolset) {
|
||||
if ($tool.python) {
|
||||
$pythonPath = (Get-Item -Path "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}.*\x64\python-${tool.python}*").FullName
|
||||
Write-Host "Install ${tool.package} into python ${tool.python}"
|
||||
pipx install $tool.package --python $pythonPath
|
||||
} else {
|
||||
Write-Host "Install ${tool.package} into default python"
|
||||
pipx install $tool.package
|
||||
}
|
||||
}
|
||||
|
||||
Invoke-PesterTests -TestFile "PipxPackages"
|
||||
|
||||
Reference in New Issue
Block a user