mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
[macOS] Add openssl@1.1 using old homebrew commit (#10935)
This commit is contained in:
committed by
GitHub
parent
a070c8516f
commit
6b5924aa06
@@ -8,20 +8,24 @@ source ~/utils/utils.sh
|
|||||||
|
|
||||||
echo "Install openssl@1.1"
|
echo "Install openssl@1.1"
|
||||||
|
|
||||||
openssl_pkg=$(download_with_retry "https://www.openssl.org/source/openssl-1.1.1w.tar.gz")
|
COMMIT=d91dabd087cb0b906c92a825df9e5e5e1a4f59f8
|
||||||
tar -xvf $openssl_pkg
|
FORMULA_URL="https://raw.githubusercontent.com/Homebrew/homebrew-core/$COMMIT/Formula/o/openssl@1.1.rb"
|
||||||
cd openssl-1.1.1w
|
FORMULA_PATH="$(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/o/openssl@1.1.rb"
|
||||||
./config --prefix=/usr/local/openssl
|
mkdir -p "$(dirname $FORMULA_PATH)"
|
||||||
make
|
curl -fsSL $FORMULA_URL -o $FORMULA_PATH
|
||||||
sudo make install
|
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_FROM_API=1 brew install openssl@1.1
|
||||||
export OPENSSL="/usr/local/openssl/bin"
|
|
||||||
echo "export OPENSSL=${OPENSSL}" >> ${HOME}/.bashrc
|
|
||||||
|
|
||||||
if ! is_Arm64; then
|
if ! is_Arm64; then
|
||||||
ln -sf ${OPENSSL}/openssl /usr/local/bin/openssl
|
# Symlink brew openssl@1.1 to `/usr/local/bin` as Homebrew refuses
|
||||||
ln -sf ${OPENSSL}/openssl /usr/local/opt/openssl
|
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /usr/local/bin/openssl
|
||||||
else
|
else
|
||||||
ln -sf ${OPENSSL}/openssl /opt/homebrew/bin/openssl
|
# arm64 has a different installation prefix for brew
|
||||||
|
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /opt/homebrew/bin/openssl
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! is_Arm64; then
|
||||||
|
# Most of build systems and scripts look up ssl here
|
||||||
|
ln -sf $(brew --cellar openssl@1.1)/1.1* /usr/local/opt/openssl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
invoke_tests "OpenSSL"
|
invoke_tests "OpenSSL"
|
||||||
|
|||||||
@@ -7,6 +7,13 @@ Describe "OpenSSL" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Context "OpenSSL 1.1 Path Check" {
|
||||||
|
It "OpenSSL 1.1 path exists" {
|
||||||
|
$openSSLpath = brew --prefix openssl@1.1
|
||||||
|
$openSSLpath | Should -Exist
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Context "OpenSSL 1.1 is default" {
|
Context "OpenSSL 1.1 is default" {
|
||||||
It "Default OpenSSL version is 1.1" {
|
It "Default OpenSSL version is 1.1" {
|
||||||
$commandResult = Get-CommandResult "openssl version"
|
$commandResult = Get-CommandResult "openssl version"
|
||||||
|
|||||||
Reference in New Issue
Block a user