mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 06:40:32 +00:00
[macOS] Add GCC 11 (#3361)
* Add gcc@11 to macOS images * Change tests and software report to use gcc toolset versions * Add natural sort
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing GCC@8 using homebrew..."
|
||||
brew_smart_install "gcc@8"
|
||||
gccVersions=$(get_toolset_value '.gcc.versions | .[]')
|
||||
|
||||
echo "Installing GCC@9 using homebrew..."
|
||||
brew_smart_install "gcc@9"
|
||||
for gccVersion in $gccVersions; do
|
||||
brew_smart_install "gcc@${gccVersion}"
|
||||
done
|
||||
|
||||
# https://github.com/actions/virtual-environments/issues/1280
|
||||
echo "Installing GCC@10 using homebrew..."
|
||||
brew_smart_install "gcc@10"
|
||||
rm $(which gfortran)
|
||||
# Delete default gfortran link if it exists https://github.com/actions/virtual-environments/issues/1280
|
||||
gfortranPath=$(which gfortran)
|
||||
if [ $gfortranPath ]; then
|
||||
rm $gfortranPath
|
||||
fi
|
||||
|
||||
invoke_tests "Common" "GCC"
|
||||
|
||||
@@ -80,7 +80,7 @@ function Get-VcpkgVersion {
|
||||
}
|
||||
|
||||
function Get-GccVersion {
|
||||
$versionList = @("8", "9", "10")
|
||||
$versionList = Get-ToolsetValue -KeyPath gcc.versions
|
||||
$versionList | Foreach-Object {
|
||||
$version = Run-Command "gcc-${_} --version" | Select-Object -First 1
|
||||
"$version - available by ``gcc-${_}`` alias"
|
||||
@@ -88,10 +88,10 @@ function Get-GccVersion {
|
||||
}
|
||||
|
||||
function Get-FortranVersion {
|
||||
$versionList = @("8", "9", "10")
|
||||
$versionList = Get-ToolsetValue -KeyPath gcc.versions
|
||||
$versionList | Foreach-Object {
|
||||
$version = Run-Command "gfortran-${_} --version" | Select-Object -First 1
|
||||
"$version - available by ``gfortran-${_}`` alias"
|
||||
"$version - available by ``gfortran-${_}`` alias"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,9 @@ if ($os.IsLessThanBigSur) {
|
||||
)
|
||||
}
|
||||
|
||||
$markdown += New-MDList -Style Unordered -Lines ($languageAndRuntimeList | Sort-Object)
|
||||
# To sort GCC and Gfortran correctly, we need to use natural sort https://gist.github.com/markwragg/e2a9dc05f3464103d6998298fb575d4e#file-sort-natural-ps1
|
||||
$toNatural = { [regex]::Replace($_, '\d+', { $args[0].Value.PadLeft(20) }) }
|
||||
$markdown += New-MDList -Style Unordered -Lines ($languageAndRuntimeList | Sort-Object $toNatural)
|
||||
|
||||
# Package Management
|
||||
$markdown += New-MDHeader "Package Management" -Level 3
|
||||
|
||||
@@ -10,7 +10,7 @@ Describe ".NET" {
|
||||
}
|
||||
|
||||
Describe "GCC" -Skip:($os.IsHighSierra) {
|
||||
$testCases = @("8", "9", "10") | ForEach-Object { @{Version = $_} }
|
||||
$testCases = Get-ToolsetValue -KeyPath gcc.versions | ForEach-Object { @{Version = $_} }
|
||||
|
||||
It "GCC <Version>" -TestCases $testCases {
|
||||
param (
|
||||
|
||||
@@ -263,6 +263,14 @@
|
||||
"virtualbox"
|
||||
]
|
||||
},
|
||||
"gcc": {
|
||||
"versions": [
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11"
|
||||
]
|
||||
},
|
||||
"toolcache": [
|
||||
{
|
||||
"name": "Python",
|
||||
|
||||
@@ -222,6 +222,14 @@
|
||||
"virtualbox"
|
||||
]
|
||||
},
|
||||
"gcc": {
|
||||
"versions": [
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11"
|
||||
]
|
||||
},
|
||||
"toolcache": [
|
||||
{
|
||||
"name": "Python",
|
||||
|
||||
@@ -150,6 +150,14 @@
|
||||
"julia"
|
||||
]
|
||||
},
|
||||
"gcc": {
|
||||
"versions": [
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11"
|
||||
]
|
||||
},
|
||||
"toolcache": [
|
||||
{
|
||||
"name": "Python",
|
||||
|
||||
Reference in New Issue
Block a user