Skip to content

Commit dc51ca8

Browse files
committed
ci fixes: wip
1 parent 446ed05 commit dc51ca8

2 files changed

Lines changed: 46 additions & 33 deletions

File tree

ci/test/03_test_script.sh

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/t
1414
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
1515

1616
echo "Number of available processing units: $(nproc)"
17-
if [ "$CI_OS_NAME" == "macos" ]; then
17+
if [ "$CI_OS_NAME" = "macos" ]; then
1818
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
1919
else
2020
free -m -h
@@ -84,23 +84,23 @@ if [ "$USE_BUSY_BOX" = "true" ]; then
8484
fi
8585

8686
# Make sure default datadir does not exist and is never read by creating a dummy file
87-
if [ "$CI_OS_NAME" == "macos" ]; then
87+
if [ "$CI_OS_NAME" = "macos" ]; then
8888
echo > "${HOME}/Library/Application Support/Elements"
8989
else
9090
echo > "${HOME}/.elements"
9191
fi
9292

9393
if [ -z "$NO_DEPENDS" ]; then
94-
if [[ $CI_IMAGE_NAME_TAG == *centos* ] || [[ $CI_IMAGE_NAME_TAG == *rocky* ]]; then
95-
SHELL_OPTS="CONFIG_SHELL=/bin/ksh" # Temporarily use ksh instead of dash, until https://bugzilla.redhat.com/show_bug.cgi?id=2335416 is fixed.
96-
else
97-
SHELL_OPTS="CONFIG_SHELL="
98-
fi
94+
case "${CI_IMAGE_NAME_TAG}" in
95+
*centos*|*rocky*)
96+
SHELL_OPTS="CONFIG_SHELL=/bin/ksh" # Temporarily use ksh instead of dash, until https://bugzilla.redhat.com/show_bug.cgi?id=2335416 is fixed.
97+
;;
98+
*)
99+
SHELL_OPTS="CONFIG_SHELL="
100+
;;
101+
esac
99102
bash -c "$SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS LOG=1"
100103
fi
101-
if [ "$DOWNLOAD_PREVIOUS_RELEASES" = "true" ]; then
102-
test/get_previous_releases.py -b -t "$PREVIOUS_RELEASES_DIR"
103-
fi
104104

105105
BITCOIN_CONFIG_ALL="-DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON"
106106
if [ -z "$NO_DEPENDS" ]; then
@@ -113,23 +113,26 @@ fi
113113
ccache --zero-stats
114114
PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
115115

116-
if [ -n "$ANDROID_TOOLS_URL" ]; then
117-
make distclean || true
118-
./autogen.sh
119-
bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
120-
make "${MAKEJOBS}" && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk
121-
bash -c "${PRINT_CCACHE_STATISTICS}"
122-
exit 0
116+
if [ -z "$NO_DEPENDS" ]; then
117+
# legacy autotools path (depends builds)
118+
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
119+
else
120+
# modern CMake path (native macOS + NO_DEPENDS=1)
121+
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} -DENABLE_EXTERNAL_SIGNER=ON"
123122
fi
124123

125-
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
126-
127-
if [ -n "$CONFIG_SHELL" ]; then
128-
"$CONFIG_SHELL" -c "./autogen.sh"
124+
# === CMake build (modern path used by the fork) ===
125+
if [ -n "$NO_DEPENDS" ]; then
126+
echo "Building with CMake (NO_DEPENDS=1)..."
127+
cmake -B build -S . -G "$CMAKE_GENERATOR" $BITCOIN_CONFIG_ALL
129128
else
129+
# depends path (still uses configure in some jobs)
130130
./autogen.sh
131+
./configure $BITCOIN_CONFIG_ALL
131132
fi
132133

134+
cmake --build build --config Release --parallel "$MAKEJOBS"
135+
133136
mkdir -p "${BASE_BUILD_DIR}"
134137
cd "${BASE_BUILD_DIR}"
135138

src/CMakeLists.txt

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ target_link_libraries(elementssimplicity
106106
core_interface
107107
)
108108

109+
# macOS Apple Clang is stricter than Linux GCC on this vendored code
110+
if(APPLE)
111+
target_compile_options(elementssimplicity PRIVATE
112+
-Wno-conditional-uninitialized
113+
-Wno-implicit-fallthrough
114+
)
115+
endif()
116+
109117
# Set top-level target output locations.
110118
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
111119
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
@@ -247,18 +255,20 @@ if(ENABLE_WALLET)
247255
add_subdirectory(wallet)
248256

249257
if(BUILD_WALLET_TOOL)
250-
add_executable(elements-wallet
251-
bitcoin-wallet.cpp
252-
init/bitcoin-wallet.cpp
253-
wallet/wallettool.cpp
254-
)
255-
add_windows_resources(elements-wallet bitcoin-wallet-res.rc)
256-
target_link_libraries(elements-wallet
257-
core_interface
258-
"$<LINK_GROUP:RESCAN,bitcoin_node,bitcoin_wallet,bitcoin_common>"
259-
)
260-
install_binary_component(elements-wallet HAS_MANPAGE)
261-
endif()
258+
add_executable(elements-wallet
259+
bitcoin-wallet.cpp
260+
init/bitcoin-wallet.cpp
261+
wallet/wallettool.cpp
262+
)
263+
add_windows_resources(elements-wallet bitcoin-wallet-res.rc)
264+
target_link_libraries(elements-wallet
265+
core_interface
266+
bitcoin_node
267+
bitcoin_wallet
268+
bitcoin_common
269+
)
270+
install_binary_component(elements-wallet HAS_MANPAGE)
271+
endif()
262272
endif()
263273

264274

0 commit comments

Comments
 (0)