1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-29 23:26:24 +01:00

Merge pull request #2449

4a52681 workflows: check if QML loads successfully (selsta)
This commit is contained in:
luigi1111 2019-11-27 10:23:45 -06:00
commit 04a665db0c
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
2 changed files with 12 additions and 1 deletions

View File

@ -13,6 +13,8 @@ jobs:
run: brew update && brew install boost hidapi zmq libpgm unbound libsodium miniupnpc ldns expat doxygen graphviz libunwind-headers protobuf qt5
- name: build
run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh
- name: test qml
run: build/release/bin/monero-wallet-gui.app/Contents/MacOS/monero-wallet-gui --test-qml
build-ubuntu:
@ -25,6 +27,8 @@ jobs:
- name: install monero dependencies
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev
- name: install monero gui dependencies
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev xvfb
- name: build
run: ./build.sh
- name: test qml
run: xvfb-run -a build/release/bin/monero-wallet-gui --test-qml

View File

@ -174,7 +174,10 @@ int main(int argc, char *argv[])
QCoreApplication::translate("main", "Log to specified file"),
QCoreApplication::translate("main", "file"));
QCommandLineOption testQmlOption("test-qml");
testQmlOption.setFlags(QCommandLineOption::HiddenFromHelp);
parser.addOption(logPathOption);
parser.addOption(testQmlOption);
parser.addHelpOption();
parser.process(app);
@ -405,6 +408,10 @@ int main(int argc, char *argv[])
return 1;
}
// QML loaded successfully.
if (parser.isSet(testQmlOption))
return 0;
#ifdef WITH_SCANNER
QObject *qmlCamera = rootObject->findChild<QObject*>("qrCameraQML");
if (qmlCamera)