mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Add Python tools installation from Github releases for Windows (#705)
* Add Toolset provision for Windows Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com>
This commit is contained in:
@@ -63,32 +63,6 @@ function RunTestsByPath {
|
||||
}
|
||||
}
|
||||
|
||||
function Get-SystemDefaultPython {
|
||||
Write-Host "Validate system Python..."
|
||||
|
||||
if (Get-Command -Name 'python')
|
||||
{
|
||||
Write-Host "Python $(& python -V 2>&1) on path"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "Python is not on path"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$pythonBinVersion = $(& python -V 2>&1)
|
||||
if ($pythonBinVersion -notlike "Python 3.*")
|
||||
{
|
||||
Write-Error "Python 3 is not in the PATH"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$pythonBinOnPath = Split-Path -Path (Get-Command -Name 'python').Path
|
||||
$description = GetDefaultToolDescription -SoftwareVersion $pythonBinVersion -SoftwareLocation $pythonBinOnPath
|
||||
|
||||
return $description
|
||||
}
|
||||
|
||||
function Get-SystemDefaultRuby {
|
||||
Write-Host "Validate system Ruby..."
|
||||
|
||||
@@ -196,9 +170,6 @@ function ToolcacheTest {
|
||||
}
|
||||
}
|
||||
|
||||
if ($SoftwareName -contains "Python") {
|
||||
$markdownDescription += Get-SystemDefaultPython
|
||||
}
|
||||
if ($SoftwareName -contains "Ruby") {
|
||||
$markdownDescription += Get-SystemDefaultRuby
|
||||
}
|
||||
@@ -206,10 +177,6 @@ function ToolcacheTest {
|
||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $markdownDescription
|
||||
}
|
||||
|
||||
# Python test
|
||||
$PythonTests = @("python.exe", "Scripts\pip.exe")
|
||||
ToolcacheTest -SoftwareName "Python" -ExecTests $PythonTests
|
||||
|
||||
# PyPy test
|
||||
$PyPyTests = @("python.exe", "bin\pip.exe")
|
||||
ToolcacheTest -SoftwareName "PyPy" -ExecTests $PyPyTests
|
||||
|
||||
Reference in New Issue
Block a user