Skip to content

Commit 14bd9d0

Browse files
committed
Move manual build_libldk.sh to ci directory.
1 parent 8b60b8a commit 14bd9d0

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

xcode/build-libldk-manual.sh renamed to ci/build_libldk.sh

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,24 @@ C_BINDINGS_SOURCE_DIRECTORY="$(cd ${LDK_DIRECTORY}; pwd)/lightning-c-bindings"
2828
# https://stackoverflow.com/a/4774063/299711
2929
BASEDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
3030

31-
BUILT_PRODUCTS_DIR="${BASEDIR}/binaries" # directory to copy the shared library and headers into
31+
BUILD_PRODUCTS_DIR="${BASEDIR}/../bindings/bin" # directory to copy the shared library and headers into
3232
BUILD_LOG_PATH="${BASEDIR}/build_libldk.log"
3333
TARGET_NAME="libldk"
3434

3535
# initialize the build log
3636
echo -n "" > $BUILD_LOG_PATH
3737

38+
# force xcode 13.2.1 for the tuple fix for macabi
39+
sudo xcode-select -s /Applications/Xcode\ 13.2.1.app/Contents/Developer/
40+
41+
if [[ $CONFIGURATION = "Debug" ]]; then
42+
RUST_CONFIGURATION="debug"
43+
RUST_CONFIGURATION_FLAG=""
44+
else
45+
RUST_CONFIGURATION="release"
46+
RUST_CONFIGURATION_FLAG="--release"
47+
fi
48+
3849
declare -a platforms=("iphoneos" "iphonesimulator" "macosx" "macosx")
3950
declare -a llvm_target_triple_suffixes=("" "-simulator" "" "-macabi")
4051
declare -a architectures=( "arm64" "arm64 x86_64" "arm64 x86_64" "arm64 x86_64" )
@@ -47,7 +58,6 @@ do
4758
ARCHS=${architectures[$i]}
4859

4960
# sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
50-
sudo xcode-select -s /Applications/Xcode\ 13.2.1.app/Contents/Developer/
5161

5262
if [[ $PLATFORM_NAME = "macosx" ]]; then
5363
if [[ $LLVM_TARGET_TRIPLE_SUFFIX = "-macabi" ]]; then
@@ -63,20 +73,12 @@ do
6373

6474
# Clean any pre-existing static libraries that doesn't align with what we're currently trying to build
6575

66-
if [[ $CONFIGURATION = "Debug" ]]; then
67-
RUST_CONFIGURATION="debug"
68-
RUST_CONFIGURATION_FLAG=""
69-
else
70-
RUST_CONFIGURATION="release"
71-
RUST_CONFIGURATION_FLAG="--release"
72-
fi
73-
7476
echo "Platform name: ${PLATFORM_NAME}" >> $BUILD_LOG_PATH
7577
echo "Configuration: ${RUST_CONFIGURATION}" >> $BUILD_LOG_PATH
7678
echo "LLVM Target Triple Suffix: ${LLVM_TARGET_TRIPLE_SUFFIX}" >> $BUILD_LOG_PATH
7779

78-
INDIVIDUAL_ARCH_BINARY_DIR="${BUILT_PRODUCTS_DIR}/${RUST_CONFIGURATION}/${PLATFORM_HUMAN_NAME}/raw"
79-
LIPO_BINARY_DIR="${BUILT_PRODUCTS_DIR}/${RUST_CONFIGURATION}/${PLATFORM_HUMAN_NAME}/lipo"
80+
INDIVIDUAL_ARCH_BINARY_DIR="${BUILD_PRODUCTS_DIR}/${RUST_CONFIGURATION}/${PLATFORM_HUMAN_NAME}/raw"
81+
LIPO_BINARY_DIR="${BUILD_PRODUCTS_DIR}/${RUST_CONFIGURATION}/${PLATFORM_HUMAN_NAME}/lipo"
8082

8183
for ARCH in $ARCHS
8284
do

0 commit comments

Comments
 (0)