mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[macOS] Move Ruby and Go versions to toolset (#4046)
This commit is contained in:
committed by
GitHub
parent
045e638562
commit
d022b0d6a8
@@ -19,9 +19,6 @@ if is_Less_Catalina; then
|
||||
echo "export USE_BAZEL_VERSION=${USE_BAZEL_VERSION}" >> "${HOME}/.bashrc"
|
||||
fi
|
||||
|
||||
# Create symlinks for Go 1.15 to preserve backward compatibility
|
||||
ln -sf $(brew --prefix go@1.15)/bin/* /usr/local/bin/
|
||||
|
||||
# Invoke bazel to download bazel version via bazelisk
|
||||
bazel
|
||||
|
||||
|
||||
11
images/macos/provision/core/golang.sh
Normal file
11
images/macos/provision/core/golang.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
DEFAULT_GO_VERSION=$(get_toolset_value '.go.default')
|
||||
echo "Installing Go..."
|
||||
brew_smart_install "go@${DEFAULT_GO_VERSION}"
|
||||
|
||||
# Create symlinks to preserve backward compatibility. Symlinks are not created when non-latest go is being installed
|
||||
ln -sf $(brew --prefix go@${DEFAULT_GO_VERSION})/bin/* /usr/local/bin/
|
||||
|
||||
invoke_tests "Common" "Go"
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
DEFAULT_RUBY_VERSION=$(get_toolset_value '.ruby.default')
|
||||
echo Installing Ruby...
|
||||
brew_smart_install "ruby@2.7"
|
||||
brew_smart_install "ruby@${DEFAULT_RUBY_VERSION}"
|
||||
|
||||
#if High Sierra - skip installation from toolset
|
||||
if is_HighSierra; then
|
||||
|
||||
@@ -4,7 +4,7 @@ source ~/utils/utils.sh
|
||||
echo Updating RubyGems...
|
||||
gem update --system
|
||||
|
||||
gemsToInstall=$(get_toolset_value ".rubygems[]")
|
||||
gemsToInstall=$(get_toolset_value '.ruby.rubygems | .[]')
|
||||
if [ -n "$gemsToInstall" ]; then
|
||||
for gem in $gemsToInstall; do
|
||||
echo "Installing gem $gem"
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
||||
"scripts": [
|
||||
"./provision/core/commonutils.sh",
|
||||
"./provision/core/golang.sh",
|
||||
"./provision/core/openjdk.sh",
|
||||
"./provision/core/php.sh",
|
||||
"./provision/core/aws.sh",
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
||||
"scripts": [
|
||||
"./provision/core/commonutils.sh",
|
||||
"./provision/core/golang.sh",
|
||||
"./provision/core/swiftlint.sh",
|
||||
"./provision/core/openjdk.sh",
|
||||
"./provision/core/php.sh",
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
||||
"scripts": [
|
||||
"./provision/core/commonutils.sh",
|
||||
"./provision/core/golang.sh",
|
||||
"./provision/core/swiftlint.sh",
|
||||
"./provision/core/openjdk.sh",
|
||||
"./provision/core/php.sh",
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
||||
"scripts": [
|
||||
"./provision/core/commonutils.sh",
|
||||
"./provision/core/golang.sh",
|
||||
"./provision/core/swiftlint.sh",
|
||||
"./provision/core/openjdk.sh",
|
||||
"./provision/core/php.sh",
|
||||
|
||||
@@ -24,11 +24,6 @@ Describe "SwiftFormat" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Go" {
|
||||
It "Go" {
|
||||
"go version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GnuPG" {
|
||||
It "GnuPG" {
|
||||
|
||||
@@ -97,4 +97,10 @@ Describe "Bicep" {
|
||||
It "Bicep" {
|
||||
"bicep --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Go" {
|
||||
It "Go" {
|
||||
"go version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
Describe "RubyGems" {
|
||||
$gemTestCases = Get-ToolsetValue -KeyPath "rubygems" | ForEach-Object {
|
||||
$gemTestCases = Get-ToolsetValue -KeyPath "ruby.rubygems" | ForEach-Object {
|
||||
@{gemName = $_}
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,6 @@
|
||||
"gh",
|
||||
"gnupg",
|
||||
"gnu-tar",
|
||||
"go@1.15",
|
||||
"helm",
|
||||
"libpq",
|
||||
"llvm",
|
||||
@@ -279,5 +278,19 @@
|
||||
"versions": [
|
||||
"2.1"
|
||||
]
|
||||
},
|
||||
"ruby": {
|
||||
"default": "2.7",
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
},
|
||||
"go": {
|
||||
"default": "1.15"
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,6 @@
|
||||
"gh",
|
||||
"gnupg",
|
||||
"gnu-tar",
|
||||
"go@1.15",
|
||||
"helm",
|
||||
"kotlin",
|
||||
"libpq",
|
||||
@@ -350,12 +349,18 @@
|
||||
"2.1"
|
||||
]
|
||||
},
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
"ruby": {
|
||||
"default": "2.7",
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
},
|
||||
"go": {
|
||||
"default": "1.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,6 @@
|
||||
"gh",
|
||||
"gnupg",
|
||||
"gnu-tar",
|
||||
"go@1.15",
|
||||
"helm",
|
||||
"kotlin",
|
||||
"libpq",
|
||||
@@ -304,12 +303,18 @@
|
||||
"5.0"
|
||||
]
|
||||
},
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
"ruby": {
|
||||
"default": "2.7",
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
},
|
||||
"go": {
|
||||
"default": "1.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,6 @@
|
||||
"gh",
|
||||
"gnupg",
|
||||
"gnu-tar",
|
||||
"go@1.15",
|
||||
"helm",
|
||||
"kotlin",
|
||||
"libpq",
|
||||
@@ -239,12 +238,18 @@
|
||||
"5.0"
|
||||
]
|
||||
},
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
"ruby": {
|
||||
"default": "2.7",
|
||||
"rubygems": [
|
||||
"xcode-install",
|
||||
"cocoapods",
|
||||
"nomad-cli",
|
||||
"xcpretty",
|
||||
"bundler",
|
||||
"fastlane"
|
||||
]
|
||||
},
|
||||
"go": {
|
||||
"default": "1.15"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user