2023-06-27 16:50:42 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
2023-06-28 20:59:16 +02:00
|
|
|
if [[ -n "${1}" ]]; then
|
|
|
|
WORKSPACE_PATH="$1"
|
|
|
|
else
|
|
|
|
WORKSPACE_PATH="/src/dash"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -d "$WORKSPACE_PATH" ]]; then
|
|
|
|
echo "$0: $WORKSPACE_PATH is not a valid directory, exiting!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-05-03 08:45:08 +02:00
|
|
|
XCODE_VERSION="12.2"
|
|
|
|
XCODE_RELEASE="12B45b"
|
2023-06-27 16:50:42 +02:00
|
|
|
XCODE_ARCHIVE="Xcode-${XCODE_VERSION}-${XCODE_RELEASE}-extracted-SDK-with-libcxx-headers"
|
|
|
|
|
|
|
|
# Check if macOS SDK is present, if not, download it
|
2023-06-28 20:59:16 +02:00
|
|
|
if [ ! -d "${WORKSPACE_PATH}/depends/SDKs/${XCODE_ARCHIVE}" ]
|
2023-06-27 16:50:42 +02:00
|
|
|
then
|
2023-06-28 20:59:16 +02:00
|
|
|
mkdir -p "${WORKSPACE_PATH}/depends/SDKs"
|
|
|
|
curl -L https://bitcoincore.org/depends-sources/sdks/${XCODE_ARCHIVE}.tar.gz | tar -xz -C "${WORKSPACE_PATH}/depends/SDKs"
|
2023-06-27 16:50:42 +02:00
|
|
|
fi
|
|
|
|
|
2023-06-28 20:59:16 +02:00
|
|
|
cd "${WORKSPACE_PATH}"
|
|
|
|
git config --global --add safe.directory "${WORKSPACE_PATH}"
|
2023-06-27 16:50:42 +02:00
|
|
|
git status >> /dev/null
|
|
|
|
|
2024-11-10 21:51:29 +01:00
|
|
|
export HOSTS="${HOSTS:-x86_64-linux-gnu aarch64-linux-gnu riscv64-linux-gnu
|
|
|
|
x86_64-w64-mingw32
|
|
|
|
x86_64-apple-darwin arm64-apple-darwin}"
|
|
|
|
|
2023-06-27 16:50:42 +02:00
|
|
|
./contrib/guix/guix-build
|