jurplel / install-qt-action

Install Qt on your Github Actions workflows with just one simple action
MIT License
459 stars 78 forks source link

Add Qt 6.2 to test suite #120

Closed ddalcino closed 2 years ago

ddalcino commented 2 years ago

This adds Qt 6.2.0 to the test workflow.

I am using #119 as a base for this because I am not certain that aqt 1.2.5 installs modules properly. I think v1.2.5 can install the qtwebengine module if you call it addons.qtwebengine, but that solution is not so nice. With aqt v2 you can just call it qtwebengine.

I have observed that when you run qmake on a project that requests the webengine module, it doesn't work on Qt 6, no matter what modules are installed. I believe that the solution is to use webenginewidgets or webenginecore in the test .pro file. See Qt WebEngine Examples and a specific example. Accordingly, I have modified tests/TestWithModules/TestWithModules.pro. I have also observed that the configuration step fails when you use the qtwebengine module without having qtpositioning and qtwebchannel installed, so I have conditionally added them to .github/workflows/test.yml.

I have excluded Qt 6.2.0 from the Ubuntu 18.04 builds, thanks to https://github.com/jurplel/install-qt-action/issues/95#issuecomment-939599149.

I think that this fixes #95. Perhaps a note should be added to README.MD, stating that Ubuntu 20.04+ is required for Qt 6+?

ddalcino commented 2 years ago

I think I need to comment on this, since I changed the code that prints the contents of %Qt5_DIR%/lib/cmake. This is a run of the action that should print the contents of the directory: https://github.com/ddalcino/install-qt-action/runs/3944003013?check_suite_focus=true#step:8:1

I'm not sure what's going on here. It looks like the master branch has this issue as well, so I don't think that this is a result of anything that I wrote.

Relevant environment variables:

    Qt6_DIR: D:/a/install-qt-action/Qt/6.2.0/msvc2019_64
    QT_PLUGIN_PATH: D:/a/install-qt-action/Qt/6.2.0/msvc2019_64/plugins
    QML2_IMPORT_PATH: D:/a/install-qt-action/Qt/6.2.0/msvc2019_64/qml

I would speculate that the vcvars64.bat script is trying to run some commands, but install-qt-action is being interpreted as a command switch because it is preceded by /, rather than the canonical \. This would explain the Invalid switch - "install-qt-action". error message. However, I don't understand why this does not cause the workflow to fail.

Edit: This is fixed in #122