mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-04 00:44:52 +08:00
[macOS] add pester tests to install scripts part-1. (#2286)
* [macOS] add pester tests to install scripts part-1. * changed version * added changes related to common utils installation * added source tests file * removed tests from homebrew * moved jq to homebrew * fix nitpicks * incorrect things are fixed. * fixed some mistakes in the text * commonutils changed. * remove swiftlint installation from toolsets * removed useless string
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
# Setup the Cocoapods
|
||||
echo "Installing Cocoapods..."
|
||||
|
||||
# Setup the Cocoapods master repo
|
||||
echo Setting up the Cocoapods master repository...
|
||||
pod setup
|
||||
|
||||
# Create a symlink to /usr/local/bin since it was removed due to Homebrew change.
|
||||
ln -sf $(which pod) /usr/local/bin/pod
|
||||
ln -sf $(which pod) /usr/local/bin/pod
|
||||
|
||||
invoke_tests "Common" "CocoaPods"
|
||||
@@ -1,60 +1,21 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
# TO-DO: Move the list of brew packages and casks to toolset
|
||||
|
||||
# brew install
|
||||
binst_common_utils=(
|
||||
carthage
|
||||
cmake
|
||||
subversion
|
||||
go
|
||||
gnupg
|
||||
llvm
|
||||
libpq
|
||||
zstd
|
||||
packer
|
||||
helm
|
||||
aliyun-cli
|
||||
bazelisk
|
||||
gh
|
||||
p7zip
|
||||
ant
|
||||
aria2
|
||||
gnu-tar
|
||||
)
|
||||
|
||||
if is_Less_BigSur; then
|
||||
binst_common_utils+=(
|
||||
xctool
|
||||
bats
|
||||
parallel
|
||||
)
|
||||
fi
|
||||
|
||||
for package in ${binst_common_utils[@]}; do
|
||||
echo "Install $package"
|
||||
common_packages=$(get_toolset_value '.brew.common_packages[]')
|
||||
for package in $common_packages; do
|
||||
echo "Installing $package..."
|
||||
brew install $package
|
||||
done
|
||||
|
||||
# brew cask install
|
||||
bcask_common_utils=(
|
||||
julia
|
||||
)
|
||||
|
||||
if is_Less_BigSur; then
|
||||
bcask_common_utils+=(
|
||||
virtualbox
|
||||
vagrant
|
||||
r
|
||||
)
|
||||
fi
|
||||
|
||||
for package in ${bcask_common_utils[@]}; do
|
||||
echo "Install $package"
|
||||
cask_packages=$(get_toolset_value '.brew.cask_packages[]')
|
||||
for package in $cask_packages; do
|
||||
echo "Installing $package..."
|
||||
brew install --cask $package
|
||||
done
|
||||
|
||||
# Invoke bazel to download the latest bazel version via bazelisk
|
||||
bazel
|
||||
|
||||
# Invoke tests for all common tools
|
||||
invoke_tests "Common" "CommonUtils"
|
||||
@@ -8,6 +8,7 @@
|
||||
###########################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
@@ -57,3 +58,5 @@ fi
|
||||
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> "$HOME/.bashrc"
|
||||
|
||||
echo "Dotnet operations have been completed successfully..."
|
||||
|
||||
invoke_tests "Common" ".NET"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing GCC@8 using homebrew..."
|
||||
brew install gcc@8
|
||||
@@ -9,4 +10,6 @@ brew install gcc@9
|
||||
# https://github.com/actions/virtual-environments/issues/1280
|
||||
echo "Installing GCC@10 using homebrew..."
|
||||
brew install gcc@10
|
||||
rm $(which gfortran)
|
||||
rm $(which gfortran)
|
||||
|
||||
invoke_tests "Common" "GCC"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing Git...
|
||||
brew install git
|
||||
@@ -27,4 +28,6 @@ git config --global advice.resolveConflict false
|
||||
git config --global advice.implicitIdentity false
|
||||
git config --global advice.detachedHead false
|
||||
git config --global advice.amWorkDir false
|
||||
git config --global advice.rmHints false
|
||||
git config --global advice.rmHints false
|
||||
|
||||
invoke_tests "Common" "Git"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||
export PATH="$HOME/.ghcup/bin:$PATH"
|
||||
@@ -18,3 +19,5 @@ done
|
||||
|
||||
echo "install cabal..."
|
||||
ghcup install-cabal
|
||||
|
||||
invoke_tests "Common" "Haskell"
|
||||
|
||||
@@ -7,14 +7,15 @@ HOMEBREW_INSTALL_URL="https://raw.githubusercontent.com/Homebrew/install/master/
|
||||
echo "Disabling Homebrew analytics..."
|
||||
brew analytics off
|
||||
|
||||
echo "Installing the latest curl..."
|
||||
# jq is required for further installation scripts
|
||||
echo "Installing jq..."
|
||||
brew install jq
|
||||
|
||||
echo "Installing curl..."
|
||||
brew install curl
|
||||
|
||||
echo "Installing wget..."
|
||||
brew install wget
|
||||
|
||||
echo "Installing jq..."
|
||||
brew install jq
|
||||
|
||||
# init brew bundle feature
|
||||
brew tap Homebrew/bundle
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
MINICONDA_INSTALLER="/tmp/miniconda.sh"
|
||||
curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER
|
||||
@@ -9,4 +10,6 @@ sudo ln -s /usr/local/miniconda/bin/conda /usr/local/bin/conda
|
||||
|
||||
if [ -d "$HOME/.conda" ]; then
|
||||
sudo chown -R $USER "$HOME/.conda"
|
||||
fi
|
||||
fi
|
||||
|
||||
invoke_tests "Common" "Miniconda"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
# MongoDB object-value database
|
||||
# installs last version of MongoDB Community Edition
|
||||
@@ -7,4 +8,6 @@
|
||||
echo "Installing mongodb..."
|
||||
|
||||
brew tap mongodb/brew
|
||||
brew install mongodb-community
|
||||
brew install mongodb-community
|
||||
|
||||
invoke_tests "Common" "Mongo"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
node_modules=(
|
||||
@@ -43,3 +43,5 @@ if is_Less_BigSur; then
|
||||
echo "Install node-gyp"
|
||||
npm install -g node-gyp
|
||||
fi
|
||||
|
||||
invoke_tests "Node" "Node.js"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#
|
||||
###########################################################################
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
|
||||
@@ -30,3 +31,5 @@ else
|
||||
fi
|
||||
|
||||
echo "Node version manager has been installed successfully"
|
||||
|
||||
invoke_tests "Node" "nvm"
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
installAzulJDK() {
|
||||
local URL=$1
|
||||
@@ -48,4 +49,6 @@ echo Installing Maven...
|
||||
brew install maven
|
||||
|
||||
echo Installing Gradle ...
|
||||
brew install gradle
|
||||
brew install gradle
|
||||
|
||||
invoke_tests "Java"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Install latest openssl"
|
||||
brew install openssl
|
||||
@@ -10,3 +10,5 @@ brew install openssl@1.1
|
||||
|
||||
# Symlink brew openssl@1.1 to `/usr/local/bin` as Homebrew refuses
|
||||
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /usr/local/bin/openssl
|
||||
|
||||
invoke_tests "Common" "OpenSSL"
|
||||
Reference in New Issue
Block a user