File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 - name : MacOS Install Deps
3131 if : contains(matrix.os, 'macos')
3232 run : |
33- brew install ccache boost pkgconf libevent qt@6 qrencode coreutils llvm
33+ brew install ccache boost pkgconf qt@6 qrencode coreutils llvm
3434 llvm_prefix="$(brew --prefix llvm)"
3535 echo "CC=${llvm_prefix}/bin/clang" >> "$GITHUB_ENV"
3636 echo "CXX=${llvm_prefix}/bin/clang++" >> "$GITHUB_ENV"
Original file line number Diff line number Diff line change @@ -143,14 +143,18 @@ jobs:
143143 cmake -S . -B "${BUILD_DIR}" -G Ninja \
144144 -DCMAKE_BUILD_TYPE=Release \
145145 -DCMAKE_TOOLCHAIN_FILE="${PWD}/bitcoin/depends/${HOST}/toolchain.cmake" \
146- -DBUILD_APP_TESTS=OFF \
146+ -DBUILD_APP_TESTS=ON \
147147 -DBUILD_GUI=ON \
148148 -DENABLE_WALLET=ON \
149149 -DENABLE_IPC=OFF
150150
151- - name : Build bitcoin-core-app
151+ - name : Build
152152 run : |
153- cmake --build "${BUILD_DIR}" --target bitcoin-core-app --parallel "${JOBS}"
153+ cmake --build "${BUILD_DIR}" --parallel "${JOBS}"
154+
155+ - name : Run app tests
156+ run : |
157+ ctest --test-dir "${BUILD_DIR}" --output-on-failure --parallel "${JOBS}"
154158
155159 - name : Upload depends logs
156160 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ target_link_libraries(bitcoin-core-app
193193)
194194qt6_import_qml_plugins (bitcoin-core-app )
195195
196- option (BUILD_APP_TESTS "Build unit tests for the app" OFF )
196+ option (BUILD_APP_TESTS "Build tests for the app" ON )
197197if (BUILD_APP_TESTS)
198198 include (CTest )
199199 enable_testing ()
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ target_link_libraries(bitcoinqml_unit_tests
7272 Qt6::Widgets
7373)
7474
75- add_test (NAME bitcoinqml_unit_tests COMMAND bitcoinqml_unit_tests -platform offscreen )
75+ add_test (NAME bitcoinqml_unit_tests COMMAND bitcoinqml_unit_tests -platform minimal )
7676
7777qt6_add_resources (QMLTESTS_QRC_CPP ${QML_QRC} qml/bitcoin_qmltests.qrc )
7878
@@ -103,4 +103,19 @@ target_include_directories(bitcoinqml_qmltests
103103 ${CMAKE_CURRENT_SOURCE_DIR } /..
104104)
105105
106- add_test (NAME bitcoinqml_qmltests COMMAND bitcoinqml_qmltests -platform offscreen )
106+ add_test (NAME bitcoinqml_qmltests COMMAND bitcoinqml_qmltests -platform minimal )
107+
108+ get_target_property (qt_lib_type Qt6::Core TYPE)
109+ if (qt_lib_type STREQUAL "STATIC_LIBRARY" )
110+ qt6_import_plugins (bitcoinqml_unit_tests INCLUDE Qt6::QMinimalIntegrationPlugin )
111+ qt6_import_plugins (bitcoinqml_qmltests INCLUDE Qt6::QMinimalIntegrationPlugin )
112+ qt6_import_qml_plugins (bitcoinqml_qmltests )
113+ target_link_libraries (bitcoinqml_qmltests PRIVATE
114+ Qt6::qtquickdialogsplugin
115+ )
116+ if (Qt6_VERSION VERSION_GREATER_EQUAL 6.5)
117+ target_link_libraries (bitcoinqml_qmltests PRIVATE Qt6::qtqmlcoreplugin )
118+ else ()
119+ target_link_libraries (bitcoinqml_qmltests PRIVATE Qt6::qmlsettingsplugin )
120+ endif ()
121+ endif ()
You can’t perform that action at this time.
0 commit comments