Unverified Commit 56258b40 authored by Matthew Brett's avatar Matthew Brett Committed by GitHub
Browse files

Merge pull request #391 from isuruf/sdk

Fix for sdk version when xcrun returns nothing
parents 53c7c2e5 b139e062
......@@ -2,13 +2,22 @@
# Wheel build, install, run test steps on OSX
set -e
function check_sdk_11 {
ver="$(xcrun -show-sdk-version)"
if [[ "${ver}" == "" || "${ver}" == 10.* ]]; then
echo "not found"
else
echo "found"
fi
}
if [ "$PLAT" == "arm64" ] || [ "$PLAT" == "universal2" ]; then
if [[ "$(xcrun -show-sdk-version)" == 10.* ]]; then
if [[ "$(check_sdk_11)" == "not found" ]]; then
latestXcode=$(ls /Applications | grep Xcode[_0-9\.]*\.app | sort -V | tail -n 1)
if ([ "$GITHUB_WORKFLOW" != "" ] || [ "$PIPELINE_WORKSPACE" != "" ]) && [ $latestXcode ]; then
sudo xcode-select -switch /Applications/$latestXcode.app
fi
if [[ "$(xcrun -show-sdk-version)" == 10.* ]]; then
if [[ "$(check_sdk_11)" == "not found" ]]; then
echo "Need SDK>=11 for arm64 builds. Please run xcode-select to select a newer SDK"
exit 1
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment