mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[MacOS] Add install-python.sh to arm64 templates (#9474)
* add install-python.sh to arm64 templates * add Pipx pester test * Update Python.Tests.ps1 * bump python version
This commit is contained in:
@@ -38,7 +38,7 @@ if is_Veertu; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Brew Installing Python 3"
|
echo "Brew Installing Python 3"
|
||||||
brew_smart_install "python@3.11"
|
brew_smart_install "python@3.12"
|
||||||
|
|
||||||
echo "Installing pipx"
|
echo "Installing pipx"
|
||||||
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
|
export PIPX_BIN_DIR=/usr/local/opt/pipx_bin
|
||||||
|
|||||||
@@ -61,12 +61,12 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
|||||||
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
|
$languageAndRuntime.AddToolVersion("Python", $(Get-PythonVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
|
||||||
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
|
$languageAndRuntime.AddToolVersion("Python3", $(Get-Python3Version))
|
||||||
}
|
|
||||||
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsBigSur)) {
|
if ((-not $os.IsVentura) -and (-not $os.IsSonoma) -and (-not $os.IsBigSur)) {
|
||||||
$languageAndRuntime.AddToolVersion("R", $(Get-RVersion))
|
$languageAndRuntime.AddToolVersion("R", $(Get-RVersion))
|
||||||
}
|
}
|
||||||
|
|
||||||
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
|
$languageAndRuntime.AddToolVersion("Ruby", $(Get-RubyVersion))
|
||||||
|
|
||||||
# Package Management
|
# Package Management
|
||||||
@@ -87,10 +87,8 @@ if ((-not $os.IsVentura) -and (-not $os.IsSonoma)) {
|
|||||||
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2))
|
$packageManagement.AddToolVersion("Pip", $(Get-PipVersion -Version 2))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64)) {
|
|
||||||
$packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3))
|
$packageManagement.AddToolVersion("Pip3", $(Get-PipVersion -Version 3))
|
||||||
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
|
$packageManagement.AddToolVersion("Pipx", $(Get-PipxVersion))
|
||||||
}
|
|
||||||
|
|
||||||
$packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion))
|
$packageManagement.AddToolVersion("RubyGems", $(Get-RubyGemsVersion))
|
||||||
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSonoma)) {
|
if ((-not $os.IsVenturaArm64) -and (-not $os.IsSonomaArm64) -and (-not $os.IsSonoma)) {
|
||||||
|
|||||||
@@ -3,14 +3,20 @@ Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
|
|||||||
|
|
||||||
$os = Get-OSVersion
|
$os = Get-OSVersion
|
||||||
|
|
||||||
Describe "Python3" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
|
Describe "Python3" {
|
||||||
It "Python 3 is available" {
|
It "Python 3 is available" {
|
||||||
"python3 --version" | Should -ReturnZeroExitCode
|
"python3 --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($os.IsVenturaArm64 -or $os.IsSonomaArm64) {
|
||||||
|
It "Python 3 is installed under /opt/homebrew/bin/" {
|
||||||
|
Get-ToolPath "python3" | Should -BeLike "/opt/homebrew/bin/*"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
It "Python 3 is installed under /usr/local/bin" {
|
It "Python 3 is installed under /usr/local/bin" {
|
||||||
Get-ToolPath "python3" | Should -BeLike "/usr/local/bin*"
|
Get-ToolPath "python3" | Should -BeLike "/usr/local/bin*"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
It "Pip 3 is available" {
|
It "Pip 3 is available" {
|
||||||
"pip3 --version" | Should -ReturnZeroExitCode
|
"pip3 --version" | Should -ReturnZeroExitCode
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ build {
|
|||||||
"${path.root}/../scripts/build/install-powershell.sh",
|
"${path.root}/../scripts/build/install-powershell.sh",
|
||||||
"${path.root}/../scripts/build/install-mono.sh",
|
"${path.root}/../scripts/build/install-mono.sh",
|
||||||
"${path.root}/../scripts/build/install-dotnet.sh",
|
"${path.root}/../scripts/build/install-dotnet.sh",
|
||||||
|
"${path.root}/../scripts/build/install-python.sh",
|
||||||
"${path.root}/../scripts/build/install-azcopy.sh",
|
"${path.root}/../scripts/build/install-azcopy.sh",
|
||||||
"${path.root}/../scripts/build/install-openssl.sh",
|
"${path.root}/../scripts/build/install-openssl.sh",
|
||||||
"${path.root}/../scripts/build/install-ruby.sh",
|
"${path.root}/../scripts/build/install-ruby.sh",
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ build {
|
|||||||
"${path.root}/../scripts/build/install-powershell.sh",
|
"${path.root}/../scripts/build/install-powershell.sh",
|
||||||
"${path.root}/../scripts/build/install-mono.sh",
|
"${path.root}/../scripts/build/install-mono.sh",
|
||||||
"${path.root}/../scripts/build/install-dotnet.sh",
|
"${path.root}/../scripts/build/install-dotnet.sh",
|
||||||
|
"${path.root}/../scripts/build/install-python.sh",
|
||||||
"${path.root}/../scripts/build/install-azcopy.sh",
|
"${path.root}/../scripts/build/install-azcopy.sh",
|
||||||
"${path.root}/../scripts/build/install-openssl.sh",
|
"${path.root}/../scripts/build/install-openssl.sh",
|
||||||
"${path.root}/../scripts/build/install-ruby.sh",
|
"${path.root}/../scripts/build/install-ruby.sh",
|
||||||
|
|||||||
Reference in New Issue
Block a user