mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-04 00:44:52 +08:00
Merge branch 'master' of https://github.com/nikita-bykov/virtual-environments into rework-chrome-installation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
function filter_components_by_version {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "install soundflower"
|
||||
brew cask install soundflower
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo Installing aws...
|
||||
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Chrome..."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "Installing Cocoapods..."
|
||||
|
||||
# Setup the Cocoapods master repo
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
###########################################################################
|
||||
# The main idea of this script is to automate dotnet installs
|
||||
@@ -23,7 +23,7 @@ echo "Parsing dotnet SDK (except rc and preview versions) from .json..."
|
||||
if is_BigSur; then
|
||||
DOTNET_CHANNELS=(
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json'
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json'
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json'
|
||||
)
|
||||
elif is_Less_Catalina; then
|
||||
DOTNET_CHANNELS=(
|
||||
@@ -33,7 +33,7 @@ else
|
||||
DOTNET_CHANNELS=(
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json'
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.0/releases.json'
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json'
|
||||
'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json'
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Microsoft Edge..."
|
||||
# Workaround to install version 85 since webdriver is broken for 86
|
||||
cd "$(brew --repo homebrew/homebrew-cask)"
|
||||
git checkout 81f9d08d2b9b7557c0178621078cf59d2c5db2bc
|
||||
brew cask install microsoft-edge
|
||||
git checkout master
|
||||
|
||||
EDGE_INSTALLATION_PATH="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"
|
||||
EDGE_VERSION=$("$EDGE_INSTALLATION_PATH" --version | cut -d' ' -f 3)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "Installing Firefox..."
|
||||
brew cask install firefox
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "Installing GCC@8 using homebrew..."
|
||||
brew install gcc@8
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo Installing Git...
|
||||
brew install git
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||
export PATH="$HOME/.ghcup/bin:$PATH"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
MINICONDA_INSTALLER="/tmp/miniconda.sh"
|
||||
curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# MongoDB object-value database
|
||||
# installs last version of MongoDB Community Edition
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
node_modules=(
|
||||
@@ -16,7 +18,6 @@ if is_Less_Catalina; then
|
||||
|
||||
echo Installing NPM 3.x.x...
|
||||
npm install -g npm@3
|
||||
npm config set prefix /usr/local
|
||||
|
||||
# This step is required to install App Center CLI
|
||||
echo Installing Omelette...
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
#!/bin/bash -e -o pipefail
|
||||
###########################################################################
|
||||
# The script installs node version manager with node versions 6,8,10 and 12
|
||||
#
|
||||
@@ -24,11 +23,8 @@ if [ $? -eq 0 ]; then
|
||||
nvm alias node12 lts/erbium
|
||||
nvm alias node13 v13
|
||||
nvm alias node14 v14
|
||||
|
||||
if is_Catalina || is_BigSur; then
|
||||
# set system node as default
|
||||
nvm alias default system
|
||||
fi
|
||||
# set system node as default
|
||||
nvm alias default system
|
||||
else
|
||||
echo error
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing OpenSSL..."
|
||||
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
|
||||
|
||||
echo Installing OpenSSL...
|
||||
/usr/local/bin/brew install openssl
|
||||
brew install openssl
|
||||
|
||||
# Install OpenSSL 1.0.2t
|
||||
# https://www.openssl.org/policies/releasestrat.html - Version 1.0.2 will be supported until 2019-12-31 (LTS)
|
||||
# To preserve backward compatibility with ruby-toolcache
|
||||
/usr/local/bin/brew tap-new local/openssl
|
||||
FORMULA_PATH=$(/usr/local/bin/brew extract openssl local/openssl | grep "Homebrew/Library/Taps")
|
||||
/usr/local/bin/brew install $FORMULA_PATH
|
||||
brew tap-new --no-git local/openssl
|
||||
FORMULA_PATH=$(brew extract openssl local/openssl | grep "Homebrew/Library/Taps")
|
||||
brew install $FORMULA_PATH
|
||||
|
||||
# Set OpenSSL 1.0.2t as default
|
||||
ln -sf /usr/local/Cellar/openssl@1.0.2t /usr/local/Cellar/openssl
|
||||
@@ -25,4 +22,4 @@ ln -sf ../Cellar/openssl/1.0.2t /usr/local/opt/openssl
|
||||
# https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/start/envosx.md
|
||||
mkdir -p /usr/local/lib/
|
||||
ln -s /usr/local/opt/openssl@1.0.2t/lib/libcrypto.1.0.0.dylib /usr/local/lib/
|
||||
ln -s /usr/local/opt/openssl@1.0.2t/lib/libssl.1.0.0.dylib /usr/local/lib/
|
||||
ln -s /usr/local/opt/openssl@1.0.2t/lib/libssl.1.0.0.dylib /usr/local/lib/
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo Installing PHP
|
||||
brew install php
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
#Install latest version of postgresql
|
||||
brew install postgres
|
||||
@@ -6,13 +6,21 @@ brew install postgres
|
||||
#Service postgresql should be started before use.
|
||||
brew services start postgresql
|
||||
|
||||
#Verify that PostgreSQL is ready for accept incoming connections.
|
||||
# exit codes:
|
||||
# ready - 0
|
||||
# reject - 1
|
||||
# connection timeout - 2
|
||||
# incorrect credentials or parameters - 3
|
||||
pg_isready
|
||||
#Verify PostgreSQL is ready for accept incoming connections
|
||||
echo "Check PostgreSQL service is running"
|
||||
i=10
|
||||
COMMAND='pg_isready'
|
||||
while [ $i -gt 0 ]; do
|
||||
echo "Check PostgreSQL service status"
|
||||
eval $COMMAND && break
|
||||
((i--))
|
||||
if [ $i == 0 ]; then
|
||||
echo "PostgreSQL service not ready, all attempts exhausted"
|
||||
exit 1
|
||||
fi
|
||||
echo "PostgreSQL service not ready, wait 10 more sec, attempts left: $i"
|
||||
sleep 10
|
||||
done
|
||||
|
||||
#Stop postgresql
|
||||
brew services stop postgresql
|
||||
@@ -1,3 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Azure CLI...
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
################################################################################
|
||||
## File: pypy.sh
|
||||
## Desc: Installs PyPy
|
||||
################################################################################
|
||||
source ~/utils/utils.sh
|
||||
set -e
|
||||
|
||||
function InstallPyPy
|
||||
{
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Python Tooling"
|
||||
|
||||
echo "Brew Installing Python 3"
|
||||
# Workaround to have both 3.8 & 3.9(which required by some brew formulas) in the system, but only 3.8 is linked
|
||||
/usr/local/bin/brew install python@3.8
|
||||
/usr/local/bin/brew install python@3.9
|
||||
/usr/local/bin/brew unlink python@3.9
|
||||
/usr/local/bin/brew unlink python@3.8
|
||||
/usr/local/bin/brew link python@3.8
|
||||
brew install python@3.8
|
||||
brew install python@3.9
|
||||
brew unlink python@3.9
|
||||
brew unlink python@3.8
|
||||
brew link python@3.8
|
||||
|
||||
echo "Brew Installing Python 2"
|
||||
# Create local tap with formula due to python2 formula depreciation
|
||||
/usr/local/bin/brew tap-new local/python2
|
||||
FORMULA_PATH=$(/usr/local/bin/brew extract python@2 local/python2 | grep "Homebrew/Library/Taps")
|
||||
/usr/local/bin/brew install $FORMULA_PATH
|
||||
brew tap-new --no-git local/python2
|
||||
FORMULA_PATH=$(brew extract python@2 local/python2 | grep "Homebrew/Library/Taps")
|
||||
brew install $FORMULA_PATH
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
shutdown -r now
|
||||
@@ -1,17 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Ruby...
|
||||
if is_Less_BigSur; then
|
||||
# We can't install latest ruby 2.7 as a default version related with bug
|
||||
# https://github.com/fastlane/fastlane/issues/15397
|
||||
/usr/local/bin/brew install ruby@2.6
|
||||
ln -sf /usr/local/opt/ruby\@2.6 /usr/local/opt/ruby
|
||||
else
|
||||
brew install ruby
|
||||
fi
|
||||
|
||||
|
||||
brew install ruby
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Updating RubyGems...
|
||||
gem update --system
|
||||
|
||||
|
||||
# Freeze xcodeproj 1.18.0 because version 1.19.0 contains breaking changes related to CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER flag
|
||||
# Related issues:
|
||||
# - https://github.com/CocoaPods/CocoaPods/issues/10153
|
||||
# - https://github.com/actions/virtual-environments/issues/1804
|
||||
# Need to revisit when Cocoapods 1.10.0 is released and added to VM
|
||||
gem install xcodeproj -v 1.18.0
|
||||
|
||||
echo Installing xcode-install utility...
|
||||
gem install xcode-install --force
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo Installing Rustup...
|
||||
brew install rustup-init
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
echo "Get the latest Stack version..."
|
||||
StackRelease=$(curl -s "https://api.github.com/repos/commercialhaskell/stack/releases/latest")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
#!/bin/bash -e -o pipefail
|
||||
###########################################################################
|
||||
# The script downloads macos hosted tool cache for several Python versions
|
||||
# The script downloads macos hosted tool cache for several Python versions
|
||||
# and installs them onto the system
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# Download hosted tool cache with npm
|
||||
NPM_FEED="npm.pkg.github.com"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
set -e
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Set env variable for vcpkg
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xamarin-utils.sh
|
||||
|
||||
@@ -22,9 +23,6 @@ echo "Moving Visual Studio to /Applications/..."
|
||||
pushd $TMPMOUNT
|
||||
tar cf - "./Visual Studio.app" | tar xf - -C /Applications/
|
||||
|
||||
echo "Launching vstools..."
|
||||
/Applications/Visual\ Studio.app/Contents/MacOS/vstool
|
||||
|
||||
popd
|
||||
sudo hdiutil detach "$TMPMOUNT"
|
||||
sudo rm -rf "$TMPMOUNT"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
ANDROID_HOME=$HOME/Library/Android/sdk
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xamarin-utils.sh
|
||||
|
||||
@@ -8,6 +9,7 @@ XAMARIN_MAC_VERSIONS=($(get_toolset_value '.xamarin."mac-versions" | reverse | .
|
||||
XAMARIN_ANDROID_VERSIONS=($(get_toolset_value '.xamarin."android-versions" | reverse | .[]'))
|
||||
LATEST_SDK_SYMLINK=$(get_toolset_value '.xamarin.bundles[0].symlink')
|
||||
CURRENT_SDK_SYMLINK=$(get_toolset_value '.xamarin."bundle-default"')
|
||||
DEFAULT_XCODE_VERSION=$(get_default_xcode_from_toolset)
|
||||
|
||||
if [ "$CURRENT_SDK_SYMLINK" == "latest" ]; then
|
||||
CURRENT_SDK_SYMLINK=$LATEST_SDK_SYMLINK
|
||||
@@ -63,8 +65,10 @@ createBundleLink $CURRENT_SDK_SYMLINK "Current"
|
||||
# Fix nuget in some mono versions because of known bugs
|
||||
#
|
||||
|
||||
# Fix Mono issue with default nuget: https://github.com/mono/mono/issues/17637
|
||||
installNuget "6.4.0" "5.3.1"
|
||||
if is_Less_BigSur; then
|
||||
# Fix Mono issue with default nuget: https://github.com/mono/mono/issues/17637
|
||||
installNuget "6.4.0" "5.3.1"
|
||||
fi
|
||||
|
||||
if is_Less_Catalina; then
|
||||
installNuget "4.8.1" "4.3.0"
|
||||
@@ -79,3 +83,8 @@ popd
|
||||
|
||||
echo "Clean up packages..."
|
||||
sudo rm -rf "$TMPMOUNT"
|
||||
|
||||
# Fix Xamarin issue with Xcode symlink: https://github.com/xamarin/xamarin-macios/issues/9960
|
||||
PREFERENCES_XAMARIN_DIR="${HOME}/Library/Preferences/Xamarin"
|
||||
mkdir -p $PREFERENCES_XAMARIN_DIR
|
||||
/usr/libexec/PlistBuddy -c "add :AppleSdkRoot string /Applications/Xcode_${DEFAULT_XCODE_VERSION}.app" $PREFERENCES_XAMARIN_DIR/Settings.plist
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
XCODE_LIST=($(get_xcode_list_from_toolset))
|
||||
DEFAULT_XCODE_VERSION=$(get_default_xcode_from_toolset)
|
||||
|
||||
# https://github.com/microsoft/appcenter/issues/847
|
||||
# Assets.xcassets : error : CoreData: error: (6922) I/O error for database
|
||||
# Assets.xcassets : error : CoreData: error: (6922) I/O error for database
|
||||
# at $HOME/Library/Developer/Xcode/UserData/IB Support/Simulator Devices/{GUID}
|
||||
echo "Erase a device's contents and settings:"
|
||||
for XCODE_VERSION in "${XCODE_LIST[@]}"
|
||||
@@ -15,6 +15,11 @@ do
|
||||
#add sleep to let CoreSimulatorService to exit
|
||||
sleep 3
|
||||
|
||||
# Version 12.2_beta installed into 12.2 directory and 12.1_GM_seed in 12.1
|
||||
pattern="[0-9]{1,2}.*_"
|
||||
if [[ $XCODE_VERSION =~ $pattern ]] ; then
|
||||
XCODE_VERSION=$(echo $XCODE_VERSION | cut -d"_" -f 1)
|
||||
fi
|
||||
# Select xcode version by default
|
||||
sudo xcode-select -s "/Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
# The script currently requires 2 external variables to be set: XCODE_INSTALL_USER
|
||||
# and XCODE_INSTALL_PASSWORD, in order to access the Apple Developer Center
|
||||
|
||||
set -e
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xcode-utils.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user