-
Notifications
You must be signed in to change notification settings - Fork 5k
[release/6.0] Install native dependencies on all Apple OS in CI #82322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,51 @@ | ||
#!/usr/bin/env bash | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# This is a simple script primarily used for CI to install necessary dependencies | ||
# | ||
# For CI typical usage is | ||
# | ||
# ./install-native-dependencies.sh <OS> <arch> azDO | ||
# | ||
# For developer use it is not recommended to include the azDO final argument as that | ||
# makes installation and configuration setting only required for azDO | ||
# | ||
# So simple developer usage would currently be | ||
# Usage: | ||
# | ||
# ./install-native-dependencies.sh <OS> | ||
|
||
if [ "$1" = "Linux" ]; then | ||
sudo apt update | ||
if [ "$?" != "0" ]; then | ||
exit 1; | ||
fi | ||
sudo apt install cmake llvm-3.9 clang-3.9 lldb-3.9 liblldb-3.9-dev libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev libcurl4-openssl-dev libssl-dev libkrb5-dev libnuma-dev build-essential | ||
if [ "$?" != "0" ]; then | ||
exit 1; | ||
fi | ||
elif [ "$1" = "MacCatalyst" ] || [ "$1" = "OSX" ] || [ "$1" = "tvOS" ] || [ "$1" = "iOS" ]; then | ||
engdir=$(dirname "${BASH_SOURCE[0]}") | ||
|
||
echo "Installed xcode version: `xcode-select -p`" | ||
|
||
if [ "$3" = "azDO" ]; then | ||
# workaround for old osx images on hosted agents | ||
# piped in case we get an agent without these values installed | ||
if ! brew_output="$(brew uninstall [email protected] 2>&1 >/dev/null)"; then | ||
echo "didn't uninstall [email protected]" | ||
else | ||
echo "succesfully uninstalled [email protected]" | ||
fi | ||
fi | ||
|
||
export HOMEBREW_NO_INSTALL_CLEANUP=1 | ||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | ||
# Skip brew update for now, see https://github.com/actions/setup-python/issues/577 | ||
# brew update --preinstall | ||
brew bundle --no-upgrade --no-lock --file "${engdir}/Brewfile" | ||
if [ "$?" != "0" ]; then | ||
exit 1; | ||
fi | ||
else | ||
echo "Must pass \"Linux\", \"tvOS\", \"iOS\" or \"OSX\" as first argument." | ||
exit 1 | ||
os="$(echo "$1" | tr "[:upper:]" "[:lower:]")" | ||
|
||
if [ -z "$os" ]; then | ||
. "$(dirname "$0")"/native/init-os-and-arch.sh | ||
os="$(echo "$os" | tr "[:upper:]" "[:lower:]")" | ||
fi | ||
|
||
case "$os" in | ||
linux) | ||
if [ -e /etc/os-release ]; then | ||
. /etc/os-release | ||
fi | ||
|
||
if [ "$ID" != "debian" ] && [ "$ID_LIKE" != "debian" ]; then | ||
echo "Unsupported distro. distro: $ID" | ||
exit 1 | ||
fi | ||
|
||
apt update | ||
|
||
apt install -y build-essential gettext locales cmake llvm clang lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ | ||
libssl-dev libkrb5-dev libnuma-dev zlib1g-dev | ||
|
||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
;; | ||
|
||
osx|mac*|ios*|tvos*) | ||
echo "Installed xcode version: $(xcode-select -p)" | ||
|
||
export HOMEBREW_NO_INSTALL_CLEANUP=1 | ||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | ||
# Skip brew update for now, see https://github.com/actions/setup-python/issues/577 | ||
# brew update --preinstall | ||
brew bundle --no-upgrade --no-lock --file "$(dirname "$0")/Brewfile" | ||
;; | ||
|
||
*) | ||
echo "Unsupported platform. OS: $os" | ||
exit 1 | ||
;; | ||
esac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is new; lowercase changes in 8.0 didn't require this transformation.