forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: deduplicate macOS SDK setup logic
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
41 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2024 The Dash Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
export LC_ALL=C.UTF-8 | ||
|
||
set -eo pipefail | ||
|
||
SDK_URL="${SDK_URL:-https://bitcoincore.org/depends-sources/sdks}" | ||
SDK_PATH="${SDK_PATH:-depends/SDKs}" | ||
SDK_SRCS="${SDK_SOURCES:-depends/sdk-sources}" | ||
XCODE_VERSION="${XCODE_VERSION:-15.0}" | ||
XCODE_RELEASE="${XCODE_RELEASE:-15A240d}" | ||
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers" | ||
XCODE_AR_PATH="${SDK_SRCS}/${XCODE_ARCHIVE}.tar.gz" | ||
|
||
if [ ! -d "${SDK_PATH}/${XCODE_ARCHIVE}" ]; then | ||
if [ ! -f "${XCODE_AR_PATH}" ]; then | ||
echo "Downloading macOS SDK..." | ||
mkdir -p "${SDK_SRCS}" | ||
curl --location --fail "${SDK_URL}/${XCODE_ARCHIVE}.tar.gz" -o "${XCODE_AR_PATH}" | ||
fi | ||
echo "Extracting macOS SDK..." | ||
mkdir -p "${SDK_PATH}" | ||
tar -C "${SDK_PATH}" -xf "${XCODE_AR_PATH}" | ||
fi |