Skip to content
Permalink
Browse files

Merge pull request #2449

4a52681 workflows: check if QML loads successfully (selsta)
  • Loading branch information
luigi1111 committed Nov 27, 2019
2 parents 50e1ce1 + 4a52681 commit 04a665db0c11d882065d40c5fa59f55b3ca8fd65
Showing with 12 additions and 1 deletion.
  1. +5 −1 .github/workflows/build.yml
  2. +7 −0 main.cpp
@@ -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
@@ -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)

0 comments on commit 04a665d

Please sign in to comment.
You can’t perform that action at this time.